CPSC 629: Analysis of Algorithms
Exam 2 Information


General Information

The second exam will be Wedneday May 12 from 1-3pm in our classroom (during the final exam slot).

It will be a closed book exam (no notes, books, or neighbors). However, I will allow you to use one 8.5x11 page of notes (one side), which you must turn in with your exam.


Material

All of the following are considered to be fair game:


Some Review Questions

  1. Union/Find Data Structures: Review the various versions of the union/find (disjoint sets) data structure. What types of operations does this data structure support? What are the complexities of the various versions?

  2. Stongly Connected Components: Review the algorithm for computing the strongly connected components of a digraph. What basic graph algorithm is it based on?

  3. Shortest Paths: What are the asymptotic complexities of the algorithms for computing single source shortest paths (SSSP) in a weighted directed graph. How can you use an SSSP algorithm to solve the all pairs shortest path problem (APSP)? What are the asymptotic complexities of the APSP algorithms that would result if you used each of the SSSP algorithms? What is the asymptotic complexity of Johnson's APSP algorithm, and when should you use it?

    Consider the SSSP algorithms of Dijkstra, Bellman-Ford, and Floyd-Warshall and the APSP algorithm of Johnson. Which algorithms cannot handle negative weight edges? Why can't they handle them? Which algorithms cannot handle negative weight cycles? Why can't they handle them?

  4. Max Flow Problems: Review the Ford-Fulkerson maximum flow algorithm. What is its complexity? How does it work? What properties are maintained by the algorithm?

  5. NP-Completeness:Constructing Cliques. how that if the decision problem CLIQUE in P, then the problem of listing the vertices of a largest clique in a graph is solvable in polynomial-time. In other words, suppose you are given a ``black box'' containing a polynomial-time algorithm that, on any input (G, k), tells you whether or not there is a clique in G of size k. Use this black box to construct a polynomial-time algorithm to actually construct the largest clique in a graph.

  6. NP-Completeness: Longest Path Problem (LP). Given an undirected graph G=(V,E,W) with non-negative integer weights, and two vertices x, y in V, the Longest Path Problem is to find the longest path between x and y in G, i.e., the path with the largest weight. (An edge can appear at most once in the path.)

  7. Approximation Algorithms: Understand the approximation algorithms for computing a traveling salesman tour when the inter-city distances satisfy the triangle inequality given in the text.