Department of Computer Science

- Final grades are now on LMS. If you see any problem with any of your component grades you can e-mail Sanmay. Thanks for a fun semester!
- Graded homeworks and solution sets are available in a box outside Sanmay's office.
- Welcome to DSA! We will meet on Mondays and Thursdays at noon in DCC 330. The first meeting will be on the 12th of January. Please note that there are several changes from last year's version of the course, including one of the textbooks.

This is a foundational course in the design and analysis of algorithms and the data structures they are coupled with. While we will concentrate on the theoretical design and analysis of algorithms and data structures, we will reinforce the theory with examples, laboratories, and applied homework questions.

The goal of this course is to provide a strong foundation in algorithms and data structures in preparation for jobs in industry or for more advanced courses. Algorithms are the basic language of computer science. After taking this course, you should be able to prove the correctness of and analyze the running times of different algorithms. You should also be able to use different algorithm-design techniques to solve particular problems. Data structures and algorithms also form a major component of any software system. After taking this course you should be able to make intelligent decisions about alternative techniques in the context of practical problems, choosing from existing data structures and algorithms or designing your own when necessary.

Office: Lally 302

Phone: x2782

Office hours: Mondays from 1:30-2:30 PM, or by appointment.

TA: Eyuphan Bulut (email: bulute at cs dot rpi)

Labs: W 2-4 and 4-6

TA: Ashok Sukumaran (email: sukuma at rpi)

Labs: W 10-12 and 12-2

- DPV:
*Algorithms*by Sanjoy Dasgupta, Christos Papadimitriou, and Umesh Vazirani, McGraw-Hill, ISBN 0073523408. - CLRS:
*Introduction to Algorithms (2nd Ed)*by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein, McGraw-Hill, ISBN 0070131511.

Date | Topics | Readings | Extras |

Jan 12 | Introduction. Course policies. Course overview. Fibonacci numbers. Max subsequence sum. | DPV Chapter 0 | Lecture notes |

Jan 15 | Generating random permutations. | CLRS Section 5.3 (Randomized Algorithms) | Notes |

Jan 22 | Basic arithmetic, modular arithmetic. | DPV Sections 1.1, 1.2. CLRS Sections 31.1, 31.2. | |

Jan 26 | Modular division.Intro to divide-and-conquer (integer multiplication) | DPV Sections 1.2, 2.1. | |

Jan 29 | Divide-and-conquer contd. Master theorem. Mergesort. Median-finding. | DPV Sections 2.2-2.4. | |

Feb 2 | Quicksort. Matrix multiplication | CLRS Chapter 7. DPV 2.5. | |

Feb 5 | Graphs. Depth-first search. | DPV 3.1-3.3. CLRS 22.1, 22.3. | |

Feb 9 | Topological sort. Strongly connected components. | DPV 3.4. CLRS 22.4, 22.5. | |

Feb 12 | Breadth-first search. Edge lengths. Dijkstra's algorithm. | DPV 4.1-4.4. CLRS 22.2, 24.3. | |

Feb 17 (Tue class) | Heaps. Negative edge-lengths. The Bellman-Ford Algorithm. | DPV 4.5-4.7. CLRS 24.1-24.2. | |

Feb 19 | Creating heaps. Heapsort. Merging and binomial heaps. | CLRS Chapter 6 and 19.1 | |

Feb 23 | Binomial heaps. Intro to amortized analysis. | CLRS Chapter 19. | |

Feb 26 | Amortized analysis. Lazy merging. AVL trees. | CLRS Chapter 17.3. Wikipedia page on AVL trees. | |

Mar 2 | Midterm. | ||

Mar 5 | Midterm solutions presented by Eyuphan and Ashok. | ||

Mar 16 | Splay trees. | Pages 652-659 of Sleator and Tarjan (RPI access only). | |

Mar 19 | Universal hashing. Cuckoo hashing. | DPV Section 1.5, Rasmus Pagh's notes on cuckoo hashing. | |

Mar 23 | Minimum spanning trees. Kruskal's algorithm.Disjoint sets. | DPV Section 5.1, CLRS Sections 21.1, 21.3, Chapter 23. | |

Mar 26 | MSTs contd. Prim's algorithm. Union-by-rank with path compresson for disjoint sets. | DPV Section 5.1, CLRS Chapter 23, Section 21.4. | |

Mar 30 | Greedy algorithm design. Huffman encoding. | DPV Section 5.2. CLRS Section 16.3. | |

Apr 2 | Horn formulas. A greedy approximation for set cover. Intro to dynamic programming. | DPV Sections 5.3, 5.4, 6.1, 6.2. | |

Apr 6 | Dynamic programming contd. Edit distance, knapsack. | DPV 6.3, 6.4. | |

Apr 9 | More DP. Chain matrix multiplication. All-pairs shortest paths. | DPV 6.5, 6.6. | |

Apr 13 | DP for TSP, Indepdendet Sets on Trees. Flow networks and max flow. | DPV 6.6, 6.7, 7.2. CLRS 26.1, 26.2. | |

Apr 16 | More max flow. Introduction to NP completeness. | CLRS 26.3. DPV Chapter 8. | |

Apr 20 | NP completeness reductions. SAT and problems on graphs. | DPV Chapter 8. CLRS Chapter 34. | |

Apr 23 | More NP completeness. 3-d Matching, ZOE, etc. | DPV Chapter 8. CLRS Chapter 34. | |

Apr 27 | Wrap-up. Seriously hard problems. | DPV Chapter 8. |

Jan 21: Lab 1

Feb 4: Lab 2 (Files necessary for Lab 2 are here (gzipped tarball))

Feb 18: Lab 3 (Files necessary for Lab 3 are here (gzipped tarball))

Mar 25: Lab 4 (File necessary for Lab 4 is here)

Apr 8: Lab 5 (Files necessary for Lab 5 are here)

Apr 22: Lab 6 (Files necessary for Lab 6 are here)

HW2: Due Feb 9.

HW3: Due Feb 17.

HW4: Due Feb 26.

HW5: Due Mar 30.

HW6: Due Apr 9.

HW7: Due Apr 16.

HW8: Due Apr 27.