------------------------------------------------------------------------------ Mohamed G. Gouda CS 311 Fall 2015 Homework 3 ------------------------------------------------------------------------------ 1. (2.5 points) Consider a disconnected graph G that consists of three connected components: TR1, TR2, and TR3, where TR1 is a tree that has 17 vertices, TR2 is atree that has 9 vertices, and TR3 is a tree that has 1 vertex. What is the chromatic of G? Explain your answer. ------------------------------------------------------------------------------- 2. (2.5 points) Consider the planar connected graph K2,x for some integer x greater than or equal 2. Assume that the degree of each region in K2,x is 4. Compute the sum of degrees of all regions in K2,x. ------------------------------------------------------------------------------- 3. (2.5 points) Let A be the set { {}, {2}, {{}, 2} }. Which of the following predicates is true and which of them is false: {} in A {} sub A {{}} sub A 2 in A {2} sub A {2} in A {{2}} sub A { {}, 2 } sub A { {}, {2} } sub A |{ { {}, {2} } }|= 2 ------------------------------------------------------------------------------- 4. (2.5 points) Use direct inference to prove the following two predicates: ((A sub C) and (B sub C)) => ((AvB) sub C) ((C sub A) and (C sub B)) => (C sub (A^B)) ------------------------------------------------------------------------------- Solutions: ------------------------------------------------------------------------------- 1. The chromatic number of G is 2. Explanation: Each of the components is a tree that can be colored using 2 colors. Thus, G can be colored using 2 colors and the chromatic number of G is at most 2. Because TR1 has 17 vertices, TR1 has 16 edges. Thus, TR1 and so G can't be colored using 1 color and the chromatic number of G is at least 2. Therefore, the chromatic number of G is 2. -------------------------------------------------------------------------------- 2. Because K2,x = (V, E) is a planar connected graph, Euler's Formula applies to K2,x as follows: |R| = |E|-|V|+2 = 2x - (2+x) + 2 = x where |R| is the number of regions in K2,x. Therefore the sum of degrees of all regions in K2,x = (4*x). --------------------------------------------------------------------------------- 3. {} in A is T {} sub A is T {{}} sub A is T 2 in A is F {2} sub A is F {2} in A is T {{2}} sub A is T { {}, 2 } sub A is F { {}, {2} } sub A is T |{ { {}, {2} } }|= 2 is F -------------------------------------------------------------------------------- 4. Proof of ((A sub C) and (B sub C)) => ((AvB) sub C) x in (AvB) => {definition of v} (x in A) or (x in B) => {A sub C} (x in C) or (x in B) => {B sub C} (x in C) or (x in C) => {(P or P) => P} x in C Proof of ((C sub A) and (C sub B)) => (C sub (A^B)) x in C => {P => (P and P)} (x in C) and (x in C) => {C sub A} (x in A) and (x in C) => {C sub B} (x in A) and (x in B) => {definition of ^} x in A^B -----------------------------------------------------------------------------------