COMP-251A Data Structures and Algorithms - Fall 2008

Lecture Descriptions, Homework, and Play

Text Book: Introduction to Algorithms by Udi Manber

Week: 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13

"An idea is best made the possession of the learner by the method by which it has been found.'' Ernst Mach, 1906

Week 1 - Sept 2 and 4

Week 2 - Sept 9 and 11

Week 3 - Sept 16 and 18:
Lecture 5: Polygon Triangulation Algorithms

Week 4 - Sept 23 and 25

Week 5 - Sept 30 and Oct 2 - Class Test #1 Thursday October 2

    Lecture 9: Complexity Classes and Examples
    1. Running time: constant, logarithmic, linear, n log n, quadratic, cubic, polynomial, exponential, factorial
    2. Proof that the exponential function grows faster than the polynomial function
    3. Examples
      1. Binary search
      2. Sorting: insertion sort, selection sort, bubble sort, merge sort
      3. Travelling salesman problem
Problem Assignment 3 "due"  October 16
  1. Algorithms for computing the Fibonacci function
  2. Binary search
  3. The skyline problem in computer graphics
  4. Analysis of heap-sorting
Lecture 10: 1st Class Test (Thursday October 2) Example test (2003)
    Reading Assignment
    1. Text: 5.1 and 5.2 - Polynomial evaluation
    2. Text: 9.2 - Exponentiation
    3. Text: 5.6 - The skyline problem (divide and conquer)
    4. Text: Chapter 6, section 6.4 up to and including 6.4.3
    5. Web: 20.6 - Polygonizing sets of points
    6. Text: 8.3 - Star-shaped polygonization of point sets
    Suggested Play
    1. Web: 1.4.1.6 - Fibonacci numbers and domino tilings
    2. Web: - 19.2.1.1 - Sorting animation applets

Week 6 - Oct 7 and 9

Week 7- Oct 14 and 16

Week 8 - Oct 21 and 23

    Lecture 15
    1. Locus search methods
      1. Range searching via domination queries
    2. String-comparison algorithms
      1. Hamming distance
      2. Euclidean distance
      3. Swap-distance
      4. Directed swap distance (scaffold assignment problem)
      5. Linear assignment problems
    Lecture 16
    1. Dynamic programming
    2. Divide and conquer with the master-theorem method
      1. Merge sort
      2. Convex hull and triangulation (merging with 3-coins algorithm or rotating calipers)
    3. Quicksort with secondary storage
    Reading Assignment
    1. Handout: Integer multiplication in O(n^1.585) worst case time
    2. Text: 6.8 - Dynamic programming (edit distance in sequence comparison)
    3. Web: 21.1 - Dynamic programming (edit distance in sequence comparison)
    4. Text: 6.4.4 - Quicksort and randomized quicksort
    5. Web: 19.2.1.7 - Quicksort tutorial
    6. Web: 19.2.1.8 - Expected analysis of quicksort
    Suggested Play
      Web: 21.1 - Applet for Dynamic programming (edit distance in sequence comparison)

Week 9 - Oct 28 and 30

Week 10 - Nov 4 and 6

Week 11 - Nov 11 and 13

Suggested Play

Week 12 - Nov 18 and 20

Lecture 23:

Week 13 - Nov 25 and 27

    Lecture 25
    1. Map coloring:
      1. Euler's formula for planar graphs
      2. Proof that every planar graph has a vertex of degree at most 5
      3. Induction proof of the the 5-color theorem for planar graphs
        1. Algorithm for 5-coloring planar graphs in O(n^2) time
    2. Digraphs and tournaments:
      1. Round robin tournaments
      2. Proof that the winner in a round robin tournament loses games only to teams that lose to teams defeated by the winner


    Lecture 26

    1. Hommometric sets:
      1. Proofs of the hexachordal theorem
_____________________________________________________
Additional Possible Material
  1. Digraphs and tournaments cont:
    1. Proof by induction that tournaments contain a Hamiltonian path
    2. O(n^2) algorithm for computing a Hamiltonian path in a tournament
  2. Travelling Salesperson Problem (TSP):
    1. Two versions of TSP (triangle inequality graphs)
    2. Reducing the TSP to a Hamiltonian circuit problem
    3. Approximation algorithms for TSP:
      1. The nearest-neighbor heuristic
      2. The twice-around-the-MST heuristic
  3. Minimum spanning trees:
    1. Kruskal's algorithm using heaps
    2. Prim's algorithm using adjacency matrices
    3. Baruvka's algorithm using adjacency lists
  4. Closest-pair searching:
    1. In 1-D via divide and conquer in O(n log n) time
    2. In 2-D via divide and conquer algorithm
      1. In O(n log^2 n) time
      2. In O(n log n) time
    3. In 2-D via line-sweep algorithm with (2,4) trees in O(n log n) time
  1. Coding theory and data compression:
    1. Block and Prefix codes
    2. Shannon-Fano codes
    3. Huffman coding
      1. Hu-Tucker algorithm with heaps
      2. Schwartz-Kallick algorithm
    4. Lempel-Ziv coding for data compression
  2. Other Huffman tree applications:
    1. Merging sorted files with a minimum number of comparisons
    2. Random number generation with a minimum number of comparisons
    Reading Assignment
    1. Text: 7.6 - Minimum-cost spanning trees
    2. Web: 4.11.1 - Minimum spanning trees (Luc Devroye's class notes)
    3. Web: 4.11.2 - Minimum spanning trees (David Eppstein's class notes)
    4. Web:4.11.3 - Kruskal's and Prim's algorithms tutorial
    5. Web: 4.10.1 - Hamiltonian paths in tournaments
    6. Web: 4.10.3.1 - Posa's proof of Dirac's theorem
    7. Handout: Travelling Salesperson Problem
    Suggested Play
    1. Web: 4.11.4.2 - Kruskal MST algorithm applet
    2. Web: 4.11.3 - AnotherKruskal MST algorithm applet
    3. Web: 4.11.6 - Prim MST algorithm applet
    4. Web: 4.17.3 and 4.17.4 - Great applets for travelling salesman problem

    5. Web: 4.17.6 - Great applet for TSP heuristics
    Reading Assignment
     
    1. Text: 8.5 - Closest pair
    2. Web: 6.8.1 - Closest-pair searching tutorial
    3. Web: 20.11.1 - Voronoi diagrams
    4. Text: 6.6 - Data compression
    5. Web: 5.7.1.6 - Huffman trees and applications (Luc Devroye's class notes)
    6. Web: 5.7.1.3 - Shannon-Fano coding
    7. Web: 5.7.1.4 - Huffman coding
    8. Web: 5.7.1.5 - Optimality of Huffman coding
    9. Web: 5.7.1.10 - Lempel-Ziv adaptive codes  (Luc Devroye's class notes)
    Suggested Play
    1. Web: 5.7.7 and 5.7.8 - Huffman coding applets