Rensselaer Polytechnic Institute
Department of Computer Science

CSCI 2300: Data Structures and Algorithms

Spring 2009



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.


Instructor: Sanmay Das
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



There are two textbooks for this class


This is not a programming class. The labs involve programming, but you are expected to be a competent C++ programmer coming in -- the lectures will not discuss any code. The TAs and UTAs can provide some help on programming issues in lab. Neither of the textbooks deals with programming issues at all. You may want to consult your textbooks from CS2, or Stroustrup's The C++ Programming Language.


Lectures will be on Mondays and Thursdays from 12pm to approximately 1:30pm in Darrin 330.  The "Mathematical Background" appendix of CLRS is background reading for the whole class.  
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 14: No lab
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)


HW1: Due Jan 29.
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.