Mohamed G. Gouda CS 313K Fall 2012 Exercise 7 1. Let G=(V,E) be a connected graph. Show, by contradiction, that (|V|=n and |E|=n-1 and n > 1) => (G has at least one leaf) Sol: (|V|=n and |E|=n-1 and n > 1) and (G has no leaves) => {G is connected and so has no isolated vertices} (|V|=n and |E|=n-1 and n > 1) and (every vertex in G is of degree at least 2) => {From Handshake Theorem} (|V|=n and |E|=n-1 and n > 1) and (2*|E| >= 2*n) => {Arithmetics} (|E|=n-1) and (|E| >= n) => F 2. Let T be any tree. Show, by contradiction, that every simple path in T has no repeated vertices (which means it is a cycle). Sol: (Exist a simple path (u, ..., v) in T has a repeated vertex w) <=> {Definition of repeated vertices} (This simple path in T is of the form (u, ..., w, ..., w, ..., v)) => {Definition of simple circuit} (Tree T has a simple circuit (w, ..., w)) => {Definition of a Tree} (Tree T has a simple circuit) and (Tree T has no simple circuits) => F 3. Let T be a tree and u and v be two vertices in T. Show, by contradiction, there is a unique simple path connecting u and v. Sol: (Exist two simple paths between u and v in tree T) => {From Problem 12 in Exercise 5} (Exist a simple circuit in tree T) => {Definition of a tree} (Exist a simple circuit in tree T) and (T has no simple circuits) => F 4. Let T be any tree with at least two vertices. Show, by contradiction, that T has a vertex of degree 1. Sol: (Tree T has no vertex of degree 1) => {T is connected and has at least two vertices} (Every vertex in T is of degree at least 2) => {From Problem 11 in Exercise 5} (Tree T has a cycle) => {Definition of Tree} (Tree T has a cycle) and (Tree T has no cycle) => F 5. Let T be a tree with 2m vertices of degree 1 each, 3m vertices of degree 2 each, m vertices of degree 3 each. Compute m and the number of vertices in T and the number of edges in T. Sol: Let n be the number of vertices in T and e be the number of edges in T. From Handshake Theorem, we have 2e = 2m+6m+3m = 11m (1) Because T is a tree, we have e = n-1 = 2m+3m+m-1 = 6m-1 (2) From (1) and (2), we have 2*(6m-1) = 11m 12m-2 = 11m m = 2 n = 6m = 12 e = n-1 = 11 6. Let G be a bipartite graph with n vertices and e edges. Show that e =< (n^2)/4 Sol: Because G is bipartite, its vertices can be partitioned into V1 and V2. Let the number of vertices in V1 be m and the number of vertices in V2 be n-m. Therefore, the number e of edges in G is at most m*(n-m). Thus, e =< m*(n-m) = m*n - m^2 = -(m^2 - m*n + (n^2)/4) + (n^2)/4 = -(m - n/2)^2 + (n^2)/4 =< (n^2)/4 7. Let G be a bipartite whose vertices are partitioned in V1 and V2. Show that (sum over vertex u in V1, deg(u)) = (sum over vertex v in V2, deg(v)) Sol: Let e be the number of edges in G. Each edge in G contributes 1 to the (sum over vertex u in V1, deg(u)). Thus, (sum over vertex u in V1, deg(u)) = e. Similarly, (sum over vertex v in V2, deg(v)) = e. 8. Let G=(V,E) be a graph. Show that if |V|=<|E|, then G has a cycle. Sol: Execute the following two operations on graph G until neither operation can be executed any further: (1) if G has a vertex u of degree 0, then remove u from G (2) if G has a vertex v of degree 1, then remove v and its incident edge from G The resulting graph G'=(V',E') has the following three properties: a) |V'| =< |E'| because each execution of operation (1) or (2) maintains this relation b) |V'| > 1 because if |V'|=1 then |E'|=0 violating the relation |V'| =< |E'| c) Each vertex in G' is of degree at least 2 because if G' has a vertex of degree less than 2 then operation (1) or (2) can still be executed on G' Because |V'| > 1 and each vertex in G' is of degree at least 2 then, by Problem 11 in Exercise 5, graph G'=(V',E') has a cycle. Because G' is a subgraph of G then graph G has a cycle.