------------------------------------------------------------------------------ Mohamed G. Gouda CS 311 Spring 2015 Homework 2 ------------------------------------------------------------------------------ 1. (2.5 points) Let G be the graph (V, E) where V is the set {1, 2, ..., 5} and E is the set {(1,2), (1,4), (2,3), (2,4), (2,5), (4,5)} Show that the chromatic number of graph G is three. ------------------------------------------------------------------------------- 2. (2.5 points) Consider a graph G that has 11 vertices whose degrees are 2, 2, 2, 3, 3, 4, 4, 4, 4, x, y. Assume that the values of x and y are taken from the set {0, 1}. What are the values of x and y? Explain your answer. ------------------------------------------------------------------------------- 3. (2.5 points) Consider an induction proof of the quantified predicate: (All n, n >= 1, P(n)) where P(n) is the predicate (Any graph G with n vertices can be colored using (max-deg(G) + 1) colors. Argue that the following "induction step" of this proof is incorrect: P(n) => {Let G be any graph with (n+1) vertices. Because P(n) holds for G, we conclude that G can be colored using (max-deg(G) + 1) colors. Thus, P(n+1) hold for G} P(n+1) ------------------------------------------------------------------------------- 4. (2.5 points) Prove by direct inference the predicate (TR is a tree) => (All cycles in TR are of even length) ------------------------------------------------------------------------------- Solutions: ------------------------------------------------------------------------------- 1. First, show that G can be colored using three colors: Color vertex 1 White Color vertex 2 Yellow Color vertex 3 White Color vertex 4 Red Color vertex 5 Yellow Second, prove that G can't be colored using two colors: The induced subgraph involving the three vertices 1, 2, and 4 is a complete graph and so it needs to be colored using three colors. ------------------------------------------------------------------------------- 2. From the Hnadshake Corollary 2, the number of vertices whose degrees are odd is even. Therefore, the values of x and y are either both 0 (in which case the number of vertices whose degrees are odd is two) or both 1 (in which case the number of vertices whose degrees are odd is four) --------------------------------------------------------------------------------- 3. The hint of the "induction step" is incorrect a s follows. Predicate P(n) holds for any graph with n vertices. Therefore, P(n) does not hold for graph G, as claimed by the hint, which has (n+1) vertices. --------------------------------------------------------------------------------- 4. (TR is a tree) => {definition of a tree} (All cycles in TR are of length less than 3} => {length of a cycle in a nonnegative integer} (All cycles in TR are of lenght 0, 1, or 2) => {All cycles of length 0 or 2 are of even length and Exist no cycle of length 1} (All cycles in TR are of even length) -----------------------------------------------------------------------------------