Mohamed G. Gouda CS 313K Fall 2013 Homework 2 1) Use induction to prove that any graph G can be colored using (max-deg(G) + 1) colors. Sol. Restate what needs to be proven as follows: (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. Base case: n=1: P(1) <=> {any graph G with 1 vertex can be colored using 1 color} T Induction step: Use direct inference to prove (All n, n >= 2, P(n) => P(n+1)). P(n) => {Let G be any graph with n+1 vertices and let u be any vertex in G. Also, let G' be the graph that results from removing vertex u from G. From the induction hypothesos P(n), G' which has n vertices can be colored using max-deg(G') + 1 colors. Thus, G' can be colored using max-deg(G) + 1 colors. Because the degree of vertex u is at most max-deg(G), the neighbors of vertex u are colored using at most max-deg(G) colors. Therefore, there is at least 1 color that can color vertex u from the max-deg(G) + 1 colors that are used to color the vertices of graph G'. Thus, G can be colored using max-deg(G) + 1 colors.} P(n+1) 2) Compute the chromatic number of the graph G = (V, E), where V = {1, 2, ..., 100, 101, 102, ..., 200} E = {(1,2), (2,3), ..., (99, 100), (101,102), (102,103), ..., (199,200), (1,101),(2,102), ..., (100,200)} Note that G has 200 vertices and 298 edges. Explain your answer. Sol. Each odd vertex from 1 to 99 can be colored Black, and each even vertex from 2 to 100 can be colored White. Similarly, each odd vertex from 101 to 199 can be colored White, and each even vertex from 102 to 200 can be colored Black. Thus, graph G is 2-colorable. Because graph G has one or more edges, G is not 1-colorable. Thus, chromatic number of G is 2. 3) What proof style(s) can one use to prove that the chromatic number of any given graph G is 2. Explain your answer. Sol. To prove that the chromatic number of any G is 2, prove that: (1) G is 2-colorable and (2) G is not 1-colorable. (1) can be proven by guessing: exhibit a coloring of G where each vertex is colored either Black or White. (2) can be restated as: (T => G is not 1-colorable) and can be proven by direct inference as follows: T => {G has at least one edge} G is not 1 colorable 4) Use induction to prove that any tree with at least 2 vertices is 2-colorable. Do not use in your proof the theorem that states any tree is a bipartite graph. Sol. Restate what needs to be proven as follows: (All n, n>=2, P(n)) where P(n) is the predicate: any tree with n vertices is 2 colorable. Base case: n = 2: P(2) <=> {any tree with 2 vertices is 2 colorable} T Induction step: Use direct inference to prove (All n, n >= 2, P(n) => P(n+1)). P(n) => {Let TR be a tree with n+1 vertices, where n is at least 2. By the theorem of tree leaves, TR has a leaf u that is connected to a vertex v in TR. Let TR' be the tree that results from removing vertex u and its incident edge from TR. Note that TR' has n vertices. From the induction hypothesis, P(n), TR' can be colored using 2 colors, say Black and White. Therefore, TR-{u} can be colored using 2 colors. If vertex v in TR-{u} is colored Black (or White, respectively), then color vertex u in TR White (or Black, respectively). Thus, TR is 2 colorable} P(n+1) 5) Let X Incorporated be a company where the employees are required to perform a large set TS of tasks. Associated with each task in TS is a set of employees who together can perform this task in 1-hour slot. The scheduling problem of assigning 1-hour slots to the tasks in TS can be viewed as a coloring problem of a graph GX. Define the vertices and edges in graph GX. Also, define the colors that can be used in coloring graph GX. Sol. Each vertex u in graph GX corresponds to a task tu in set TS. An edge (u,v) is in graph GX iff the set of employees that are needed to perform task tu overlaps the set of employees that are needed to perform task tv. Each color that is used in coloring graph GX is an 1-hour slot. Note that the smallest number of 1-hour slots that are needed to perform all the tasks in TS equals the chromatic number of GX.