Schedule Syllabus Office Hours Course Staff | Gradescope Discussion Board | Problem Sets

cartoon of a Turing machine

Introduction to Algorithms

CSE 421 | Spring 2025

Problem Sets

Click here for a LaTeX template you may use.

Logistics and planning your week

Problem sets are roughly weekly, and will be made available on Wednesday evenings. They are typically due the following Wednesday at 11:59pm with submission on Gradescope.

Do not wait to start working on your problem set

It is very valuable to read and understand what each problem is asking soon after it has been assigned. Unlike other courses, even if you really understand the course material, if you leave things late you inevitably will find yourself stuck. One very big advantage to starting early: Once you understand what a question is asking, your brain is a very effective engine for background processing. You should take as much advantage as possible of your ability to be unconsciously working on the problem before you return to it.

As discussed on the syllabus, there are two classes of problems: Mechanical problems and long-form problems. Think about the long-form problems as you would a design for a programming task you have never seen before. (You wouldn't start your work on that coding at the last minute and you shouldn't do that with these problems.) The mechanical problems will generally help with your understanding so they can be good to get out of the way first.

Late days

You are allowed to take four 24-hour extensions on sets, no questions asked (you may use at most one on each sets). After exhausting your four extensions, all future assignments turned in up to one day late will be graded with a 25% penalty, two days late will be graded with a 50% penalty. Assignments turned in after two days late are given automatic zeroes. Extenuating circumstances can be discussed with Prof. Nirkhe -- no TA for this course can approve additional extensions.

Collaboration and Academic integrity

Re-read the detailed discussion in the syllabus.

Grading

How much detail do I include?

When writing pseudocode, your target audience is a competent programmer who has taken a course like CSE 332 (i.e., the other students in this course) but has only just read the problem that you are solving. Remember that you have probably thought about a problem for at least a few hours by the time you are writing up a solution. Your reader has not -- you have much more intuition than they do.

A good check is to ask "would me from last week understand this solution?" and "would me 6 months from now understand this solution?" If not, you are probably relying too much on the intuition you developed, and you should make that intuition explicit.

Our solution for a problem will always fit on one printed page (in LaTeX). It's ok if your solutions are a little longer (it's generally preferable to include too much detail than too little), but they shouldn't need to be much longer than a page.

What if I'm not sure how to do a problem?

Usually, grades for problems go in approximately this order:

When designing rubrics, we generally intend it to be to your benefit to have significant, but incomplete, progress toward a correct solution, than to write an incorrect algorithm and intentionally write an incorrect proof.

It is extremely common for our problems to have more than one reasonable solution! If we tell you to use a particular technique, you must use that technique. But otherwise we accept any correct solution.

Style Guide

Expectations for algorithms

When specifying an algorithm, you have to provide the right amount of detail. I often express that this is similar to how you would right a lab report in a chemistry or physics lab today compared to what you would write in grade school. The level of precision is different because you are writing to a different audience. Identically, the audience to whom you are writing you should assume has a fair experience with algorithms and program- ming. If written correctly, your specification should provide the reader with an exercise in programming (i.e. actually implementing the algorithm in a programming language). You should be focusing on the exercise of designing the algorithm. In general, I suggest you follow these guidelines:

Expectations for proofs

In general, proofs in 421 are not graded nearly as strictly as you were used to in 311. In 311, we needed to make sure we know that you know what you're doing. Now that you're in a 400-level course, we believe you know what the starting point of a proof should be, so you'll often be allowed to skip those pieces.

Here are some things we really cared about in 311 that we don't care about in 421

On the other hand, some things we do still care about

Formatting

You are not required to format your solutions using LaTeX but we do insist that solutions be highly legible and well-organized. Solutions that are not will lose points. We do provide a basic LaTeX template for problem sets. We highly recommend use of Overleaf, which is available through UW, for your LaTeX. Remember your output should be expressed in plain, technical English.