CS-210 Discrete Mathematics LUMS CS-210 Homework 5 Ahmed Hassan Student ID: 26100308 December 7, 2023 1 Problem 1 Claim: The number of ways to select a committee of n people, including a female chair, from a group of 2n people (with n females and n males) is given by 2 n X n k k k=1 Proof: Choosing the Chair First: We can start by selecting the female chair. There are n ways to do this. For each choice of the female chair, there are 2n−1 ways to select n people from the remaining 2n − 1 people. Therefore, the total n number of ways to choose a committee with a female chair in this manner is n × 2n−1 . n Counting Committees with Female Chair Differently: Now, let’s count the number of committees in a different way. The committee will have a total of k females 2 n and n − k males, where k ranges from 1 to n. We can select k females and n − k males in nk × n−k = nk ways. For each of these ways, the chair can be chosen from the k females in k ways. Thus, there are 2 k × nk × k ways to make a committee with k females (including a female chair) and n − k males. Observation: 2 n Note that n−k = nk , so we can simplify the expression to k nk . Summation: 2 Pn Finally, we sum over all values of k from 1 to n: k=1 k nk . Final Simplification: 2 Pn n Finally, we use the identity n−k = nk again and obtain k=1 k nk . This completes the proof that both counting methods lead to the same result, and the number of ways 2 Pn to choose a committee of n people, including a female chair, is k=1 k nk . 2 Problem 2 7! = 420 (a) 3!∗2! (b) Starting out with possibilities of BANANAS alphabetically, we first get, AAABNNS where A is the first alphabet followed by AABNNS and these numbers have total permutations of 6!/2!2! = 180. So the 180th word is ASNNBAA as it is the last permutation with such alphabetic ordering. So the next ordering begins with B as the first letter with BAAANNS as the first combo, and their are a total of 6!/3!2!= 60 permutations, making it 180+60=240 combinations resulting in the last permutation of B as the first letter being the 240th letter, which in alphabetic order is BSNNAAA. Ahmed Hassan: 26100308@lums.edu.pk 1 CS-210 Discrete Mathematics 3 LUMS Problem 3 (a) an = an−1 + 3 where a1 = 2 a2 = a1 + 3 = 2 + 3 = 5 a3 = 5 + 3 = 8 a4 = 11 Arithmetic process where a1 = 2 and common differenced = 3 so an = a1 + (n − 1)d an = 2 + 3(n − 1) an = 3n − 1 Verify using induction for n = k, ak = 3k − 1 Prove it for n=k+1 ak+1 = ak + 3 3k − 1 + 3 = 3K + 3 − 1 = 3(k + 1) − 1 Hence true for n-k+1 therefore a+n=3n-1 (b)an = 2an−1 − an−2 , a1 = 3, a + 0 = 0 a2 = 2a1 − a0 = 2(3) − 0 = 6 a3 = 2(6) − 3 = 9 a4 = 18 − 6 = 12 Considering the arithmetic series it becomes an = 3 + (n − 1)3 an = 3n Verify with induction n=k so ak = 3k checkf orn = k + 1 ak+1 = 2ak + ak−1 = 2(3k) + 3(k − 1) 3k + 3 = 3(k + 1)Henceprovenf orn = k + 1andtheref orean = 3n (c)an = an−1 + 2n − 3, where, a0 = 4 a1 = 4 + 8 − 3 = 9 a2 = 16 a3 = 25 From this progression, we can see the squares of the values of n added with 2 hence making the progression an = (n + 2)2 Verification using induction ak = (k + 2)2 for n=k+1 ak+1 = ((k + 1) + 2)2 ak+1 = ak + 2(k + 1) + 3 = (k + 2)2 + 2k + 2 + 3 = k 2 + 4k + 4 + 2k + 5 = k 2 + 6k + 9 = (k + 3)2 = ((k + 1) + 2)2 Hence true for n=k+1 and proving an = (n + 2)2 (d)an = nan−1 , where,a0 = 5 Ahmed Hassan: 26100308@lums.edu.pk 2 CS-210 Discrete Mathematics LUMS a1 = 1(a0 ) = 1(5) = 5 a2 = 2(5) = 10 a3 = 3(10) = 30 a4 = 4(30) = 120 a5 = 5(120) = 600 From the progression we deduce the formula an = 5n! Verify this using induction for ak = 5k! f or, , , n = k + 1 ak+1 = (k + 1)ak = (k + 1)5k! = 5(k + 1)(k!) = 5(k + 1)! Hence proven for n=k+1 and therefore an = 5n! 4 Problem 4 1. Calculate the number of regions in each connected component: Let ri , vi , and si be the number of regions, vertices, and edges in the ith connected component, respectively. Using Euler’s formula (ri = si − vi + 2), we get ri = si − vi + 2. 2. Ignore the outermost region for each connected component: Let ri′ be the adjusted number of regions for the ith connected component. ri′ = si − vi + 1 3. Sum up the adjusted regions for all connected components: Let r′′ be the total adjusted regions, then: r′′ = r1′ + r2′ + . . . + rk′ 4. Reintroduce the outer region: The total number of regions (r) is r′′ + 1: r = r′′ + 1 5. Express r′′ in terms of v and s: r′′ = s − v + k 6. Combine the equations: r =s−v+k+1 So, the formula for k in terms of v and s is: k =r−s+v−1 5 Problem 5 (a) Write down a recurrence relation expressing an in terms of an−1 , for n ≥ 1. Solution: For n ≥ 1, we have an = 1 8 1 7 an−1 + (1 − an−1 ) = an−1 + 10 10 10 10 (b) Obtain a closed formula for an , by using substitution to solve the recurrence relation. Solution: Here the second-last equality uses the formula for the sum of a geometric progression. an = 3 4 3 3 4 4 an−1 + = ( an−2 + )+ = 10 10 10 10 10 10 3 10 2 Ahmed Hassan: 26100308@lums.edu.pk an−2 + 3 4 4 · + = 10 10 10 3 10 3 2 3 4 3 4 4 an−3 + · + · + 10 10 10 10 10 3 CS-210 Discrete Mathematics LUMS .. . = 3 10 n 4 a0 + 10 " 3 10 " # n−1 + ... + 1 # n 3 n −1 3 4 10 = a0 + 3 10 10 10 − 1 n 4 3 4 + = a0 − 7 10 7 (c) Show that the market share of company A in the long run (i.e. the limit of as n → ∞) is independent of its initial market share a0 . 3 n Solution: As n → ∞, the power 10 tends to 0, so an → 74 . So whatever the initial situation, the market tends to a stable situation where company A has a 47 market share and company B has a 37 market share. 6 Problem 6 1. Number of Regions in a Connected Planar Graph: - In a connected planar graph with v vertices, e edges, and f faces (regions), the formula is given by Euler’s formula: v − e + f = 2. 2. Handling Disconnected Components: - If G is not connected and has two connected components, each of size at least 3, let v1 and v2 be the number of vertices in the two components, respectively. Also, let e1 and e2 be the number of edges in the two components. - For a connected component with vi vertices and ei edges, the number of regions is given by fi = ei − vi + 2, applying Euler’s formula. - So, for the two components, the total number of regions is f1 + f2 = (e1 − v1 + 2) + (e2 − v2 + 2). 3. Total Regions in the Planar Drawing: - Since the graph is not connected, there will be additional regions formed where the components are disconnected. Let d be the number of disconnected components. The number of additional regions is d − 1. 4. Total Number of Regions: - Combining the regions from the connected components and the additional regions, the total number of regions in the planar drawing is: k = (e1 − v1 + 2) + (e2 − v2 + 2) + (d − 1) 5. In Terms of v and s: - The total number of vertices in the disconnected components is v1 + v2 , and the total number of edges is s. So, v1 + v2 = v and e1 + e2 = s. - Substituting these into the formula for k, we get: k = (s − v + 2) + (d − 1) Therefore, the formula for k in terms of v and s for a non-connected planar graph with two connected components each of size at least 3 is: k =s−v+1 7 Problem 7 Part 1 In a tree with n vertices: 1. Internal Vertices (i): The number of internal vertices is given by the formula i = n−1 m . Derivation: Since each internal node has m children, and the total number of edges in internal nodes is m × n, considering the fact that there is one less edge than the number of vertices in a tree, we have m × i = n − 1, which leads to n = (i × m) + 1, and thus i = n−1 m . Ahmed Hassan: 26100308@lums.edu.pk 4 CS-210 Discrete Mathematics 2. Leaves (l): The number of leaves is given by the formula l = LUMS (m−1)n+1 . m Derivation: The total number of vertices n in the tree is the sum of the number of leaves and the number of internal vertices (n = l + i). By substituting i with n−1 m , we arrive at the expression (m−1)n+1 . l= m Part 2 As previously proven, l = n − i and i = n−1 m . Derivation: Starting with n = (i × m) + 1, substituting i with n−1 m gives l = (m − 1)i + 1. Part 3 . As previously derived, l = (m−1)n+1 m Rephrased Derivation: By rearranging the equation, m × l = n(m − 1) + 1, and solving for n, we get n = 1−(m×l) 1−m , which is an alternate form of the expression. Ahmed Hassan: 26100308@lums.edu.pk 5