Mo. We., 5:30-6:45, M02-0116
Coursework (Summary notes and PDF slides are posted here)
Date | Announcement | 9/4/2024 | Please make sure you were added to Piazza and Gradescope If not - contact me ASAP. |
10/2/2024 | The first midterm exam will take place on Wed. October 16. Part of the October 9 class will be a review. |
10/2/2024 | HW2 is now due on Oct. 8. | 10/5/2024 | Practice exam for the first midterm is available here. |
10/16/2023 | A solved midterm practice is available here. |
10/28/2024 | HW4 is now due on Nov. 7. |
11/3/2024 | A second midterm practice is available here. |
11/6/2024 | A solved second midterm practice is available here. |
Basic techniques for designing algorithms: divide and conquer, the greedy method, dynamic programming, etc. Applications to searching and sorting algorithms. Complexity of parsing. The fast Fourier transform and its applications (evaluation of polynomials and arithmetical problems). Lower bound theory. NP-hard and NP-complete problems. Probabilistic estimates of algorithms.
See the course syllabus for a detailed list of topics.
The prerequisite is CS220 (Applied discrete math, formerly CS/Math320) or permission from the instructor.
This prerequisite is important. If you have not had it, and done well in it, you may struggle with this course.
Required: Introduction to Algorithms, Fourth Edition |
|
Recommended: The Algorithm Design Manual, Second Edition |
Homework assignments: | 20% (6-7 homework assignments will be given) |
Two Midterm Exams: | 20% each |
Final Exam: | 40% |
Assignment (PDF) | Posted/Given on | Due Date | Suggested solution |
Assignment 1 | Sep. 5, 2024 | Sep. 21, 2024 | Solution |
Assignment 2 | Sep. 21, 2024 | Oct. 8, 2024 (ext.) | Solution |
Assignment 3 | Oct. 9, 2024 | Oct. 21, 2024 | Solution |
Assignment 4 | Oct. 22, 2024 | Nov. 7, 2024 | Solution |
Assignment 5 | Nov. 18, 2024 | Nov. 30, 2024 | Solution |
Week |
Topic |
Book Chapters (4th ed.) |
Session Dates |
Session Info |
Slides/notes |
---|---|---|---|---|---|
1 |
Introduction, basic concepts |
-- |
Wednesday, |
Introduction |
[Lecture notes 1] |
2 |
Intro |
Ch. 3 (order of growth) |
Monday, |
Introduction (cont.) |
Same notes |
Wednesday, |
Intro |
||||
3 |
Generating functions |
Ch. 3,4 |
Monday, |
Runtime |
|
Ch. 6 |
Wednesday, |
Generating functions Heaps |
|||
4 |
Heapsort |
Ch. 6, 7 |
Monday, |
Heapsort |
Same |
Wednesday, |
Quicksort |
[PDF] |
|||
5 |
Sorting |
Sorting: Ch. 7-8 |
Monday, |
Quicksort |
[Stirling] [Stirling] |
Wednesday, |
Linear Sorting Medians |
||||
6 |
Medians |
BST: Ch. 12 |
Monday, |
Finish Medians |
|
Wednesday, |
BST |
||||
7 |
BST |
Chapter 14 |
Monday, |
Columbus/Indigenous |
|
Wednesday, |
Midterm I |
||||
8 |
BST |
BST: Ch. 12 |
Monday, |
BST |
|
Dynamic prog: Ch. 14 |
Wednesday, |
Dynamic Programming |
[PDF - DP] | ||
9 |
Dynamic Programming |
Ch. 14-15 |
Monday, |
Dynamic Programming |
|
Wednesday, |
Greedy algorithms |
|
|||
10 |
Greedy |
Ch. 15 |
Monday, |
Huffman |
Solved practice Midterm |
Wednesday, |
Greedy Midterm review |
||||
11 |
2nd midterm |
Monday, |
Veterans day |
||
Wednesday, |
Midterm II |
||||
12 |
Graph Walks |
Ch. 20 |
Monday, |
BFS |
|
Wednesday, |
DAG |
[DFS] |
Accommodations: Section 504 of the
Americans with Disabilities Act of 1990 offers guidelines for curriculum
modifications and adaptations for students with documented disabilities. If
applicable, students may obtain adaptation recommendations from the Ross Center
for Disability Services, Campus Center, UL Room 211, (617-287-7430). The student
must present these recommendations and discuss them with each professor within a
reasonable period, preferably by the end of Drop/Add period.
Student Conduct: Students are required to
adhere to the University Policy on Academic Standards and Cheating, to the
University Statement on Plagiarism and the Documentation of Written Work, and to
the Code of Student Conduct as delineated in the catalog of Undergraduate
Programs. The Code is available online at:
http://www.umb.edu/life_on_campus/policies/code/
Academic Honesty:
Please read this note about plagiarism and cheating: honesty.pdfResources
Writing Proofs:
This course does not involve any programming per se, although without a doubt
your experiences in building serious programs will help you understand many of
the issues we deal with.
In fact, the course could well be regarded as a mathematics course. I will be
proving things in class, and you will be expected to write formal proofs in your
assignments and on exams. If this is something you are not ready to come to
grips with, you should wait until you are ready to take this class.
There is a style to writing proofs. In fact, there are several styles. Your
goal should be to write proofs that are easy to read and that illuminate the
reason why something is true. This is not easy to do. Good writing of any kind
is difficult, and we will work hard at it all term.
Probably the single most important proof technique in this area is mathematical
induction. I will assume not only that you are familiar with this, but are
comfortable using it. I will not teach it, but I will expect to see inductive
proofs written out clearly and well.
I also expect you to be familiar with standard mathematical notations such as
summations (and of course, integrals). Some of this is reviewed in Appendix A
of the text. I will not review this in class. I expect you to know it, and we
will be using it a lot.
One thing is very important to bear in mind: like any other kind of writing, a
proof must be understandable. If I can't understand what you are
writing, then it can't be correct. And I'm not going to try to guess what you
had in mind. If you are uncertain how to express something, please just talk to
me or send me email, and I'll try to help. But don't even bother writing
something that can't be understood.
Think of this like you would when writing a computer program. If the compiler
or interpreter can't understand it, it's wrong. And you have to be really
careful with your use of language and terms. For instance, one thing beginning
programmers often get mixed up about is the correct use of "or" and "and". The
meaning in computer languages is not the same as in English (or any other
natural language, so far as I know). The same is true in proofs. We use
language in very precise and fixed ways in proofs, and we do this so that what
we write can be understood in its exact meaning by anyone at any time, anywhere
in the world.
Just for a simple example: the sentence "All horses are not white." does
not mean the same as "Not all horses are white." At least, not when
writing proofs. In ordinary English, these two sentences are generally regarded
as equivalent. But for our purposes they are not. You have to be careful about
this.
Here's another example: The symbol "==>" means "implies". It does not
mean "then". So you can write
if x = 3 then x + 5 = 8
or you can write
x = 3 ==> x + 5 = 8
But you cannot write
if x = 3 ==> x + 5 = 8 !!! WRONG !!!
Please try to be careful about things like this. And please don't be offended
if I correct mistakes like this in what you write.
On-line resources:
Two web sites that you might profitably look at are:
On both these web sites you can find lecture notes and videos of course
lectures.