4005-800-01: Homework, Quizzes, Reading and Slides
Week 1
- Slides for this week: Introduction - pdf
(ppt),
MergeSort/HeapSort/RadixSort - pdf
(ppt)
-
Monday, Nov 29
- Covered in class: Course logistics, see the main course website
- Covered in class: Introduction to Algorithms and asymptotic analysis (read Chapter 1 and Sections 2.1
and 2.2 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.
- 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 and
practice submitting code on MyCourses.
Wednesday, Dec 1
- Covered in class: Survey of common running times (Section 2.4)
- Covered in class: Some linear-time geometric algorithms: point inside a polygon,
area of a polygon (not in the book)
- Covered in class: MergeSort and introduction to recurrences (Section 5.1), RadixSort (not in the book)
- For practice: Trace MergeSort on an array of size 8 or more. Trace RadixSort
(the pseudo code is on the last slide).
- Announcement: No office hours on Tuesday, Dec 7.
Homework 1, due 12/10 4: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 6
- Covered in class: HeapSort (Section 2.5)
- Covered in class: A lower-bound on comparison-based sorting Omega(n log n) (not in the book)
- Covered in class: introduction to convex hulls (not in the book)
- Recall: next class, quiz 1 on material covered in week 1.
-
Wednesday, Dec 8
- 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: O(n log n) convex hull algorithms - Graham Scan and a divide-and-conquer approach (not in the book)
- Covered in class: introduction to Median/Select (the worst-case O(n) is not in the book but the randomized version is in Section 13.5) - we will analyze the algorithm on Monday
- Check your e-mails for feedback on the practice homework submissions.
- Homework 2, due 12/17 4:00pm: click here
- Additionally, here are several bonus problems related to the material covered so far. There is no partial credit for bonus problems. I will keep your bonus scores separately from the regular homeworks score and add it to your homework score at the end of the quarter.
You do not need to submit implementation at this point. I might request an implementation later if I am having a hard
time understanding your pseudocode. Hand in your bonus solutions directly to me, either in class or during office hours.
Week 3
- Slides for this week: we will continue with last week's slides, after that
Huffman coding and the Knapsack problem - pdf
(ppt)
-
Monday, Dec 13
- Covered in class: the Select algorithm and its analysis
- Covered in class: solutions of Hw1
-
Wednesday, Dec 15
- Covered in class: Huffman Coding (Section 4.8)
- Covered in class: the divisible Knapsack, introduction to the indivisible Knapsack (Section 6.4)
- In class: quiz 2.
- Have a nice winter break.
- Homework 3, due 1/7 4:00pm: click here
Week 4
- Slides for this week:
Interval Scheduling and the Longest Increasing Subsequence - pdf
(ppt)
-
Monday, Jan 3
- Covered in class: Knapsack, indivisible version (Section 6.4)
- Covered in class: introduction to Interval Scheduling (Sections 4.1 and 6.1-2)
-
Wednesday, Jan 5
- In class: quiz 3.
- Covered in class: Interval Scheduling, scheduling all intervals and the weighted case
- Covered in class: Longest Increasing Subsequence (not in the book)
- Covered in class: solutions of Hw2, problem 3 (for problem 1, visit the tutoring center -
or for any other previous homework problems; I will come back to problem 2 next week)
- Homework 4, due 1/14 4:00pm: click here
Week 5
- Slides for this week: Longest Common Subsequence and Matrix Chain Multiplication - pdf
(ppt),
Sequence Alignment - pdf
(ppt)
-
Monday, Jan 10
- Covered in class: Longest Common Substring/subsequence (not in the book but a similar problem is discussed in Section 6.6)
- 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: solutions of hw3 (if you have any doubts regarding any of the homework solutions,
please visit our tutoring center)
- Note: due to conflicts with other meetings, the Tuesday office hours have been permanently
rescheduled to Monday 2-3pm, 8-8:30pm and Wednesday 8-8:30pm (for the evening office hours I may leave
with the last person so please come at 8pm).
- Next week: midterm
-
Wednesday, Jan 12
- In class: quiz 3.
- Covered in class: Master Theorem revisited
- Covered in class: Sequence Alignment (Sections 6.6 and 6.7)
- Recall: midterm, next Wednesday.
- No homework due next week.
Week 6
- Slides for this week: Introduction to Graph Algorithms: BFS,DFS - pdf
(ppt)
-
Monday, Jan 17
- Covered in class: solutions of Hw4, and the DVD problem from Hw2.
- Covered in class: introduction to graph algorithms (Chapter 3) - I accidentally overwrote our slides, so I am posting the slides from the 6pm section
-
Wednesday, Jan 19
- Homework 5, due 1/28 4:00pm: click here
Week 7
- Slides for this week: Minimum spanning trees and Shortest paths - pdf
(ppt)
-
Monday, Jan 24
- Covered in class: solutions of the midterm
- Covered in class: BFS, DFS, their O(n+m) running time, topological sort (Chapter 3)
- Inputs used for grading your homeworks are now available here. (At this time there are inputs for Hw3 and Hw4, I'll add the inputs for Hw1 and Hw2 soon.)
-
Wednesday, Jan 26
- In class: quiz 5
- Covered in class: Strongly connected components
- Covered in class: Minimum Spanning Trees (Kruskal, Prim) - Sections 4.5 and 4.6
- Note about the slides: color does not always show properly in the pdf files so if in doubt, please check the ppt source
- Final exam date/time: Wednesday, Feb 23, 6-8pm
- Homework 6, due 2/4 4:00pm: click here
Week 8
- Slides for this week: we will continue with last week's slides, then Network Flow - pdf
(ppt)
-
Monday, Jan 31
- Covered in class: Kruskal's algorithm revisited, the Union-Find datastructure (Sections 4.5 and 4.6)
- Covered in class: Dijkstra's algorithm (Section 4.4)
- Covered in class: the Floyd-Warshall algorithm (not in the book)
- Covered in class: solution of Problem 1, Hw 5
-
Wednesday, Feb 2
- In class: quiz 6
- Covered in class: the Floyd-Warshall's algorithm (not in the book)
- Covered in class: the Bellman-Ford's algorithm (Sections 6.8-6.10)
- Covered in class: solutions of Problems 2 and 3 from Homework 5
- 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/11 4:00pm: click here
Week 9
- Slides for this week: we will cover the material from the last week's slides
-
Monday, Feb 7
- Covered in class: Ford-Fulkerson, Edmonds-Karp algorithms (Chapter 7)
-
Wednesday, Feb 9
- In class: quiz 7.
- Covered in class: Ford-Fulkerson revisited (the proof of correctness)
- 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/18 4:00pm: click here
Week 10
- Slides for this week: NP-completeness - pdf
(ppt)
-
Monday, Feb 14
- Information about the final exam is here.
- Covered in class: a very brief introduction to linear programming (Section 11.6)
- Covered in class: solutions of Hw7
- Covered in class: P, NP, NP-complete (Chapter 8)
- 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 from 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 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 we discussed in class.
-
Wednesday, Feb 16
- In class: quiz 8.
- Covered in class: finished NP-completeness (Chapter 8)
- Zach's tutoring hours during the final week: Wednesday, Feb 23, 3-6pm.
- Good luck with your finals!