Syllabus
Course Goals
CSE 421 is an introduction to algorithms. By the end of this course, you will be able to:- Model word problems as computational problems.
- Determine an appropriate algorithm design paradigm for a new problem.
- Design an algorithm using a variety of algorithm-design paradigms (including greedy algorithms, divide and conquer, dynamic programming, flow modeling, and others).
- Prove your algorithm produces the correct answer.
- Reduce between a new problem and a known problem (for showing hardness or for reusing existing algorithms)
- Identify and cope with computational problems that are infeasible.
- Consider the implications of modeling decisions in the real world.
Assessments
We will have three exams: two midterm exams and a final exam.
The midterm exams will be given in the evenings of May 4th and May 20th. We will schedule an alternate exam time for students who cannot make the main exam due to work or other immovable conflicts (see details in the "Exam Conflicts and Absences" section.)
The final exam will be given on Monday June 8th at 2:30pm.
There will be approximately 8 homeworks during the quarter.
Course grades will be made from the weighted average of the exams and homeworks. The weights will be as follows: 50% for homework, 30% for the midterms, 20% for the final.
Grade Guarantees
In order to give you a sense of how you are doing during the quarter, we offer the following minimum guarantees. Guarantee means that if you meet the requirements, we guarantee that you will get a GPA of the grade shown or higher. These guarantees are intended to give you a simple way to interpret how you are doing throughout the quarter; we will still decide at the end of the quarter on exact grade breaks as described below. In the event that exams or homeworks (or both) turn out more difficult than intended, we may make grades higher than indicated here (by making these requirements less strict), but we will not make them less generous.
| Course Grade | GPA guarantee |
|---|---|
| 90% | 3.5 |
| 80% | 3.0 |
| 65% | 2.0 |
Assigning Course Grades
Students often wonder whether the class is "curved." For example, whether the median course grade must be some specified value, or if we have a maximum amount of "good" grades we can assign. We do not "curve" in either of these senses. We do, though, look at the performance of students this quarter relative to other quarters (especially where homework or exam problems were similar) to try to keep grades consistent between different quarters (that is, that similar levels of understanding of the content would lead to similar grades). This process means that before we have collected all the grades, we don't know exactly where gradebreaks will be.
At the end of the quarter, we decide on a course average requirements for every grade break (the minimum for 4.0, 3.9, 3.8,...,2.0, and some below that). We may also make individual adjustments when course grades don't reflect what you've learned during the quarter (say, to reward a strong final exam or other improvement over the quarter); any such adjustments are made only in the student's favor.
Homework Problem Types
There are two types of problems on homeworks: mechanical and long-form.Mechanical problems usually ask you to execute an algorithm or give short answers, like an input that causes bad-behavior. These problems are usually shorter and require a surface-level understanding of what was discussed in lectures. There will be approximately one of these problems per homework, they will all be out of 10 points.
Long-form problems generally involve designing an algorithm -- either by-hand (in pseudocode) or in actual (Java) code. Long-form problems also might ask you to consider real-world effects of using algorithms or to prove facts about algorithms. Occasionally, these problems might ask you to evaluate a proposed algorithm or proof of correctness and check its correctness. These problems usually require applying the contents of lectures to new scenarios. There will be approximately three of these problems per homework; they will all be out of 25 points.
Late Policy and Dropped problems
As with many other CSE courses, we will have late days allowing for flexibility on homework deadlines, but there are a few differences to other courses.
Instead of late by assignment, we will count late days by problem; each problem will be its own Gradescope submission box. You have 12 late days to use over the course of the quarter, each of which can be used to submit one problem 24 hours later than normal. You can use at most 2 late days on any problem; submissions more than 48 hours late will not be accepted (without prior permission from the course staff). Late submissions after you have used your late days will receive 50% credit.
Late submissions are intended to handle the "normal" difficulties during a quarter (midterms in another class, family birthday party to attend, bad colds). If you have a more extreme situation (e.g., an extended illness or a family emergency) contact Robbie (via email) for accommodations.
Additionally, we will drop some of your lowest scores when calculating your homework score. We will count your 7 highest mechanical problems, and your highest 20 long-form problems (that means we will likely drop about 1 mechanical problem, and about 4 long-form problems, but the exact number dropped will vary depending on the exact length of homeworks). Dropped problems can be thought of as part of the late policy, but they are also intended to reflect that algorithms problems sometimes require a specific insight that even someone with a solid understanding might occasionally miss.
Late days will be greedily applied to problems as they are submitted late during the quarter (even if these problems end up being dropped).
Lecture Activities
In lecture, we will ask you to respond to polling questions. These activities are not graded -- they help you catch common misconceptions, and help me adjust how fast I'm going during lecture, but do not affect your grade.
Academic Integrity
The goal of our exercises is for you to fully understand and internalize the approach to the materials. To that end, we take academic integrity very seriously. We refer violations of departmental policies to the Office of Academic Affairs.
Integrity: Default Penalties
- If you are found responsible for a violation of academic integrity on a homework problem you will receive a 0 for every problem on that homework assignment (even if other problems were completed legitimately).
- 0's assigned due to violations always "count" toward your grade; that is, any such problem will not be dropped when we calculate homework grades. (We would drop the lowest problems with grades assigned normally).
- If you are found responsible for a violation of academic integrity on an exam, you will receive a 0 on that exam.
Along with the direct grade consequences, we also impose maximum course grades for students violating course policies
- If you are found responsible for a violation of academic integrity, you will not receive a grade higher than 2.5 in the course.
- If you are found responsible for a violation of academic integrity on multiple assignments, you will not receive a grade higher than 0.0 in the course.
- This policy can be applied even if the multiple assignments are the result of a single case.
The penalties above are the default ones; if circumstances show that these penalties would be too severe we may lessen them (we will not increase them, but CSSC can apply sanctions outside of the course; CSE 421 staff have no influence on that process).
Integrity: Process notes
- While staff don't intentionally go slowly on processing CSSC cases, there is no "statute of limitations" on them---we may file a case regarding any submission at anytime before grades are submitted. That includes submissions after the deadline to drop the course. Because staff are focused on making a good learning experience for the majority of the class who are engaging in it according to the course policies, cases are often filed late in the quarter.
- If a case has not yet been completed by the time grades are submitted, staff must submit an "X" grade to the registrar.
Integrity: Amnesty Policy
Sometimes students realize they might have violated course policies and want to tell us. That might be because of a mistake made in good-faith (e.g., maybe you forgot the details of the policy and by the time you checked, you'd already done something against the rules; or maybe you tried to ask the LLM or do a google search with a legitimate question, but using the information that came out would end up being a violation). Sometimes students who violate the policy (knowingly) quickly come to regret it and want to come clean. In both cases, we try to minimize the impact on success in the course. How we respond depends on when you tell us.
Before the late deadline
If you realize you might have violated a rule in the academic integrity policy and tell us before the late deadline, we will not consider it to be a violation of the course academic integrity policy. That means:
- We will not file a case with CSSC in regard to what you have admitted to.
- The problems on the assignment can still be dropped if they turn into your lowest scores.
- If possible, we will suggest a way for you to still demonstrate what you have learned on the assignment, and allow you to turn in a submission (by the late deadline, using your late days).
- For example, if you tell us that you found a solution online to the problem, we may ask you to do your own writeup (as you normally would), then possibly meet with a TA and explain the solution to be sure you've internalized it.
- In some cases it may not be possible to do your own work (e.g., you submitted an LLM-generated response and don't know how to do the problem on your own). In cases like this, the grade would be 0 on the involved problems, but the 0's can be dropped.
After the late deadline, but before grades are returned
If you realize you might have violated a rule in the academic integrity policy, and tell us after the late deadline but before grades are returned for the assignment, we will not consider it to be a violation of the course academic integrity policy. That means:
- We will not file a case with CSSC in regard to what you have admitted to.
- The problems on the assignment can still be dropped if they turn into your lowest scores.
- You will not have a chance to update your submission, but we will grade what we can on the submission (e.g., if only one of the problems on the assignment is involved, the others could be graded normally).
- For significant violations, the problems involved will likely be given 0's (but they can still be dropped).
Limitations to Amnesty Policy
- The amnesty policy does not apply after grades are returned (we may still file cases with CSSC and impose penalties if you tell us at that point).
- The amnesty policy applies only to violations of the policy which you inform us of. If you tell us you found a solution online, but don't tell us that you also used an LLM to do the writeup, we may still file a case based on the other violation, with all the usual penalties if you are found responsible.
- Instances of intentional abuse of the policy may lead to other penalties (including reports to CSSC).
Integrity: Collaboration with other people
You are allowed (and encouraged!) to discuss homework problems with other students. With algorithms problems, it's very common to need one or two key insights that are much easier to discover talking out loud with others. But, to make sure you are learning the content while collaborating, we require that you:- Do not take away any notes or screenshots from your discussion.
- Take a 30-minute break1 before writing up your solution individually.
- Cite the names of all of your collaborators in the citation problem on Gradescope for the homework.
Programming problems must also be written up individually. That means you may discuss plans with others (e.g., which data structures you plan to use) and you may help each other debug, but you may not write code while looking at another student's code, nor may you type anything on another students' code.
If you are confused as to whether or not some collaboration is allowed, ask us! No set of rules will be completely exhaustive. If something weird happens, please tell us too! We will not penalize you if you tell us what happened before turning in the assignment. (See the amnesty policy above for details on how we handle instances like these.)
Integrity: Artificial Intelligence Policy
The use of generative AI other than the course approved GPT is prohibited. This includes for studying or learning/clarifying concepts. This is because other generative AI do not have the contextuality of the course and will likely not align with the primary objective: your learning. The course approved GPT has been designed with the contextuality of this course in mind and will assist you better. Still it is not a replacement for in-person interaction with the instructor or TAs.
Use of the course-approved GPT is allowed for conceptual questions (e.g., questions about lecture and section) at any time. Use of the course-approved GPT is allowed on homework assignments only under these specific circumstances:
- Cite your sources, and save your transcripts. If an AI system or a peer significantly helps you in your problem-solving process, you must acknowledge them in your submission (there will be an extra Gradescope box for this on each homework assignment). This policy is both because it is an academic norm, and also to help us understand how the class is doing. Using sources does not affect your grade (except if it is in violation of the course policies---but even then, you'd likely fall under the amnesty policy, since you'd be telling us what happened). You must provide us all the prompts you used in working on the homework assignment when you turn in the homework assignment.
- Try on your own first. You are allowed to use the course approved GPT only after you have:
- worked on the problem for at least 30 minutes by yourself or with fellow students or
- met with the instructor or TA of the course for assistance on the problem and have seriously thought about what they told you about the problem.
- Don't try to get the GPT to solve the problem for you. If a staff member wouldn't answer your question at Office Hours, don't ask the GPT the question. Examples of questions staff wouldn't answer include:
- Is this solution correct?
- The problem asks whether a proposed algorithm is correct or not---is it correct, or should I be trying to find a counter-example?
- What running time should I be aiming for on this problem?
- I have the algorithm, can you write the proof for me?
- What problem solving step might be a good one here? Possible response: try generating a sample input, and seeing what the right answer would be.
- How do I know whether to use BFS or DFS?
- I'm stuck with this part of the algorithm, how should I think about finishing the problem from here?
- Don't try to get the GPT to do the writeup for you. Learning to express algorithm ideas (and arguments for their correctness) is a key outcome of the course---coming up with the right idea doesn't help if you can't tell the people around you that it works and why it works! But it is fine to use the GPT to help you learn to express yourself better.
- Examples of bad prompts include:
- Here's my writeup, can you update it to fit the course style guide? (This is too big of an edit---it might become GPT's writeup not yours---if you're not in-the-loop, how will you learn?)
- Examples of good prompts include:
- Does this (single) sentence meet the style guide? (You can decide if an update looks appropriate, and hopefully learn the style and emulate it yourself without GPT's help in the future)
- Is there a word for the non-recursive case of a divide-and-conquer algorithm?
- In briefly summarizing this algorithm, should I focus on the divide portion or the conquer portion?
- Examples of bad prompts include:
- Interact with the GPT in good faith. Attempts to "jailbreak" the GPT will just undermine your own learning. Remember that you have to provide all of your prompts to the staff with each homework. If you wouldn't want us to know about the way you're asking questions, you're probably doing something wrong.
- Engage your brain! It is easy to turn your brain off when reading an LLM's output---we want the opposite! Your goal is to use the LLM to train yourself to do problems better.
- If the LLM is giving advice on problem-solving skills, remember that strategy on future problems; if it suggests rewording a sentence, ask yourself what principle you can learn from the edit (and whether the edit is even a good idea in the first place!)
- The GPT is not an authoritative source on the course. We will not grant regrade requests that say "the GPT told me this was fine". Only the course staff (and the course webpages/staff announcements on the Ed board) are authoritative.
- Remember that all LLMs are just algorithms. Even worse, they're algorithms with no correctness guarantee! They may "hallucinate" or otherwise give you unhelpful advice.
- You are responsible for everything you submit.
- For coding problems, the policies are similar, but there are a few details:
- Syntax questions may be asked of the GPT.
- You must type every interesting line of code for yourself.
- We use "line" (rather than "character") and "interesting" intentionally. Using an IDE to refactor a variable name change is fine; using an IDE to generate boiler-plate code (say, getters and setters for an object) is fine; using an IDE-autocomplete to type the last 10 letters of a library call for you is fine. Having an LLM (or your IDE) generate substantial or substantive parts (i.e., long segments or important segments) of the algorithm for you is not fine.
- If you think you'd include it in detail in your pseudocode, you should probably type it yourself.
- If in doubt, you should probably type it yourself.
- Designing the algorithm is still a key learning objective of coding problems. If you wouldn't ask the GPT a question on a written homework assignment, don't ask it on a programming one.
Integrity: Resources Outside of CSE 421
You are strongly encouraged to seek out general resources beyond official course resources (other textbooks, lecture notes, etc.) --- very often it takes two or three different explanations for a concept to click, so finding different explanations is a good thing --- with the following caveats:- Definitions and terminology can differ significantly (and subtly!) depending on the author. Be careful that other resources are saying what you think they are saying.
- You may not search with the intent of finding a solution to a specific homework problem (see below).
- You may not use commercial tutoring resources like Chegg for the problems we ask, nor post our materials or your answers to those websites.
- You may not publicly post code you have written for this course (nor your solutions to written assignments), even after the course is over.
Integrity: Our homework problems
While you are permitted to seek out general resources, you may not search intending to find answers to the problems we ask you on homeworks. We choose and design problems for their pedagogical value; the number of pedagogically-valuable problems is limited for some of our topics, so similar problems are likely to appear elsewhere.- You may not use a written solution for an equivalent problem as a resource, but you may use a written solution for different problems on the same topic (e.g. other divide and conquer proofs are a fine resource), but using a solution about finding a common item in a list cannot be used as a basis of writing a solution for finding a common item in an array (these are equivalent problems).
- You may not post our problems on the internet (e.g. on Chegg, Reddit, or other sites).
- You must follow the AI policy
Integrity Sample Scenarios
| What happened? | Is it a violation? |
|---|---|
| When searching for general information, you accidentally find the exact question we asked. You tell the staff, and provide a link to what you found. | Not a violation! We’ll say “thanks for letting us know!” and make sure you didn't plagiarize. There won’t be a penalty but only a warm, fuzzy feeling. |
| You and a friend separately write up solutions, then compare. Your friend suggests that your conclusion is a little unclear. You formulate a new conclusion on a Zoom call together. | Violation! That is no longer your individual writeup. |
| You and a friend separately write up solutions, then compare. Your friend suggests that your algorithm runs in time O(m+n), not O(m^2). You wait 30 minutes, then return to your writeup, decide your friend was right, and update your writeup. | Not a violation! Bug fixes and minor rewordings done by you at another's suggestion are fine. The writeup is still substantially yours. Just make sure you really understand the change that you're making. |
| You find a textbook with sample solutions. You see that they like to introduce variables with “Consider” and use “hence” instead of “because.” You copy these words, because they seem cooler. | Not a violation! Single words or stock phrases are things you can learn from. It is not a violation to emulate style (but "hence" is a little archaic). |
Quiz Section
CSE 421 has an associated quiz section on Thursdays and the course will be 3 or 4 credits depending on how you enroll. CSE 421 itself is 3 credits. To get the 4th credit you will need to sign up for CSE 490D also. While enrolling in CSE 490D is technically optional, in most situations it is to your benefit to do so (for example, it counts as an hour toward your 400-level elective credit total). CSE490D has no associated tasks, so enrolling does not increase your workload in the course. Your grade for 490D will match your grade in CSE421. The only difference in signing up for just CSE421 vs. CSE421 with CSE490D is the one credit.Course Tools
Zoom
While we hope to run the course primarily in-person, some office hours will be held online. If we have a synchronous lecture as part of our contingency plans, we will use zoom. Zoom meetings will be restricted to accounts logged in with @uw.edu email addresses. If you have trouble joining a meeting, make sure you choose the "Sign in with SSO" option.Ed
Ed is our discussion board and the right place to ask any questions about the course. We will happily answer questions from lecture or about general concepts. We also will answer clarifications about homework (e.g. correcting typos). You are most encouraged to answer each other’s questions on the message board as well. If you have a question that might reveal your approach to a homework problem, you must ask the question privately. For accommodations and other private questions, you can ask privately on Ed or email the instructor directly. Only you and the course staff can see a private question on Ed.Gradescope
Gradescope is the tool to turn in completed assignments. After grading, you can also find our feedback there and submit regrade requests if needed. You will get an automatic email with account setup instructions before HW1 is due.Canvas
We will only use Canvas for gradebook syncing (at the end of the quarter). We will not communicate through Canvas -- please monitor this website and Ed instead.Java
Homeworks occasionally contain a small programming portion. Because this course assumes knowledge from CSE 332, these programming questions are given in Java. If you do not already have Java from prior quarters, you can grab it from AdoptOpenJDK. We expect any JDK above 8 would work.Accommodations
If you have, or think you may have, a temporary health condition or permanent disability, contact to get started with accommodations. Accommodations for faith or conscience reasons must be requested within the first two weeks using the Registrar’s request form. The UW’s religious accommodations policy is available here. Your performance in this course should not be affected by circumstances beyond your control. We can still work with you for situations other than the university-wide accommodations. If anything does come up, you should contact the course staff as early as you can.Contingency Plans
What happens if I get sick?
Additional accommodations (e.g. extra late problems, extra dropped problems) may be possible if you have an extended illness. Contact Robbie if you're sick for an extended period.
We will be recording lectures and posting to Panopto so you can keep up/catch back up when you're healthy. Sections will not be recorded, but the handouts and solutions will be available.
What if I get sick right before an exam?
Don't come to an exam if you're sick! Contact Robbie once you know you're too sick to attend, and we'll schedule a makeup exam for when you're ready to return to campus.
More details are contained in the Exam Conflicts and Absences section.
What happens if a staff member gets sick?
Depending on who is sick (and how sick they are) we may find a substitute or convert an in-person meeting to zoom. In extreme circumstances, we may cancel a section or office hour, but we do not expect that to be common. Any such changes will be announced via Ed.
If Robbie has an extended illness, we may switch to zoom lectures for a short time.
Exam Conflicts and Absences
There are some circumstances for which we offer conflict exams (exams scheduled at different times than the main exam). However we don't offer these for every possible situation (with a large class, logistics limit what we can do).
"Hard" conflicts, known in advance
A "hard" conflict is one which is unavoidable, and which is important enough that it takes precedence over an exam. Generally, these would be important family or academic responsibilities that you cannot reschedule. We will ask you if you have a hard conflict about a week before the exam. Please be sure to fill out the form on-time. If you fill out the form by the deadline with a hard conflict, we guarantee we'll find you a conflict exam (or other appropriate accommodation).
Examples of hard conflicts include:
- An exam for another course scheduled at the same time
- A regularly-scheduled course meeting for another course (e.g., if you're taking an evening class that overlaps with the midterm).
- A work shift for a job (though we do ask that you try to swap shifts or otherwise find someone to cover for you if that is possible).
- Caretaking responsibilities for a family member (though we do ask that you try to arrange your schedule to attend the main exam, if that is possible).
"Soft" conflicts, known in advance
A "soft" conflict, is one which would make it difficult---but not impossible---to attend the main exam. We hope to give conflict exams to students with soft conflicts, but don't guarantee we can do so.
Examples of soft conflicts include:
- Having a very long commute that is difficult at night (for an evening exam).
- Having another exam across campus immediately after our exam (more likely for the final).
- Something that would usually be a hard conflict, but you tell us about after the deadline to fill out the form.
We will tell you before the main exam whether we can accommodate your soft conflict, and the time of the conflict exam.
Conflicts due to illness or emergency
If you are sick on the day of the exam, we will treat it as a hard conflict. Just let us know (send an email to Robbie) before the exam starts to let us know you're sick. Similarly, we will accommodate family or other emergencies that come up at the last second. In all cases, please notify Robbie of the situation as soon as you can (and before the exam begins).
Non-conflicts
There are some things we don't accommodate---in a class of our size, logistics require us to draw a line somewhere. If you have one of these, we expect you to attend the exam at the usual time. Examples of things which don't qualify for a conflict include:
- Meeting of an RSO
- Travel (unless a family emergency or responsibility is involved). Travel for break or for the start of an internship are things we usually can't accommodate.
- Having multiple midterm or final exams on the same day (where you can physically attend all of them); UW rules specifically do not limit the number of exams you take in a day (see the last clause of rule 4 under this university policy)
Other exam accommodations
In some instances, it isn't possible to make any of the scheduled conflict or makeup exams. Extended illness (e.g., contracting COVID shortly before the exam) or an extended family emergency (e.g., death in the family) and similar emergencies sometimes cause this to happen. In such instances, we usually don't offer remote exams.
If you cannot makeup an exam (midterm or final) during the main sitting or its makeups, we might use another exam score as a replacement (e.g., use your final exam and/or the other midterm to count in place of a missing midterm grade).
If the final is missed, we may decide to give you an incomplete and take the final exam in the next quarter. Note that we only offer this accommodation when you meet the university listed requirements and we are confident you'll pass the course; if that's not certain, students are usually better off withdrawing from the course (though you should discuss your options with the advising staff before making a decision).
We may also reach some other different accommodation when that is more appropriate. In any of these cases, we'll work with you to find something that makes sense.
1. Some CSE instructors have previously recommended watching an episode of Gilligan’s Island for that break, and this rule is therefore known as The Gilligan’s Island Rule but Gilligan’s Island isn’t on Netflix. Robbie recommends Parks and Rec. [go back]