CSCI 264: Homework, Reading and Slides
- Slides for this week: Introduction and asymptotic notation - pdf
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 (big-Omega, 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 test-the-submission-system 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
- Slides for this week: HeapSort and Priority Queues - pdf
(ppt), Convex Hulls - pdf
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
- Slides for this week: Recurrences and MergeSort - pdf
(ppt), followed by More Divide-and-Conquer algorithms, Master Theorem - pdf
Tuesday, Sept 12
- Covered in class: applications of sorting: Convex Hulls via gift-wrapping (O(n2)) 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...)
- Slides for this week: Select Algorithm - pdf
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 Karatsuba-Ofman 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 Karatsuba-Ofman
- 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)
- 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
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 comparison-based sorting (not in our textbook)
- Covered in class: started Interval Scheduling
- 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.)
- Slides for this week: Matrix Chain Multiplication - pdf
(ppt), then Huffman Coding - pdf
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 interval-based DP technique is discussed in Section 6.5)
Thursday, Oct 19
- Covered in class: divide-and-conquer 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
- 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)
- Slides for this week: Minimum spanning trees and Shortest paths - pdf
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
- 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 union-find 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: Bellman-Ford algorithm (Section 6.10)
- Slides for this week: Introduction to Linear Programming - pdf
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.
- Polynomial-time algorithms for LP exist, though in practice the Simplex algorithm does well (even though it is not polynomial-time in the worst case).
- We sketched the idea behind Simplex - the trouble is that even though the feasible region is a convex many-dimensional 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 NP-complete! (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)
- Slides for this week: Network Flow - pdf
Tuesday, Nov 28
- Covered in class: Flow networks, the Ford-Fulkerson algorithm (Chapter 7) and its running time, the Edmonds-Karp variant, Max-Flow-Min-Cut Theorem
Thursday, Nov 30
- Covered in class: proof of correctness of Ford-Fulkerson-type 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
- Slides for this week: we will continue with Network Flow applications, then P, NP, and NP-completeness - pdf
Tuesday, Dec 5
- Covered in class: running time analysis of the scaling algorithm
- Covered in class: introduction to NP-completeness: reductions, class P, the SAT and CLIQUE problems
(see Chapter 8 - more precisely, Sections 8.1-8.4;
skim through Sections 8.5-8.8 to get an idea about different types of NP-complete 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 CNF-SAT to CLIQUE, class NP, definition of NP-completeness, Cook-Levin's theorem, NP-completness of CLIQUE, INDEPENDENT SET, VERTEX COVER, plus na overview of other NP-complete problems (HAMILTONIAN CYCLE, TRAVELING SALESMAN PROBLEM)
- 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 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 polynomial-time 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).
- 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
- 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 and on homework.
- Good luck with all your final exams!