CSCI 256
Design and analysis of algorithms
Assignment 9

Due Wednesday, 4/18/2001


Only turn in problems from the second section.

Practice problems:

  1. Show that the sum of the degrees of all vertices of graph G is equal to 2 times the number of edges of the graph.

  2. Problem 25.2-2 on page 531 of the text.

  3. An undirected graph is said to be k-colorable if all the vertices of G can be colored usking k different colors such that no two adjacent vertices have the same color. Design a linear-time algorithm to color a graph with two colors or determine that two colors are not sufficient.

Problems to be turned in:

  1. Let G = (V,E) be a connected undirected graph. We want to pick a vertex of degree 1 of G, remove it and its incident edge from G, and continue this process (taking and removing) until all edges are removed. If this procedure is possible for a set of graphs, then designing algorithms by induction for these graphs may be easier. Characterize connected undirected graphs that satisfy these conditions. In other words, find necessary and sufficient conditions for a graph G on which the procedure described above is possible. Argue why your characterization is both necessary and sufficient (i.e., why every graph in your set works, and every graph not in will not work).

  2. Problem 23.4-5 on page 488 of the text.


Back to:

  • CS256 home page
  • Kim Bruce's home page
  • CS Department home page
  • kim@cs.williams.edu