CS5800 09F: Homework 08

Created: Sat 14 Nov 2009
Last modified: 

Assigned: Wed 18 Nov 2009
Due: Wed 02 Dec 2009


Instructions

  1. Please review the course syllabus and make sure that you understand the course policies for grading, late homework, and academic honesty.

  2. On the first page of your solution write-up, you must make explicit which problems are to be graded for "regular credit", which problems are to be graded for "extra credit", and which problems you did not attempt. Please use a table something like the following

    Problem01020304 0506070809...
    CreditRCRCRCECRC RCNARCRC...

    where "RC" is "regular credit", "EC" is "extra credit", and "NA" is "not applicable" (not attempted). Failure to do so will result in an arbitrary set of problems being graded for regular credit, no problems being graded for extra credit, and a five percent penalty assessment.

  3. You must also write down with whom you worked on the assignment. If this changes from problem to problem, then you should write down this information separately with each problem.


Problems

Required:


Unless otherwise indicated, exercises and problems are from Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein. The edition (2nd or 3rd) will be indicated if the numbering differs. * - Indicates problem from Algorithms by Dasgupta, Papadimitriou, and Vazirani.

  1. 22.1-3
  2. 22.1-4 (A multigraph is like an undirected graph but it can have both multiple edges between vertices and self-loops.)
  3. 22.3-2, 22.4-1
  4. 23.1-2, 23.1-3
  5. 22-2 (a, b, c, g)
  6. 22-2 (d, f, h) (Hint: You can do these all at once. First, use low to identify articulation points. Then run another DFS with an extra stack of edges to remove biconnected components one at a time.)

  7. * A bipartite graph is a graph G = (V, E) whose vertices can be partitioned into two sets (V = V1V2 and V1V2 = ∅ such that there are no edges between vertices of the same set (e.g., if u, v, ∈ V1, then there is no edge between u and v).
    1. Give a linear-time algorithm to determine whether an undirected graph is pipartite.
    2. Prove that an undirected graph is bipartite if and only is it contains no cycles of odd length.
    3. Prove that is a graph has exactly one odd cycle, it can be colored by 3 colors.
  8. * Sometimes we want light spanning trees with certain special properties. Here is an example.

    Input: Undirected Graph G = (V, E); edge weights we; subset of vertices U ⊂ V
    Output: The lightest spanning tree in which the nodes of U are leaves (there might be other leaves as well).

    (The answer isn't necessarily a minimum spanning tree.)

    Give an algorithm for this problem that runs in O(|E| log|V|) time. (Hint: When you remove nodes U from the optimal solution, what is left?)


Switch to:


Harriet Fell
College of Computer Science, Northeastern University
360 Huntington Avenue #340 WVH,
Boston, MA 02115
Email: fell@ccs.neu.edu
Phone: (617) 373-2198 / Fax: (617) 373-5121
The URL for this document is: http://www.ccs.neu.edu/home/fell/CS5800/F09/Homeworks/hw.08.html