NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 206-207 DISCRETE MATHEMATICS May 207 Time Allowed: 2 hours INSTRUCTIONS TO CANDIDATES. This examination paper contains FOUR (4) questions and comprises FOUR (4) printed pages. 2. Answer all questions. The marks for each question are indicated at the beginning of each question. 3. Answer each question beginning on a FRESH page of the answer book. 4. This is a CLOSED-BOOK exam. 5. Candidates may use calculators. However, they should write down systematically the steps in the workings.
Question (30 marks) A card deck consists of 52 cards; each card has one of the 3 face values and one of the four suits,,,. The face values from smallest to largest are A 2 3 4 5 6 7 8 9 0 J Q K. In five-card poker, you are dealt a hand consisting of five different cards. The order of these five cards does not matter in a hand. (i) Count the number of hands in which all face values are at most 5. Solution: We need to count all 5-card hands out of the 5 4 = 20 cards with face values A up to 5 in all four suits. So the number of hands is C(20, 5). (ii) Count the number of hands in which the largest face value is 5. Solution: Let A be the set of hands in which the largest face value is 5. Let B be the set of hands in which all face values are at most 5. Let C be the set of hands in which all face values are at most 4. Then B is the disjoint union of A and C, so B = A + C. We already know from the previous question that B = C(20, 5). Similarly we have C = C(6, 5). Therefore A = B C = C(20, 5) C(6, 5) = 36. (iii) A hand is a three-of-a-kind if it has three cards of one face value, one card of another face value, and a fifth card of yet another face value, for example {8, 8, 8, A, 9 }. Count the number of three-of-a-kind hands. Solution: There are 3 choices for the face value of the triple, C(4, 3) choices for the suits in the triple (three suits out of a set of four). This leaves out C(2, 2) choices for the two face values of the two remaining cards, and 4 choices for each of their suits. This gives a total of possible three-of-a-kind hands. 3 C(4, 3) C(2, 2) 4 4 = 54, 92 2
Question 2 (45 marks) Answer each of the following questions (NO justification needed): (a) How many non-isomorphic simple undirected graphs with 4 vertices and 3 edges are there? (b) Can a simple graph with 6 vertices have degree sequence 2 3 3 5? If yes, draw such a graph. (c) What is the length of a longest simple circuit in K 6? (d) What is the chromatic number of K 6,6? (e) If G is a connected planar graph with 5 regions and 25 vertices, how many edges does the graph G have? (f) If G is a connected planar graph with 30 vertices, each of degree 3, then how many regions does the graph G have? (g) Give a recurrence relation for e n = the number of edges of graph K n. (h) Yes or no: Does every planar graph always contain an Euler path? (i) Yes or no: Does every planar graph always contain an Hamilton path? In questions (j) (o), the grid graph G m,n refers to the graph obtained by taking an m n rectangular grid of streets (m n) with m north/south blocks and n east/west blocks. For example: G,5 G 2,6 G 3,4 (j) Find a formula for the number of vertices of G m,n. (k) Find a formula for the number of edges of G m,n. (l) Find a formula for the number of regions (including the infinite region) of G m,n. (m) For which positive integers m and n does G m,n have an Euler circuit? 3
(n) For which positive integers m and n does G m,n have an Euler path but no Euler circuit? (o) Find the chromatic number of G m,n Solution: (a) 3 (b) No (c) 2 (d) 2 (e) 38 (f) 7 (g) e n = e n + n (h) No (i) No (j) (m + )(n + ) (k) n(m + ) + m(n + ) or 2mn + n + m (l) mn + (m) m = n = (n) m =, n = 2 (o) 2 4
Question 3 (5 marks) Find a minimal spanning tree for the following weighted graph. Indicate the name of the algorithm that you are using, and the order that the edges are added to the tree. a 6 4 3 b 9 c 4 d 5 6 7 e 2 3 4 3 f g h Solution: We can use Prim s algorithm. Starting from vertex a, we add the edges in the following order: {a, c} of weight 4. {c, b} of weight 3. {b, d} of weight. {c, e} of weight 5. {e, g} of weight 2. {g, h} of weight. {e, f} of weight 3. The total weight of the minimal spanning tree is 9. 5
a 4 3 b The tree looks like c 5 d e 3 f 2 g h Question 4 Let G = (V, E) be an undirected weighted graph, and let P be a shortest path from some vertex a to another vertex b. Suppose now that all the edge weights in G are increased by a constant number c. Is this path P still a shortest-path from a to b? If so, prove it. If not, then provide a counterexample. Solution: This statement is not true. A counterexample is shown as following: x y a b c 2 2 The shortest path from a to c is a x y c with total length 3. However, if we increase all the edge weights by a constant number c = 00, the shortest path from a to c becomes a b c with total length 02 + 02 = 204, while the a x y c path now has length (00 + ) 3 = 303. END OF PAPER 6