Some of the skills that you will develop in this course may be quite new to you, and different from things you have done in previous courses. This is good: it means you're learning new and (I hope) exciting things. However, it means that you will need practice to master them. Just participating in classes isn't enough. There are suggested exercises from the textbook. Web pages for this course in previous terms also include many more problems to work on. The books listed below under "Additional Resources" include more exercises. Do lots.
You learn by struggling with problems. However, if you get too stuck or don't know how to begin, help is available. Talk to your classmates (however; see the notes below about academic honesty regarding discussing assignment problems with others). Go to office hours; the instructor and TA are there to help you! You also learn by making mistakes and getting feedback about them. Just make sure that you use the feedback to improve your understanding.
Groups of students can learn a lot by explaining their solutions to the suggested exercises from the textbook to one another and critiquing the solutions of others. After all, learning how to explain solutions clearly is one of the learning objectives of this course. Seeing where other students' solutions are unclear to you helps you make your own explanations clearer. Be aware that a problem may have many different correct solutions; just because someone's solution is different from yours doesn't necessarily mean that one of them is wrong.
It takes time to build new skills, so it helps if you work on exercises regularly: don't leave all the work to the days right before a test.
Although you may discuss the general approach to solving a homework problem with other people, you should not discuss the solution in detail. You must not take any written notes away from such a discussion. Also, you must list on the cover page of your solutions any people with whom you have discussed the problems. The solutions you hand in should be your own work. While writing them, you may look at the course textbook and your own lecture notes but no other outside sources.
It is not acceptable to try to find the answer to a homework question on the web or using AI tools (such as LLM-based software), put it in your own words and submit it. You may learn a little by doing this, but you will learn much, much more by working on the problem yourself, and the purpose of this course is to help you learn how to design and analyze algorithms on your own. Furthermore, AI tools and the web will not be available during your exam (or during your job interview at Google), so you should learn to solve problems yourself, instead of relying on others to do your thinking for you.
As time runs out, students are sometimes tempted to get help from other students on assignments in a way that would violate the preceding policy on academic honesty. DO NOT DO THIS! If you do, I will refer the case to the Dean's Office, which will be very unpleasant for you. The assignments are worth very little, so it is not worth risking a sizable punishment. (Furthermore, I have noticed that the students who cheat on the homework assignments almost always fail the tests and exams, so even if I do not catch you cheating, you will likely fail the course if you do not do your own work on the homework assignments.)
It is important that you look at the senate policy on academic honesty and the faculty's academic integrity resources.
Homework exercises | 15% |
Quiz | 5% |
Test #1 | 20% |
Test #2 | 20% |
Exam | 40% |
It's a very good idea to type your solutions to homework assignments, since it allows you to edit and polish the answers, but handwritten solutions are also acceptable, as long as they are legible. If you want to type your solutions, LaTeX produces elegantly typeset documents, is available for free, and was built to handle even the most complicated mathematical notation. It can take a while to learn how to use it, but once you do, you will probably not want to type documents any other way.
You should make every effort to make your answers as brief as possible, while still being thorough. Brevity requires careful thought and editing. (Pascal once excused himself for writing a long letter, saying that he did not have enough time to write a shorter one.) Students who write copious amounts usually do not know what they want to say, or are saying it in a very disorganized way. Usually, an answer to a homework question should fit on one sheet of paper. If you are writing much more than that, you probably have not found the best way to solve it. On tests, your answer should usually fit into the space provided for it.
First class | Monday, January 6 |
Quiz | Thursday, January 23 in CLH D |
Test 1 | Thursday, February 6 in CLH A |
Reading week (no classes) | February 17-21 |
Last date to drop course without receiving a grade | Friday, March 14 |
Test 2 | Thursday, March 20 in CLH D |
Last class | Thursday, April 3 |
Last date to withdraw from course (receiving W on transcript) | Friday, April 4 |
Exam period | April 8-25 |
Date | Topics | Reading in CLRS (4th ed) | Suggested questions, mostly from CLRS (4th ed) | Alternate reading in DPV |
January 6 | Introduction | 1; optional supplementary reading: Boyer-Moore algorithm and notes on correctness | 1-1 | |
January 8 | Proving loops correct. Two examples of multiplication algorithms. | 2.1, 2.2 | 2.1-2, 2.1-4, 2.1-5, 2.2-2, 2.2-4 | 1.1 |
January 9 | Example of proving loop correct: binary search | Section 5.1 of Parberry's book | ||
January 13 | Euclid's algorithm, recursive algorithms | 2.3, 31.2 up to Lame's Theorem | 31.2-8, 2.3-2, 2.3-3, 2.3-5 to 2.3-8 | 1.2.3 |
January 15 | Proving recursive algorithms correct. Examples: repeated squaring, binary search | 2.3.1, p.934-935, | 2-3, Section 5.2 of Parberry's book | 1.2 up to end of 1.2.2, 2.3 |
January 16 | Review of asymptotic notation, examples of proofs of correctness | 3 | 3.2-1, 3.2-2, 3.2-3, 3.2-5, 3.3-8, 3-2 | 0.3 |
January 20 | Divide and Conquer | 4.0-4.2, time bound for fast multiplication | 4.1-3, 30-1 | 2.1 |
Jan 22 | Analyzing divide-and-conquer algorithms | 4.3-4.5 | 4.3-1, 4.4-1, 4.5-1 | 2.2 |
Jan 27 | Linear time selection | 9.1, 9.3 (and skim 9.2) | 9.1-1, 9.1-2, 9.1-3, 9.3-1, 9.3-6, 9.3-7, 9.3-8, 9.3-9, 9.3-10, 9-1 | 2.4 |
Jan 29 | Finding the closest pair of points; Sorting lower bound | Section 33.4 (in chapter on Computational Geometry) from removed material, 8.1 | 33.4-1, 33.4-6 in removed material; 8.1-1, 8-6 | pp.52-53 |
Jan 30 | Review of sorting techniques | pages 157-204 (this should be a review) | 6.1-1 to 6.1-6, 6.2-7, 6.4-2, 6.4-4, 6.5-7, 6-2, 7.2-4, 7.3-1, 7-1, 7-2 | |
Feb 3 | Counting Sort, Radix Sort | 8.2, 8.3 | 8.2-1, 8.2-3, 8.2-5, 8.2-6, 8.2-7, 8.3-2, 8.3-4, 8.3-5, 8-2, 8-3 | |
Feb 5 | Bucket sort | Use C.2, C.3 as references if you need to look up something about probability. 8.4 | 8.4-1, 8.4-2, 8.4-5 | |
Feb 10 | One-dimensional Dynamic Programming (canoe rental, rod cutting) | 14.1 | 14.1-2, 14.1-3, 14.1-6, 14-4, 14-11 | 6.1, 6.2 |
Feb 12 | Two-dimensional Dynamic Programming | 14.2-14.4 | 14.2-1, 14.2-3, 14.3-3, 14.3-4, 14-2 | 6.3, 6.4, 6.5 |
Feb 13 | Examples of dynamic programming | 14.4-1, 14.4-5, 14.9 | 6.6 | |
Feb 24 | Dynamic programming, continued | |||
Feb 26 | All pairs shortest paths, including Floyd-Warshall algorithm | 23.1, 23.2 | 23.1-3, 23.1-7, 23.1-8, 23.2-4, 23.2-5 | pp.172-173 |
Feb 27 | More examples of dynamic programming | |||
Mar 3 | Greedy algorithms | 15.1, 15.2 | 15.1-2, 15.1-3, 15.1-4, 15.2-1, 15.2-4, 15.2-5 | |
Mar 5 | Greedy algorithms, continued | 15.3, 15.4 | 15.4-1, 15.4-2, 15-2 | |
Mar 6 | Graphs | 22.0 | 3.1 | |
Mar 10 | Minimum Spanning Trees: Kruskal's Algorithm | 20.1, 21 | 21.1-1, 21.1-6, 21.1-7, 21.2-2, 21.2-4, 21.2-5 | 5.1 up to 5.1.3 |
Mar 12 | MSTs continued: Prim's algorithm | 5.1.5 | ||
Mar 17 | Single-source shortest paths using Dijkstra's algorithm | 22.0, 22.3 | 22.3-2, 22.3-3, 22.3-5, 22.3-7, 22.3-9 | 4.3, 4.4, review 4.5 |
Mar 19 | Graph Algorithms | 20.1, 20.2 | 20.1-1 to 20.1-6, 20.1-8, 20.2-2, 20.2-4, 20.2-6, 20.2-7 | 4.1, 4.2 |
Mar 24 | Graph Algorithm | 20.3, 20.4 | 20.3-1, 20.3-2, 20.3-4, 20.3-7, 20.3-8, 20.3-10, 20.3-11, 20.4-2, 20.4-3, 20.4-5 | 3.2,3.3 |
Mar 26 | Strongly connected components | 20.5 | 20.5-1, 20.5-3, 20.5-7 | 3.4 |
Mar 27 | Examples of solving problems using graph algorithms | |||
Mar 31 | Maximum Flow | 24.1, 24.2 | 24.1-2, 24.1-6, 24.1-7, 24.2-2, 24-1 | |
Apr 2 | Brief introduction to NP-completeness | 34.0-34.3 | 34.1-1, 34.1-5 | 8.1, 8.2 |
Updated April 16, 2025