Course Information

COMP 252 - Honours Algorithms and Data Structures (course profile)
McGill University - Winter 2012
Trottier 0070 - Tuesday Thursday 14:35-15:55

Instructor: Aaron Williams (webpage)
Email: haron (monkey tail) uvic (decimal) ca
Office Hours: Trottier 0070, Tuesday Thursday 15:55-18:00, by appointment
Office: Burnside 1244

Teaching Assistant: Yongzhi Chen (Jake)
Email: chenyongzhick (monkey tail) gmail (decimal) com
Office Hours: Trottier 3070, Monday 13:00-14:00 Wednesday 15:00-16:00, when an assignment is currently posted

Lectures

  1. Lecture 01 - Unsorting: String operations. Introduction to Unsorting.
    Notes: pdf
  2. Lecture 02 - Unsorting: Binary reflected Gray code. Non-existence of swap Gray codes for fixed-weight binary strings.
    Notes: pdf Wikipedia
  3. Lecture 03 - Unsorting: Permutations in zig-zag order.
    Notes: pdf Wikipedia
  4. Lecture 04 - Unsorting: Permutations in barber's pole order.
    Notes: pdf
  5. Lecture 05 - Unsorting: Recursive programs.
    Notes: pdf
    Programs: binary.py Gray.py combo.py binaryPartition.py GrayPartition.py
  6. Lecture 06 - Unsorting: Successor programs.
    Notes: pdf
    Programs: nextBinary.py nextPerm.py nextCool.py
  7. Lecture 07 - Graphs: Dijkstra's algorithm.
    Notes: pdf Chapter 24.2-24.3
  8. Lecture 08 - Graphs: Floyd-Warshall algorithm. Kruskal's algorithm.
    Notes: pdf Chapter 25.2 and 23
  9. Lecture 09 - Graphs: Prim's algorithm.
    Notes: pdf Chapter 23
  10. Lecture 10 - Network Flows: Max-flow = min-cut.
    Notes: pdf Chapter 26.1-26.2
  11. Lecture 11 - Network Flows: Generalizations of model (parallel edges, multiple sources).
    Notes: pdf Chapter 26.1-26.2
  12. Lecture 12 - Network Flows: Bipartite matching.
    Notes: pdf Chapter 26.3
  13. Lecture 13 - Strings: Substring search including Knuth Morris Pratt.
    Chapter 32 (focus on 32.3 and 32.4)
  14. Lecture 14 - Strings: Huffman encoding.
    Notes: pdf and Chapter 16.3
  15. Lecture 15 - Data Structures: Priority Queues using Binary Heaps.
    Chapter 6
  16. Lecture 16 - Data Structures: Disjoint sets.
    Chapter 21
  17. Midterm/Assignment review
  18. Midterm
  19. Lecture 17 - Data Structures: Dictionaries. (Self-Balancing) binary search trees.
    Notes: pdf Chapter 12
  20. Lecture 18 - Data Structures: 2-3 trees.
    Notes: pdf
  21. Lecture 19 - Approximation Algorithms: Vertex cover.
    Notes: pdf and Chapter 35.1
  22. Lecture 20 - Approximation Algorithms: TSP.
    Notes: pdf and Chapter 35.2
  23. Lecture 21 - Algorithm Types: Greedy, Dynamic Programming, Divide and Conquer for Max Subarray
    Notes: pdf and Chapters 4.1, 15.3, 16.2
  24. Lecture 22 - Analysis: Substitution Method
    Notes: pdf and Chapter 4.3
  25. Lecture 23 - Analysis: Recursion Tree Method and Master Method
    Notes: pdf and Chapter 4.4-4.5
  26. Lecture 24 - Analysis: Amortized Analysis
    Notes: pdf and Chapter 17.1-17.3

Assignments and Exams

Errata for the assignments will be posted in the Discussion section of McGill's myCourses/WebCT system.

Resources

Grades

  • 60% Assignments.
    • Four assignments in total.
    • Each of your top three assignments is worth 20%.
  • 15% Midterm.
  • 25% Final.