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 to work on homework

Homework assignments 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 homework

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 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 have four late day flexibilites awarded to you. See the syllabus for details. Use them wisely.

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

What does it mean to "describe an algorithm"?

If we ask you to "describe" or "design" an algorithm (or use any similar phrase), then must do four things.

Give us some intuition

Many of our problems have 1-2 core ideas in them. Telling us what you're intending to do (just in 1-2 sentences) makes it much easier for us to understand your code. You're not proving your code correct here, nor describing details. You're just giving 1-2 sentences of what you want to do.

Tell us what the computer should do

Tell us why it is correct

Analyze the running time

Pseudocode

We have some advice and examples in this pdf. See also the the latex file that generated the pdf.

Formatting

You are not required to format your solutions using latex but we do insist that solutions be high legible and well-organized. Solutions that are not will lose points. We do provide a basic latex template for homework which produces this output. We highly recommend use of Overleaf, which is available through UW, for your latex.

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