4005-800-70: Announcements, Homework, and Slides
Week 1
- Slides for this week: Introduction - pdf
(ppt),
MergeSort/HeapSort/RadixSort - pdf
(ppt)
-
Monday, Nov 28
- Covered in class: Course logistics, see the main course website
- Covered in class: Introduction to Algorithms and asymptotic analysis (Chapter 1 and Sections 2.1, 2.2, and 2.4)
- Covered in class: Some geometric algorithms: point inside a polygon, area of a polygon (not in the book)
- A note for students with disabilities:
RIT is committed to providing reasonable accommodations to students with disabilities.
If you would like to request accommodations such as special seating, testing modifications,
or note taking services due to a disability, please contact the Disability Services Office.
It is located in the Eastman Building, Room 2342; the Web site is www.rit.edu/dso.
After you receive accommodation approval, it is imperative that you see me during office hours
so that we can work out whatever arrangement is necessary.
- Announcement: I will be at a workshop on January 11, 2012 and the class will be canceled on that day. To make up for the lost class, I will hold an extra midterm review
session at the end of week 5 or early in week 6. Details will be announced early in January.
- Homework 0: Solve this practice homework to test the submission system: click here.
The homework is worth 0 points. Its purpose is to understand the file-naming convention, practice reading from the standard input and writing to the standard output,
and practice submitting code on MyCourses. I strongly recommend to submit this homework to make sure you understand the submission setup -
I will not accept subsequent homeworks that do not adhere to the submission guidelines.
Wednesday, Nov 30
- Covered in class: Area of a polygon, pseudocode, and the correctness argument
- Covered in class: MergeSort and introduction to recurrences (Section 5.1), Heaps (Section 2.5)
- Next class: quiz 1.
Homework 1, due 12/7 3:00pm: click here
Week 2
- Slides for this week: we will continue with last week's slides; after that
Convex Hulls - pdf
(ppt) and
Select/median algorithm - pdf
(ppt)
-
Monday, Dec 5
- In class: quiz 1.
- Covered in class: briefly talked about (balanced) binary search trees - you should know that they exist,
you do not need to know how addition/deletion works
- Covered in class: A lower-bound on comparison-based sorting Omega(n log n) (not in the book)
- Covered in class: Radix Sort (not in the book)
- Covered in class: the deterministic Select algorithm (the deterministic version is not in the book, the randomized version is in Section 13.5)
-
Wednesday, Dec 7
- Covered in class: Analyzed the running time of the Select algorithm
- Covered in class: Solutions of Hw1
- Covered in class: Briefly discussed algorithms for the Convex Hull problem
- Homework 2, due 12/14 3:00pm: click here
Week 3
Week 4
- Slides for this week:
Huffman coding and the Knapsack problem - pdf
(ppt)
-
Monday, Jan 9
- In class: quiz 2.
- Covered in class: reconstructing dynamic programming solutions, after having computed the optimal value
- Covered in class: started the Knapsack problem (Section 6.4) - the book first discusses a simpler variant of the indivisible Knapsack: the Subset-Sum problem
-
Wednesday, Jan 11
- Class canceled due to an out-of-town workshop. There will be extra out-of-class midterm review sessions to make up for this class. One review session will be held
on Monday at noon in room 1610 and one on Wednesday at 10am in room 3000 (due to a scheduling conflict, I had to change the time), both in week 6. (Unfortunately, my schedule on Tuesday is full...)
These sessions are in addition to Zach's tutoring sessions on Friday.
- Homework 4, due Saturday 1/21 4:00pm: click here
Week 5
- Slides for this week: Longest Common Subsequence and Matrix Chain Multiplication - pdf
(ppt)
-
Monday, Jan 16
- In class: quiz 3.
- Covered in class: finished Knapsack
- Covered in class: the Longest Common Substring/subsequence problem (not in the book but a very similar problem is discussed
in Section 6.6)
-
Wednesday, Jan 18
- Covered in class: Matrix Chain Multiplication (not in the book but a similar interval-based dynamic programming
technique is used in Section 6.5)
- Covered in class: Huffman coding (Section 4.12, we will finish the proof of correctness on Monday)
- Covered in class: solutions of Hw3
- Test inputs for Hw 2 can be found here. I will keep posting the inputs for subsequent homeworks at the same location.
(I will not repost the inputs that have been posted with the homework assignment.)
- Recall: midterm, next week on Wednesday, January 25, in class.
- No homework due next week.
Week 6
- Slides for this week: Introduction to Graph Algorithms: BFS,DFS - pdf
(ppt)
-
Monday, Jan 23
-
- Covered in class: finished the proof of correctness for Huffman
- Covered in class: solutions of Hw4.
- Covered in class: introduction to graph algorithms (Chapter 3)
-
Wednesday, Jan 25
- In class: midterm.
- Recall: quiz on Monday, January 30th - the quiz will cover topics from weeks 5 and 6.
- Homework 5, due 2/1 3:00pm: click here
Week 7
- Slides for this week: we will continue with last week's slides, then: Minimum spanning trees and Shortest paths - pdf
(ppt)
-
Monday, Jan 30
- In class: quiz 4.
- Covered in class: BFS, DFS, their O(n+m) running time, topological sort (Chapter 3)
- Covered in class: solutions of the midterm
-
Wednesday, Feb 1
- Covered in class: Strongly connected components, mentioned other applications of DFS and BFS
- Covered in class: Minimum Spanning Trees (Prim) - Section 4.5, we will do the proof of correctness on Monday
- Covered in class: Solutions of Hw 5
- Final exam date/time: Monday, Feb 27, 6-8pm. Please let me know of any conflicts by the end of week 8.
- Homework 6, due 2/8 3:00pm: click here
Week 8
- Slides for this week: we will continue with last week's slides, then Network Flow - pdf
(ppt)
-
Monday, Feb 6
- In class: Quiz 5.
- Covered in class: Proof of correctness of Prim
- Covered in class: Kruskal's algorithm, the Union-Find datastructure (Sections 4.5 and 4.6)
- Covered in class: Dijkstra's algorithm (Section 4.4)
-
Wednesday, Feb 8
- Covered in class: Proofs of correctness of Kruskal and Dijkstra
- Covered in class: the Floyd-Warshall algorithm (not in the book)
- Covered in class: the Bellman-Ford's algorithm (Sections 6.8-6.10)
- Covered in class: solutions of Homework 6
- This is the end of week 8 - please keep in mind that the last chance to withdraw from the class is this Friday.
- Homework 7, due 2/15 3:00pm: click here
Week 9
- Slides for this week: we will cover the material from the last week's slides
-
Monday, Feb 13
- In class: quiz 6.
- Covered in class: Network flow (Chapter 7)
- Note: I updated (simplified) Problem 3 on Homework 7.
- Note: My color-coding of edges on the slides (e.g., using blue for the backward edges) does not show well on the pdf slides -
for some reason the pdf colors do not always reflect the colors used on the PowerPoint slides. If you are confused with the colors, please
check the original ppt file.
-
Wednesday, Feb 15
- Covered in class: Ford-Fulkerson revisited (the proof of correctness and the running time estimate)
- Covered in class: Applications of Flow Networks (multiple sources/sinks, finding a minimum cut,
maximum number of edge-disjoint s-t paths, maximum bipartite matching - see Chapter 7 for these and more applications)
- Homework 8, due 2/22 2:22pm (ok, it's really 3pm but I could not resist): click here
Week 10
- Slides for this week: NP-completeness - pdf
(ppt)
-
Monday, Feb 20
- Information about the final exam is here.
- In class: quiz 8.
- Covered in class: a very brief introduction to linear programming (Section 11.6)
- Covered in class: P, NP, NP-complete (Chapter 8) - we will finish it on Wednesday
- Reminder: Homework test inputs (additional to the ones posted at the homework websites): click here
- Take-home points related to P, NP, NP-complete (and useful things to remember for the final):
- Definition of classes P, NP, and NP-complete.
- Looking at a problem, you should be able to recorgnize basic problems in P (like the decision versions of most of
the problems from class).
- You should be able to sketch the proof that a problem is in NP - specify the solution (also known as the witness), then describe
a polynomial-time verification algorithm.
- You should be able to do reductions of about the same difficulty as the problem on the homework (Problem 3, Hw8).
- Big open problem: P = NP (we do NOT know if P=NP).
- NP-complete problems are the "hardest" problems in NP.
- If somebody finds a polynomial-time algorithm for an NP-complete problem, then P=NP.
- If somebody shows that there does not exist a polynomial-time algorithm for an NP-complete problem, then P is not equal
to NP.
- If somebody finds an easy polynomial-time algorithm for an NP-complete problem,
then this algorithm probably does not work :)
- You should be familiar with the NP-complete problems discussed in class.
-
Wednesday, Feb 22
- Covered in class: finished NP-completeness (Chapter 8)
- Covered in class: solutions of Hw8
- Good luck with your finals!