CSCI 264: Homework, Reading and Slides
Week 1
 Slides for this week: Introduction and asymptotic notation  pdf
(ppt)

Tuesday, Aug 29
 Covered in class: course syllabus, see the main course website
 Covered in class: asymptotic notation (Sections 2.1 and 2.2)
 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 (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.

Thursday, Aug 31
 Covered in class: wrapped up asymptotic notation (bigOmega, Theta)
 Covered in class: survey of common running times (Section 2.4), with geometric algorithm examples: linear  point inside a polygon, area of a polygon
 Homework 0: Submit the testthesubmissionsystem homework via the try system, due
Wednesday, September 6, 11:59pm.
This is the only homework that you submit individually  even if you work on it with a partner, every student needs to register
their account with the try system and submit this homework under their own account name.
 Homework 1, due Wednesday, September 13, 11:59
Week 2
 Slides for this week: HeapSort and Priority Queues  pdf
(ppt), Convex Hulls  pdf
(ppt)

Tuesday, Sept 5
 Covered in class: algorithm for the area of a polygon; finished survey of common running times
 Covered in class: a quick refresher on heaps (Section 2.5)

Thursday, Sept 7
 Covered in class: HeapSort revisited, building the heap in O(n) time
 Covered in class: brief discussion of related datastructures: (balanced) binary search trees
 Covered in class: introduction to RadixSort
Week 3
 Slides for this week: Recurrences and MergeSort  pdf
(ppt), followed by More DivideandConquer algorithms, Master Theorem  pdf
(ppt)

Tuesday, Sept 12
 Covered in class: applications of sorting: Convex Hulls via giftwrapping (O(n^{2})) as well as Graham Scan (O(n log n), with the "scan" part taking O(n) time)
 Covered in class: introduction to recurrences and Divide and Conquer algorithms (Chapter 5): MergeSort and the analysis of its running time

Thursday, Sept 14
 Covered in class: solutions of Hw1, Problems 2,3,4
 Covered in class: solving recurrences via the "unrolling the recurrence" and "mathematical induction" techniques
 Covered in class: finished RadixSort
 Covered in class: started Counting inversions (Section 5.3)
 Homework 2, due September 27 (Note: as usual, please contact me if you spot any problem with
the test cases, typos, etc. Also, try is not set up yet...)
Week 4
 Slides for this week: Select Algorithm  pdf
(ppt)

Tuesday, Sept 19
 Covered in class: finished Counting inversions (Section 5.3)
 Covered in class: Master Theorem (not in the book; as a side note, a more general version of the Thm also exists)
 Covered in class: started KaratsubaOfman Algorithm for multiplication of long integers (Section 5.5)

Thursday, Sept 21
 Class outside! :) As such, here are some snapshots of the board as we could not write on the slides.
 Covered in class: finished KaratsubaOfman
 Covered in class: Closest Pair of Points (Section 5.4)
 Covered in class: started the Select algorithm (not in the book, the randomized version is in Section 13.5)
Week 5
 Slides for this week: we will continue with slides posted last week, then we'll get to the
Greedy algorithms vs Dynamic programming: Interval Scheduling and Longest Increasing Subsequence  pdf
(ppt)

Tuesday, Sept 26
 Covered in class: Select algorithm (the deterministic version is not in the book, the randomized version is in Section 13.5)
 Covered in class: solution of Problem 1 on Hw1
 Midterm 1 will take place next Tuesday, 10/3, in class.
Follow the link for more information.

Thursday, Sept 28
 Covered in class: solutions of Problem 5 on Hw1, solutions of Hw2
 Covered in class: lower bound of Omega(n log n) for comparisonbased sorting (not in our textbook)
 Covered in class: started Interval Scheduling
Week 6
 Slides for this week: we will continue with the slides posted last week

Tuesday, Oct 3

Thursday, Oct 5
 Covered in class: unweighted interval scheduling problem (Section 4.1, greedy)
 Covered in class: weighted interval scheduling (Section 6.1, dynamic programming)
 Homework 3, due October 18 (Note: as usual, please contact me if you spot any problem with
the test cases, typos, etc.)
Week 7
Week 8
 Slides for this week: Matrix Chain Multiplication  pdf
(ppt), then Huffman Coding  pdf
(ppt)

Tuesday, Oct 17
 Covered in class: Knapsack (Section 6.4), then we continued with Matrix Chain Multiplication (not in the book but a problem using an analogous intervalbased DP technique is discussed in Section 6.5)

Thursday, Oct 19
 Covered in class: divideandconquer reconstruction of solution for Longest Common Subsequence: O(mn) time and O(m) space (see the end of the older set of slides)
 Homework 3, Problem 0: The due date for this problem only is 10/21
 Homework 4, due November 1
Week 9
 Slides for this week: we will continue with the slides posted last week

Tuesday, Oct 24
 Covered in class: finished Matrix Chain Multiplication
 Covered in class: Solutions of Hw3, problems 0, 1, and 4

Thursday, Oct 26
 Covered in class: Huffman coding (Section 4.8)
Week 10
Week 11
 Slides for this week: Minimum spanning trees and Shortest paths  pdf
(ppt)

Tuesday, Nov 7
 Covered in class: solutions of Hw4, Problem 5
 Covered in class: other applications of BFS/DFS, notably search through configuration space
 Covered in class: finished strongly connected components in linear time
 Covered in class: started minimum spanning trees  Kruskal's algorithm (Section 4.6)

Thursday, Nov 9
 Homework 5, due November 22
Week 12
 Slides for this week: we will continue with last week's slides

Tuesday, Nov 14
 Covered in class: implementation issues with Kruskal's algorithm: the unionfind data structure
 Covered in class: proof of correctness of Kruskal's algorithm

Thursday, Nov 16
 Covered in class: Prim's and Dijkstra's algorithms (Sections 4.5 and 4.4), including proof of correctness, running time estimates, issues with negative weights, directed vs undirected graphs
 Covered in class: BellmanFord algorithm (Section 6.10)
Week 13
 Slides for this week: Introduction to Linear Programming  pdf
(ppt)

Tuesday, Nov 21
 Covered in class: Introduction to linear programming (not in the textbook and the slides are sparse, there was a fair amount of verbal discussion): modeling problems via linear programs, plus geometric intuition
 Take home points about linear programming:
 If we can model a problem as a linear program (see the slides), then we can use many online solvers to get the solution.
 Polynomialtime algorithms for LP exist, though in practice the Simplex algorithm does well (even though it is not polynomialtime in the worst case).
 We sketched the idea behind Simplex  the trouble is that even though the feasible region is a convex manydimensional polyhedron (which is good, we can move from
corner to corner, gradually improving the current solution), the number of corners can be exponential
 Sometimes we want to model a problem using integer programming where the variables are required to take integer values. Unfortunately, integer
programming is NPcomplete! (Something to keep in mind.)
 The shortest path example on the slides is a toy example about how to model a problem as an LP. However, we would simply use the efficient shortest path algorithms instead of relying on an LP solver for shortest paths!
The power of LP is mostly when other algorithmic techniques fail.

Thursday, Nov 17
 No class: Happy Thanksgiving!
 Homework 6, due December 10 (Sunday, extended due to delayed posting)
Week 14
 Slides for this week: Network Flow  pdf
(ppt)

Tuesday, Nov 28
 Covered in class: Flow networks, the FordFulkerson algorithm (Chapter 7) and its running time, the EdmondsKarp variant, MaxFlowMinCut Theorem

Thursday, Nov 30
 Covered in class: proof of correctness of FordFulkersontype algorithms, finding a minimum (s,t)cut in a network, a side discussion about counting problems
 Covered in class: the scaling algorithm, started the analysis of its running time
 Covered in class: Midterm 2 discussion, mostly the solution of Problem 4
Week 15
 Slides for this week: we will continue with Network Flow applications, then P, NP, and NPcompleteness  pdf
(ppt)

Tuesday, Dec 5
 Covered in class: running time analysis of the scaling algorithm
 Covered in class: introduction to NPcompleteness: reductions, class P, the SAT and CLIQUE problems
(see Chapter 8  more precisely, Sections 8.18.4;
skim through Sections 8.58.8 to get an idea about different types of NPcomplete problems  you do not need to study these later sections in detail)

Thursday, Dec 7
 Information about the final exam is here.
 Covered in class: reducing CNFSAT to CLIQUE, class NP, definition of NPcompleteness, CookLevin's theorem, NPcompletness of CLIQUE, INDEPENDENT SET, VERTEX COVER, plus na overview of other NPcomplete problems (HAMILTONIAN CYCLE, TRAVELING SALESMAN PROBLEM)
 Takehome points related to P, NP, NPcomplete (and useful things to remember for the final):
 Definition of classes P, NP, and NPcomplete.
 Looking at a problem, you should be able to recognize 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 witness ("solution"), then describe
a polynomialtime checking (verification) algorithm.
 You should be able to do reductions of about the same difficulty as the problem on the homework (Problem 4, Hw6).
 Big open problem: P = NP (we do NOT know if P=NP).
 NPcomplete problems are the "hardest" problems in NP.
 If somebody finds a polynomialtime algorithm for an NPcomplete problem, then P=NP.
 If somebody shows that there does not exist a polynomialtime algorithm for an NPcomplete problem, then P is not equal
to NP.
 If somebody finds an easy polynomialtime algorithm for an NPcomplete problem,
then this algorithm probably does not work :)
 You should be familiar with the NPcomplete problems we discussed in class and on homework.
 Good luck with all your final exams!