Benha University Final Exam Class: 2ndYear Students Subject: Mathematics 3 Faculty of Computers & Informatics نصف Date: 30/12/2013 Time: 1.30 hours Examiner: Dr. El-Sayed Badr ورقة Q1: 8 marks 1- Define the following terms and explain the difference among them by an example : Subgraph – induced subgraph – spanning subgraph – derived subgraph. Answer: A subgraph of a graph G is a graph whose vertex set is a subset of that of G, and whose adjacency relation is a subset of that of G restricted to this subset. A subgraph H is a spanning subgraph, or factor, of a graph G if it has the same vertex set as G. We say H spans G. A subgraph H of a graph G is said to be induced (or full) if, for any pair of vertices x and y of H, xy is an edge of H if and only if xy is an edge of G. In other words, H is an induced subgraph of G if it has exactly the edges that appear in G over the same vertex set. A graph His a derived subgraph of G if it is an induced subgraph of G without isolated vertices. Examples : G 2- Explain whether the following two graphs ( Fig.1) are isomorphic or not ? 4 marks b x a c g d z t u y Fig.1 Answer : It is clear that the two graphs are isomorphic by the following mapping : f :V (G ) V (H ) v a b c d g F(v) x y z t u Q2: 8 marks 1- Prove that : 1 2 3 ... n 2 2 2 2 n (n 1)(2n 1) 6 Answer: 1 12 2 2 32 n 2 n(n 1)(2n 1) 6 Step1: we prove the statement at n = 1 R.H.S 1 (2)(3) 1 6 L.H.S = 12 = 1 From above, the statement was proved at n =1 . Step 2 : we assume that the statement is true at n = k i.e 1 12 2 2 32 k 2 k (k 1)(2k 1) 6 Step 3 : We try to prove the statement at n = k+1 12 22 32 k 2 (k 1) 2 1 k (k 1)(2k 1) (k 1) 2 6 1 (k 1) k (2k 1) (k 1) 6 1 (k 1)k (2k 1) 6(k 1) 6 1 (k 1)2k 2 7 k 6 6 1 (k 1)k 2)(2k 3 6 1 (k 1)k 2)2(k 1) 1 6 From above, the statement was proved at n =k+1 so the statement is true for n. n 2- Prove that : 2 i 2n 1 1 12 marks i 0 Answer : 20 21 23 ... 2n 2n 1 1 Step1: we prove the statement at n = 0 L.H.S 20 1 R.H.S 201 1 1 we prove the statement at n = 1 20 21 3 L.H.S R.H.S 211 1 3 From above, the statement was proved at n =0 and n = 1 . Step 2 : we assume that the statement is true at n = k i.e 20 21 23 ... 2k 2k 1 1 Step 3 : We try to prove the statement at n = k+1 20 21 23 ... 2k 2k 1 2k 2 1 ????? 0 1 3 k k 1 k 1 k 1 2 2 2 ... 2 2 2 1 2 20 21 23 ... 2k 2k 1 2(2k 1 ) 1 20 21 23 ... 2k 2k 1 2k 2 1 From above, the statement was proved at n =k+1 so the statement is true for n. 3- What is the difference between the polynomial algorithm and exponential algorithm (explain by an example) ? 4 marks Answer : An algorithm is said to be of polynomial time if its running time is upper bounded by a polynomial expression in the size of the input for the algorithm, i.e., T(n) = O(nk) for some constant k. An algorithm is said to be exponential time, if T(n) is upper bounded by 2poly(n), where poly(n) is some polynomial in n. More formally, an algorithm is exponential time if T(n) is bounded by O(2nk) for some constant k. Q3: 1- Define the following terms : Graceful labeling – Odd graceful labeling. Answer : 8 marks A graph G of size q is odd-graceful, if there is an injection from V(G) to {0, 1, 2, …, 2q-1} such that, when each edge xy is assigned the label or weight | (x) - (y)|, the resulting edge labels are {1, 3, 5, …, 2q-1}. A graph G of size q is graceful, if there is an injection from V(G) to {0, 1, 2, …, q} such that, when each edge xy is assigned the label or weight | (x) - (y)|, the resulting edge labels are {1, 2, 3, …, q}. 2- Find the general mathematical formula for the following graph ( Fig.2 ) in order to be odd graceful graph ? Fig.2 Answer : ( ui ) = 4i , ( vi ) = 4i + 2 , ( wi ) = 2q -2i -1 , ( yi ) = 2q - 8k – 4i - 1 , where i = 0, 1, 2, . . . , k. where i = 0, 1, 2, . . . , k – 1. where i = 0, 1, 2, . . . , 2k – 1. where i = 0, 1, 2, . . . , k – 1.