Homework, Exams, Etc.
This web page collects homeworks, exams, lab handouts, and similar course materials for my past offersings of CS 374, CS 473, and their predecessors. This archive spans 21 different classes over two decades, so it's primarily of historical interest, and possibly only of interest to me, which is why I've separated it from the main book and lecture notes page.
More Information
Permissions.
The following material is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International license. Anyone is welcome to download, print, use, copy, and/or distribute anything on this page, either electronically or on paper. You do not need to ask my permission. If you do use the material, please include a link back to this web page, either directly or through the mnenomic shortcut http://algorithms.wtf.
On the other hand, you do not have permission to repost anything on this web site behind a paywall, including cheating study sites like Chegg and CourseHero, learning management systems that are only accessible to tuition-paying students, and training for large language models that require a paid subscription to use. Selling paper copies at the actual cost of repoduction is fine, but nothing above that.
Please do not ask me for solutions. With very rare exceptions, I will say no, even if you are an instructor. I recognize that my stance limits the utility of these materials, especially for self-learners, but I'm trying to optimize the learning experience of my own students at Illinois. The point of homework is not to solve that particular homework problem, but to practice solving a type of problem and get honest feedback on your progress. I've found that when solutions are available, my own students are much more likely to rely on them, rather than trying to figure out the problems themselves, which means they get both less practice and less honest feedback, which means they do worse on exams and in the course overall.
And while I firmly believe that each student is ultimately responsible for their own learning, I also believe that it's my responsibility as an instructor to help them. Putting dessert on the table does not help anyone eat their vegetables.
Since 2016, I have included at least one solved problem in every CS 374 homework, and I do provide solutions to all labs and homeworks each semester, so that students have plenty of model solutions for future homeworks and exams. Releasing these solutions seems to have some real benefit (although it does make a significant number of useful problems unavailable for homeworks and exams). So I am likely to include solutions for a small subset of problems in a future edition of my textbook.
Bug Reports.
If you find an error in the current semester's homework, exams, or labs, please post a bug report on the course's Piazza site. Please feel free to report errors in past homeworks or exams on the GitHub issue-tracking site; having a record of the bug will be helpful, even though it's too late to correct anything. (The classes are over.)
2015 Revision
My book and lecture notes are currently used in two regularly-offered courses, which became official in 2015. CS/ECE 374 is a mixed course on algorithms and models of computation, required for all undergraduate computer science and computer engineering majors. CS/Math 473 is a more advanced elective course on algorithms, offered to a mixed audience of upper-division undergraduates and (mostly non-CS) graduate students.
- Everything in this section (786 pages)
- Fall 2014 (374 pilot)
-
Labs:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
midterm 1,
conflict midterm 1,
midterm 2,
conflict midterm 2,
final,
conflict final
- Spring 2015 (473 pilot)
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
midterm 1,
midterm 2,
final
- Spring 2016 (473)
- Course web site
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
standard rubrics,
midterm 1,
midterm 2,
final
- Fall 2016 (374)
- Course web site
-
Labs:
1,
1½,
1,
2½,
3,
3½,
4,
4½,
5;
6,
6½,
7,
7½,
8,
8½,
9,
9½,
10,
10½,
11;
12,
12½,
13,
13½,
14,
14½
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
midterm 1,
conflictmidterm 1,
conflict midterm 1,
midterm 2,
conflict midterm 2,
conflict midterm 2,
final,
- Spring 2017 (473)
- Course web site
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
midterm 1,
midterm 2,
final
- Spring 2018 (374)
- Course web site
-
Labs:
All,
1,
1½,
1,
2½,
3,
3½,
4,
4½,
5;
6,
6½,
7,
7½,
8,
8½,
9,
9½,
10,
10½,
11;
12,
12½,
13,
13½,
14
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
midterm 1,
conflict midterm 1,
midterm 2,
conflict midterm 2,
conflict midterm 2,
final,
conflict final
- Fall 2019 (374) —
homeworks and exams,
everything
- Course web site
- Lecture videos
-
Labs:
All,
1,
1½,
1,
2½,
3,
3½,
4,
4½,
5;
6,
6½,
7,
7½,
8,
8½,
9,
9½,
10,
10½,
11;
12,
12½,
13,
13½,
14,
14½
-
Homework:
All,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
-
Exams:
All,
midterm 1 study problems,
midterm 1 practice,
midterm 1,
conflict midterm 1;
midterm 2 study problems,
midterm 2 practice,
midterm 2,
conflict midterm 2;
final study problems,
final,
conflict final
- Spring 2020 (473)
- Course web site
-
Homework:
All,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
-
Exams:
midterm 1,
midterm 2,
final
- Fall 2021 (374) —
homeworks and exams,
everything
- Course web site
- Lecture videos
-
Labs:
All,
1,
1½,
1,
2½,
3,
3½,
4,
4½,
5;
6,
6½,
7,
7½,
8,
8½,
9,
9½,
10,
10½,
11;
12,
12½,
13,
13½,
14,
14½
-
Homework:
All,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
-
Exams:
All,
all with study problems
- Fall 2022 (473)
- Course web site
- Lecture videos
-
Homework:
All,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
-
Exams:
practice midterm 1,
midterm 1,
practice midterm 2,
midterm 2,
practice final,
final
- Fall 2019 (374) —
homeworks and exams,
everything
- Course web site
- Lecture videos
-
Labs:
All,
1a,
1b,
2a,
2b,
3a,
3b,
4a,
4b,
5;
6a,
6b,
7a,
7b,
8a,
8b,
9a,
9b,
10a,
10b,
11;
12a,
12b,
13a,
13b,
14a,
14b,
14b
-
Homework:
All,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
-
Exams:
All,
all with study problems
- Midterm 1:
study problems,
practice exam 1,
practice exam 2,
regular exam,
conflict exam
- Midterm 2:
study problems,
practice exam 1,
practice exam 2,
regular exam,
conflict exam
- Final exam:
study problems,
practice exam 1,
practice exam 2,
regular exam,
conflict exam
2003 Revision
From Fall 2003 to Fall 2014, our required algorithms course was split into separate graduate and undergraduate sections. Course numers for each of these sections varied over time.
- Everything in this section (308 pages)
- Spring 2004 (undergraduate)
- Homework:
0,
1,
2,
3,
4,
5,
6
- Exams:
midterm 1,
conflict midterm 1,
midterm 2,
final,
conflict final
- Fall 2005 (graduate)
- Fall 2006 (undergraduate)
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8
-
Head-banging:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
-
Exams:
midterm 1,
midterm 2,
final
- Spring 2007 (graduate)
- Fall 2008 (graduate)
- Spring 2009 (undergraduate)
-
Homework:
0,
1,
2,
3,
3½,
4,
5,
6,
6½,
6¾,
7,
8,
9,
10
-
Head-banging:
0,
1,
2,
3,
3½,
4,
5,
6,
6½,
6¾,
7,
8,
9,
10,
11
-
Exams:
midterm 1,
midterm 2,
final
- Spring 2010 (undergraduate)
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
-
Head-banging: Missing, sorry.
-
Exams:
midterm 1,
midterm 2,
final
- Fall 2010 (graduate)
- Fall 2012 (undergraduate)
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
-
Head-banging:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
-
Exams:
midterm 1,
midterm 2,
final,
conflict final,
makeup final
- Fall 2013 (undergraduate)
-
Homework:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
-
Head-banging:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
-
Exams:
midterm 1,
conflict midterm 1,
midterm 2,
final,
conflict final
Pre-2003 Revision
Prior to 2003, we offered a single algorithms course that was required for all undergraduate majors and all graduate students (MCS, MS, and PhD) in computer science.