CMPSC 465 Data Structures and Algorithms
Spring 2012

Welcome to the course web page for CMPSC 465!

Course Staff

Office Phone Email Office Hours
Prof. Adam D. Smith IST 338K 814-863-0076 asmith+465 MWF 11:15-noon and Friday 3:30-4:30pm
T.A. Megan Heysham IST 338E meh339+465 Wed 1pm-3pm
T.A. Yang Xiao IST 351 yux106+465 Wed 3pm-5pm


January 9, 2012
First lecture in 114 EES (Earth & Eng. Sci. building)!
January 11, 2012
We will be using as a discussion board for this class. You can find the course discussion board in the Spring 2012 semester listings (under CMPSC 465).

Lecture notes, syllabus, etc.

1Mon, Jan 9pdf Introduction CLRS Ch. 1,2.1HW 1 out: pdf
2Wed, Jan 11Review of induction, loop invariants CLRS Ch. 2.1, 2.2
3Fri, Jan 13pdfPerformance analysis, intro to asymptotic growth CLRS Ch. 3.1HW 2 out: pdf, HW 1 due
4Wed, Jan 18Asymptotic notation, common functions CLRS Ch. 3
5Fri, Jan 20Wrapping up asymptotics CLRS Ch. 3HW 3 out: pdf
6Mon, Jan 23pdfRecursion: exponentiation, mergesort CLRS Ch. 2.3, 4.4
7Wed, Jan 25pdfDivide-and-conquer: Karatsuba CLRS Ch. 4Prog. assignment 1 out: pdf
8Fri, Jan 27Divide-and-conquer, wrap-up CLRS Ch. 4.1HW 4 out: pdf
9Mon, Jan 30pdfRecurrences: substitution CLRS Ch. 4.3
10Wed, Feb 1pdfRecurrences: master method, more examples. CLRS Ch. 4.4, 4.5
11Fri, Feb 3pdfAbstract Data Types CLRS Ch. 10.1HW 5 out: pdf
12Mon, Feb 6pdf Backtracking: Weighted Interval Scheduling CLRS Ch. 15
13Wed, Feb More backtracking: Generating subsets CLRS Ch. 15
14Fri, Feb 10Dynamic programming: Recurrences, WIS CLRS Ch. 15
15Mon, Feb 13pdf Dynamic programming: Segmented Least Squares CLRS Ch. 15.1 and 15.3
16Wed, Feb 15pdf Two-dimensional DP: Longest common subsequence CLRS Ch. 15.4
17Fri, Feb 17pdf Greedy algorithms: Interval Scheduling (a.k.a. Activity Selection) CLRS Ch. 16.1
18Mon, Feb 20Greedy algorithms: Interval Partitioning, Minimizing lateness CLRS Ch. 16.1
19Wed, Feb 22 Exam review
Wed, Feb 22 Midterm 1 at 8:15pm in 110 Wartik (Practice exam 1: pdf)
20Fri, Feb 24 pdfTrees, heaps CLRS Ch. 6.1
21Mon, Feb 27Heaps
-Wed, Feb 29 No lecture
22Fri, Mar 1pdf Binary Search TreesCLRS CHap. 12
23Mon, Mar 12 Binary Search Trees
24Wed, Mar 14 pdf Red-Black TreesCLRS CHap. 13
25Fri, Mar 16 - Augmented Data Structures: OS Trees (M. Heysham)CLRS Chap 14.1-2
26Mon, Mar 19 - Augmentation: Interval Trees CLRS Chap 14.3
-Wed, Mar 21 No lecture
27Fri, Mar 23 Hash tables, combining data structures
28Mon, Mar 26pdf How to Study for an Algorithms Exam, and review
29Wed, Mar 28 Midterm review
Wed, Mar 28 Midterm 2 at 8:15pm in 111 Wartik
30Fri, Mar 30 pdf Graphs: introductionCLRS Chap. 22
31Mon, Apr 2 Graphs: representations, start BFSCLRS Chap. 22.2
32Wed, Apr 4 Breadth-first search and distancesCLRS Chap. 22.2
33Fri, Apr 6 pdf DFSCLRS Chap. 22.3
34Mon, Apr 9 DFS analysis, finding cycles
35Wed, Apr 11 Directed Acyclic Graphs, Topological SortCLRS Chap. 22.4
36Fri, Apr 13 pdf Single-source Shortest Paths: Dijkstra's Alg. CLRS Chap. 24
37Mon, Apr 16 Dijsktra's Alg. (Analysis, examples, negative edge weights)
38Wed, Apr 18 pdf Bellman-Ford Single-Source Shortest Paths
39Fri, Apr 20 pdf Minimum Spanning Trees: Prim's Algorithm
39Mon, Apr 23 Undecidability and the Halting Problem
38Wed, Apr 25 Reductions, and the classes P, NP, EXP
39Fri, Apr 27 NP-completeness


  1. Course logistics pdf
  2. Homework 1: pdf
  3. Homework 2: pdf
  4. Homework 3: pdf
  5. Homework 1 solutions on Angel
  6. Programming assignment 1: pdf
  7. Homework 4: pdf
  8. Homework 2 solutions on Angel
  9. Homework 3 solutions on Angel
  10. Homework 5: pdf
  11. Homework 6: pdf
  12. Practice exam 1: pdf. Solutions on Angel.
  13. Homework 4 solutions on Angel.
  14. Homework 5 solutions on Angel.
  15. Homework 6 solutions on Angel.
  16. Homework 7: pdf
  17. Homework 8: pdf
  18. Homework 9: pdf
  19. Homework 10: pdf.
  20. Homework 10 programming question: pdf (data sets from the SNAP repository: ca-GrQc.txt.gz and web-BerkStan.txt.gz)
  21. Homework 11: pdf.
  22. Homework 12: pdf.


For tips on using latex to type homework, see these links. On Mac OS, I like emacs and Skim.
See links to recent python interpreters on the Angel page.

Adam Smith
Last modified: Thu Apr 26 12:32:09 EDT 2012 3