Mohamed G. Gouda CS 313K Fall 2012 Midterm 3 1. Let T be a tree with x vertices of degree 1 each, 1 vertex of degree 2, and 4 vertices of degree 3 each. Compute x and number of vertices n and number of edges e in T. Sol: From Handshake Theorem, 2*e = x + 2 + 12 = x + 14 (1) Because T is a tree we have, e = n-1 = x + 5 - 1 = x + 4 (2) From (1) and (2), we have x + 14 = 2(x + 4) = 2x + 8 x = 6 The number of vertices is 11. The number of edges is 10. 2. Let G1, G2, and G3 be three planar graphs. Each of these graphs has 6 vertices (named 1,2, ..., 6), 7 edges, and 3 regions. (a) Draw G1 such that the rdegrees of its regions are 4, 4, and 4. (b) Draw G2 such that the rdegrees of its regions are 3, 4, and 5. (c) Draw G3 such that the rdegrees of its regions are 3, 3, and 6. Sol: (a) Edges of region 1: (1,2), (1,3), (2,3), (2,5) Edges of region 2: (2,3), (2,4), (3,4), (3,6) Edges of region 3: (1,2), (1,3), (2,4), (3,4) (b) Edges of region 1: (1,2), (1,3), (2,3) Edges of region 2: (2,3), (2,4), (2,5), (3,4) Edges of region 3: (1,2), (1,3), (2,4), (3,4), (3,6) (c) Edges of region 1: (1,2), (1,3), (2,3) Edges of region 2: (2,3), (2,4), (3,4) Edges of region 3: (1,2), (1,3), (2,4), (2,5), (3,4), (3,6) 3. Let G be a connected planar graph. Assume that there are two different regions on the two sides of every edge in G. Also, assume that G has 8 regions whose rdegrees are 8, 4, 4, 4, 3, 3, 3, and 3. How many edges and vertices are in G? Explain your answer. Sol: Let n be the number of vertices in G, e be the number of edges in G, and r be the number of regions in G. From Region Handshake Theorem and taking into account that there are two different regions on the two sides of every edge in G, 2*e = (sum over region r.i, rdeg(r.i)) = 8 + 4 + 4 + 4 + 3 + 3 + 3 + 3 = 32 e = 16 From Euler's Formula, n = 2 + e - r = 2 + 16 - 8 = 10 4. Let A, B, and C be arbitrary sets. Show, by guessing values for sets A, B, and C, that (A-B)-C is not necessarily equal to A-(B-C). Sol: Guess A={1}, B={1}, and C={1}. (A-B)-C = ({1}-{1})-{1} = {} A-(B-C) = {1}-({1}-{1}) = {1} Thus, in this case, (A-B)-C != A-(B-C) 5. Let A, B and C be arbitrary sets. Show, by contradiction, (A != B) and (A*C = B*C) => (C = {}) where A*C is the Cartesian Product of the two sets A and C. Sol: (A != B) and (A*C = B*C) and (C != {}) => {From A != B and without loss of generality} (Exist x, x in A and not(x in B)) and (A*C = B*C) and (C != {}) => {From C != {}} (Exist x, x in A and not(x in B)) and (A*C = B*C) and (Exist z, z in C) => {Definition of "*"} ((x,z) in A*C) and not((x,z) in B*C) and (A*C = B*C) => {Definition of "="} not(A*C = B*C) and (A*C = B*C) => F