Problem 1 (5 points) Determine if the following argument is valid. Use truth tables. If this car is made in England, then parts are hard to get. This car is expensive, or it is not difficult to obtain parts. But this car is not expensive. Hence, it is not made in England. M - Made in England P - Parts are hard to get $ - Car Expensive Answer Considering the propositions ๐, ๐ and $ as given in the problem, we need to determine if the following argument is valid: ๐→๐ $ ∨ ¬๐ ¬$ ∴ ¬๐ To verify if the argument is valid, we will check, with a truth table, if the following conditional proposition is a tautology: (๐ → ๐) ∧ ($ ∨ ¬๐) ∧ (¬$) → ¬๐ Table 1. Truth table for problem 1. ๐ฏ๐ 1 2 3 4 5 6 7 8 ๐ฏ๐ ๐ฏ๐ ๐ฏ๐ ๐ด ๐ท $ โ โ โ ๐ด→๐ท โ ๐ฏ๐ ∧ ๐ฏ๐ ∧ ๐ฏ๐ $ ∨ ¬๐ท ¬$ T T T T T F F T T F T F T F T F T F T F F T F F F T T F F T T T T F F F T F T F T F F F T T T F F F F F T T T T ¬๐ ๐ฏ๐ → ¬๐ F F F F T T T T T T T T T T T T The last column of our truth table shows that the argument is indeed a tautology, so it is therefore a valid argumentโ 1 / 13 Problem 2 (3 points) ๐ด and ๐ต are ๐ × ๐ matrices such that ๐ด๐ต = ๐ต๐ด = ๐. Prove that (๐ด + ๐ต)๐ = ๐ด๐ + ๐ต ๐ for all ๐ in โค+ . Use any method of proof. Answer For this problem, we will use the fact that matrix multiplication is distributive. This is a basic property of matrices that can be found in several resources on the internet and is also given in exercise 12 of chapter 2.6 of the Rosen Textbook. We will also consider that matrix multiplication is associative, which was given in the class lecture 03B. In this solution, when we write ๐, we mean the zero matrix. Let us proceed with a proof by induction on ๐ and let us start by looking at some base cases. For ๐ = 1, we have the trivial case (๐ด + ๐ต)๐ = (๐ด + ๐ต) = ๐ด + ๐ต, which is true. For ๐ = 2, we consider the definition of matrix power and write (๐ด + ๐ต)2 = (๐ด + ๐ต)(๐ด + ๐ต) Now we consider that the matrix multiplication is distributive, so (๐ด + ๐ต)2 = (๐ด + ๐ต)(๐ด + ๐ต) = (๐ด + ๐ต)๐ด + (๐ด + ๐ต)๐ต Distributing the multiplication again, we obtain: (๐ด + ๐ต)2 = ๐ด๐ด + ๐ต๐ด + ๐ด๐ต + ๐ต๐ต But we know that ๐ด๐ต = ๐ต๐ด = 0, so this means that (๐ด + ๐ต)2 = ๐ด2 + 0 + 0 + ๐ต 2 = ๐ด2 + ๐ต 2 Which proves that the property is also true for ๐ = 2. For ๐ = 3, we have that (๐ด + ๐ต)3 = (๐ด + ๐ต)(๐ด + ๐ต)2, but we just proved that (๐ด + ๐ต)2 = ๐ด2 + ๐ต 2, so (๐ด + ๐ต)3 = (๐ด + ๐ต)(๐ด2 + ๐ต 2 ). Again, we apply the distributive property of the matrix multiplication to obtain (๐ด + ๐ต)3 = (๐ด + ๐ต)(๐ด2 + ๐ต 2 ) = (๐ด + ๐ต)๐ด2 + (๐ด + ๐ต)๐ต2 = ๐ด๐ด2 + ๐ต๐ด2 + ๐ด๐ต 2 + ๐ต๐ต 2 Now we use the definition of matrix power and the associative property to write (๐ด + ๐ต)3 = ๐ด๐ด2 + (๐ต๐ด)๐ด + (๐ด๐ต)๐ต + ๐ต๐ต 2 = ๐ด3 + (0)๐ด + (0)๐ต + ๐ต 3 = ๐ด3 + ๐ต 3 And this equality proves that the property is also true for ๐ = 3. Let us now assume that the property is true for some positive integer ๐, i.e., (๐ด + ๐ต)๐ = ๐ด๐ + ๐ต ๐ . Now we consider (๐ด + ๐ต)๐+1 and apply the definition of matrix power to write (๐ด + ๐ต)๐+1 = (๐ด + ๐ต)(๐ด + ๐ต)๐ By our hypothesis of induction, we have that (๐ด + ๐ต)๐ = ๐ด๐ + ๐ต ๐ , which means that (๐ด + ๐ต)๐+1 = (๐ด + ๐ต)(๐ด + ๐ต)๐ = (๐ด + ๐ต)(๐ด๐ + ๐ต ๐ ) Now we apply again the distributive property to rewrite this expression as (๐ด + ๐ต)๐+1 = (๐ด + ๐ต)๐ด๐ + (๐ด + ๐ต)๐ต๐ = ๐ด๐ด๐ + ๐ต๐ด๐ + ๐ด๐ต ๐ + ๐ต๐ต ๐ Lastly, we use the associative property in the following manner (๐ด + ๐ต)๐+1 = ๐ด๐ด๐ + (๐ต๐ด)๐ด๐−1 + (๐ด๐ต)๐ต ๐−1 + ๐ต๐ต ๐ = ๐ด๐+1 + (0)๐ด๐−1 + (0)๐ต ๐−1 + ๐ต ๐+1 And with this, we have shown that (๐ด + ๐ต)๐+1 = ๐ด๐+1 + ๐ต ๐+1. This concludes the proof by induction that, for all ๐ ∈ โค+ , (๐ด + ๐ต)๐ = ๐ด๐ + ๐ต ๐ โ 2 / 13 Problem 3 (4 points) For all sets ๐ถ and ๐ท, Prove or disprove: ๐ท(๐ถ × ๐ท) = ๐ท(๐ถ) × ๐ท(๐ท). (๐ท(๐) is the power set of ๐). Answer We will disprove that ๐ท(๐ถ × ๐ท) = ๐ท(๐ถ) × ๐ท(๐ท) by providing a counterexample. Let ๐ถ = {1} and ๐ท = {2, 3} Cartesian product ๐ถ × ๐ท = {(1, 2), (1, 3)} Power set of ๐ถ, ๐ท(๐ถ) = {∅, {1}} Power set of ๐ท, ๐ท(๐ท) = {∅, {2}, {3}, {2,3}} Powerset of cartesian product: ๐ท(๐ถ × ๐ท) = {Ø, {(1, 2)}, {(1, 3)}, {(1, 2), (1, 3)}} Cartesian product of power sets: ๐ท(๐ถ) × ๐ท(๐ท) = {(Ø, Ø), (Ø, {2}), (Ø, {3}), (Ø, {2, 3}), ({1}, Ø), ({1}, {2}), ({1}, {3}), ({1}, {2, 3})} We notice that ๐ท(๐ถ × ๐ท) and ๐ท(๐ถ) × ๐ท(๐ท) are different sets. In fact, they do not even have the same cardinality in this example. In general, we notice that |๐ท(๐ถ × ๐ท)| = 2|๐ถ|⋅|๐ท| And, on the other hand, |๐ท(๐ถ) × ๐ท(๐ท)| = (2|๐ถ| )(2|๐ท| ) = 2|๐ถ|+|๐ท| So the cardinality of the two sets are not necessarily equal. Therefore, it is not true that for all sets ๐ถ and ๐ท, ๐ท(๐ถ × ๐ท) = ๐ท(๐ถ) × ๐ท(๐ท). 3 / 13 Problem 4 (5 points) For some set ๐, let ๐ด, ๐ต be elements of ๐ท(๐). Define ๐ด ๐ ๐ต if the symmetric difference of sets ๐ด and ๐ต is finite. Prove that ๐ is an equivalence relation. Answer We will prove that ๐ is reflexive, symmetric and transitive. Reflexive Suppose that ๐ด is an element of ๐ท(๐). We note that the symmetric difference of ๐ด with itself is: ๐ด ⊕ ๐ด = (๐ด\๐ด)โ(๐ด\๐ด) = ∅โ∅ = ∅ And the empty set is clearly a finite set. Thus, (๐ด, ๐ด) ∈ ๐ . This proves that ๐ is reflexive. Symmetric Suppose that ๐ด and ๐ต are elements of ๐ท(๐) such that (๐ด, ๐ต) ∈ ๐ . By definition of the relation, this means that ๐ด ⊕ ๐ต is a finite set. Now we look at the definition of symmetric difference: ๐ด ⊕ ๐ต = (๐ด\๐ต)โ(๐ต\๐ด) But the set union is commutative, so ๐ด ⊕ ๐ต = (๐ด\๐ต)โ(๐ต\๐ด) = (๐ต\๐ด)โ(๐ด\๐ต) = ๐ต ⊕ ๐ด. This means that the symmetric difference is also commutative. Hence, ๐ด ⊕ ๐ต and ๐ต ⊕ ๐ด are the same set, so if one is finite, the other one is also finite. Since ๐ต ⊕ ๐ด is a finite set, then (๐ต, ๐ด) ∈ ๐ . This proves that ๐ is symmetric. Transitive Suppose that ๐ด, ๐ต and ๐ถ are elements of ๐ท(๐) such that (๐ด, ๐ต) ∈ ๐ and (๐ต, ๐ถ) ∈ ๐ . By definition of the relation, this means that ๐ด ⊕ ๐ต and ๐ต ⊕ ๐ถ are finite sets. Recall that if ๐ and ๐ are two sets, then |๐โ๐| = |๐| + |๐| − |๐โ๐|. It follows that if ๐ and ๐ are both finite sets, then |๐โ๐| ≤ |๐| + |๐| so ๐โ๐ is also a finite set. We will prove that ๐ด ⊕ ๐ถ ⊆ (๐ด ⊕ ๐ต)โ(๐ต ⊕ ๐ถ), which suffices to conclude that ๐ด ⊕ ๐ถ is a finite set. Let ๐ฅ ∈ (๐ด ⊕ ๐ถ). By definition of symmetric difference, ๐ฅ is an element of ๐ด or ๐ฅ is an element of ๐ถ, but not both simultaneously. • • Case 1: ๐ฅ ∈ ๐ด, ๐ฅ ∉ ๐ถ o If ๐ฅ ∈ ๐ต, then ๐ฅ ∈ (๐ต ⊕ ๐ถ), so ๐ฅ ∈ (๐ด ⊕ ๐ต)โ(๐ต ⊕ ๐ถ) o If ๐ฅ ∉ ๐ต, then ๐ฅ ∈ (๐ด ⊕ ๐ต), so ๐ฅ ∈ (๐ด ⊕ ๐ต)โ(๐ต ⊕ ๐ถ) Case 2: ๐ฅ ∉ ๐ด, ๐ฅ ∈ ๐ถ o If ๐ฅ ∈ ๐ต, then ๐ฅ ∈ (๐ด ⊕ ๐ต), so ๐ฅ ∈ (๐ด ⊕ ๐ต)โ(๐ต ⊕ ๐ถ) o If ๐ฅ ∉ ๐ต, then ๐ฅ ∈ (๐ต ⊕ ๐ถ), so ๐ฅ ∈ (๐ด ⊕ ๐ต)โ(๐ต ⊕ ๐ถ) With this, we have shown that ๐ด ⊕ ๐ถ ⊆ (๐ด ⊕ ๐ต)โ(๐ต ⊕ ๐ถ). Therefore, ๐ด ⊕ ๐ถ is a finite set and (๐ด, ๐ถ) ∈ ๐ . This proves that ๐ is transitive. We have proven that ๐ is reflexive, symmetric and transitive, so it is an equivalence relationโ 4 / 13 Problem 5 (4 points) We draw cards from an ordinary deck of 52 playing cards. The cards are to be drawn successively at random and without replacement. What is the probability that the second heart appears on the seventh draw? Let: H = event that 1 heart appears in the first 6 cards drawn. J = event that it is a heart in the 7th draw. Answer Let ๐ป and ๐ฝ be the events as defined in the problem. We need to obtain ๐(๐ฝโ๐ป), that is, the probability that exactly 1 heart appears within the first 6 draws and that a heart appears in the 7th draw. For this calculation, we will use the definition of conditional probability (ZyBooks 7.3.1). ๐(๐ฑ|๐ฏ) = [1] ๐(๐ฑโ๐ฏ) ๐(๐ฏ) ๐(๐ฑโ๐ฏ) = ๐(๐ฑ|๐ฏ) ๐(๐ฏ) Now we will look at the event ๐ฏ. To count the number of ways in which exactly 1 heart appears in the first 6 cards drawn, we will consider the number of ways in which a heart can be the first card drawn and then the other 5 cards are not hearts. For the first card, there are 13 different ways to draw a heart, for the second card, there are 39 different ways to draw a non-heart, for the third card, there are 38 different ways to draw a non-heart, and so on. Then, we have to consider that the heart could be in any of the six positions of cards drawn. Hence, the cardinality is |๐ฏ| = ๐๐(๐๐)(๐๐)(๐๐)(๐๐)(๐๐)(๐) The total number of ways in which the 6 cards can be drawn is (๐๐)(๐๐)(๐๐)(๐๐)(๐๐)(๐๐). Thus, the probability of the event ๐ฏ is: ๐๐(๐๐)(๐๐)(๐๐)(๐๐)(๐๐)(๐) ๐ท(๐ฏ) = ≈ ๐. ๐๐๐๐๐ (๐๐)(๐๐)(๐๐)(๐๐)(๐๐)(๐๐) Now we will look at ๐ท(๐ฑ|๐ฏ). If one heart has been drawn in the first six cards, then there are 12 hearts left in the deck of a total of 46 cards left. We can calculate the probability as: ๐๐ ๐ท(๐ฑ|๐ฏ) = ≈ ๐. ๐๐๐๐๐ ๐๐ Finally, the probability we seek to calculate can be obtained using formula [1] ๐(๐ฑโ๐ฏ) = ๐(๐ฑ|๐ฏ) ๐(๐ฏ) ≈ (๐. ๐๐๐๐๐)(๐. ๐๐๐๐๐) ≈ ๐. ๐๐๐๐๐ = ๐. ๐๐๐% The probability that the second heart appears on the seventh draw is (approximately) 9.591%. 5 / 13 Problem 6 (4 points) When is the sum of ๐ consecutive integers divisible by ๐? Prove your answer. Answer Let ๐ be the sum of ๐ consecutive integers, starting at some integer ๐. ๐ = ๐ + (๐ + 1) + (๐ + 2) + โฏ + (๐ + ๐ − 1) ๐ = ๐๐ + (1 + 2 + 3 + โฏ + (๐ − 1)) Here we recognize the Gaussian sum 1 + 2 + 3 + โฏ + (๐ − 1) = (๐−1)๐ 2 , so ๐(๐ − 1) 2 We notice that the first term ๐๐ is a multiple of ๐, so it is always divisible by ๐. If the second term is divisible by ๐, then so is ๐. Inversely, if the second term is not divisible by ๐, then ๐ is not divisible by ๐ either. We will look at the following two cases. ๐ = ๐๐ + • Case 1: ๐ is even. Then, there exists an integer ๐ such that ๐ = 2๐ 2๐(๐ − 1) = ๐๐ + ๐(๐ − 1) 2 We have that ๐ and (๐ − 1) are relatively prime (gcd(๐ − 1, ๐) = 1), so they share no factors in common. Furthermore, ๐ is a submultiple of ๐, so ๐ cannot divide ๐. Hence, ๐ does not divide ๐(๐ − 1), which means that ๐ does not divide ๐. ๐ = ๐๐ + • Case 2: ๐ is odd. Then, there exists an integer ๐ such that ๐ = 2๐ + 1 ๐(2๐ + 1 − 1) = ๐๐ + ๐๐ = ๐(๐ + ๐) 2 Since ๐ and ๐ are both integers, it is clear that ๐(๐ + ๐) is an integer that is a multiple of ๐. Therefore, ๐ is divisible by ๐. ๐ = ๐๐ + It follows that the sum of ๐ consecutive integers is divisible by ๐ only when ๐ is oddโ 6 / 13 Problem 7 (4 points) Is the number 1625 + 2516 divisible by 8? Is it divisible by 17? Justify your answer. Do not solve just by doing the division. No calculators are allowed for this question. You must show all your work, including details of any non-trivial multiplications, additions, etc. You must convince me that you can do the calculations and find the answer without a calculator. Answer Let ๐ = 1625 + 2516 . We note that 1625 is a power of 2, so it is even, but 2516 does not have 2 as a factor, so ๐ is the sum of an even number and an odd number. Therefore, ๐ is an odd number. Since ๐ is an odd number, it is not divisible by 2, so it is clearly not divisible by 23 = 8. We will now use congruences modulo 17 to find the residual of ๐ when divided by 17. ๐ ≡ 1625 + 2516 (๐๐๐ 17) ๐ ≡ 1625 + 2516 ≡ (17 − 1)25 + (17 + 8)16 ≡ (0 − 1)25 + (0 + 8)16 ≡ (−1)25 + 816 ๐ ≡ −1 + ((8)2 )8 ≡ −1 + (64)8 ≡ −1 + (17 ⋅ 3 + 13)8 ≡ −1 + (0 + 13)8 ๐ ≡ −1 + ((13)2 )4 ≡ −1 + (169)4 ≡ −1 + (17 ⋅ 10 − 1)4 ≡ −1 + (0 − 1)4 ๐ ≡ −1 + (−1)4 ≡ −1 + 1 ≡ 0 (๐๐๐ 17) The residual modulo 17 of ๐ is zero, so it is divisible by 17. We conclude that ๐๐๐๐ + ๐๐๐๐ is not divisible by 8, but it is divisible by 17. 7 / 13 Problem 8 (4 points) Solve this instance of Instant Insanity by providing the correct two subgraphs. We will solve the puzzle by following these steps: 1. Number the cubes from 1 to 4. 2. Draw a graph with each vertex representing a color. 3. For each of the three pairs of opposite faces on each cube, draw an edge between the two vertices of the corresponding colors, labeling that edge by the number of that cube. 4. Look for a loop that visits each color once, with a different label on each edge and mark the loop on the graph. This loop will represent the top edges of the arrangement of cubes. 5. Look for a second loop with a different label on each edge that does not use any of the edges in the first loop and mark it on the graph. This loop will represent the front/back edges of the arrangement of cubes. 4 2 1 1 3 2 3 4 2 3 4 1 Figure 1. Graph of the insanity cubes. Solution: The first loop is R-4-G-2-B-1-W-3-R and is colored in orange. The second loop is R-2-R, W-3-B-4-W, G-1-G, and is colored in purple. 8 / 13 Problem 9 (4 points) Given an acyclic graph ๐บ with ๐ vertices and ๐ ≥ 1 connected components. Find and prove how many edges in ๐บ. Answer We will use the fact that a tree (connected, acyclic graph) with ๐ vertices has ๐ − 1 edges. This was given in lecture 13B. Let ๐บ be an acyclic graph with ๐ vertices and ๐ ≥ 1 connected components as given. Let ๐บ1 , ๐บ2 , … , ๐บ๐ be the ๐ connected component of ๐บ. Since each of the ๐บ๐ is acyclic (because it is part of ๐บ) and is a connected component, then it follows that each ๐บ๐ is a tree. Let us also call ๐๐ the number of nodes in ๐บ๐ . As per the theorem given in lecture 13B, each ๐บ๐ has ๐๐ − 1 edges. The ๐บ๐ are different connected components, so there is no edge that belongs to two of them at the same time. Therefore, the total number of edges in ๐บ is the sum of the total number of edges in the connected components. Likewise, each node belongs to only one connected component, so the total number of nodes is the sum of the total number of nodes in the connected components. ๐๐๐๐๐ = (๐1 − 1) + (๐2 − 1) + โฏ + (๐๐ − 1) ๐ ๐ก๐๐๐๐ (1 + 1 + โฏ + 1) ๐๐๐๐๐ = (๐1 + ๐2 + โฏ + ๐๐ ) − โ ๐๐๐๐๐ = ๐ − ๐ Thus, we have proven that the number of edges in ๐ฎ is ๐ − ๐โ 9 / 13 Problem 10 (3 points) Suppose that the adjacency matrix for some graph is nilpotent. Recall that a nilpotent matrix ๐จ is one for which ๐จ๐ = ๐ (zero matrix) for some ๐. What does that tell you about the graph? Be specific and detailed. Include two useful examples. Answer Let ๐บ be the graph and let ๐ข and ๐ฃ be two vertices in ๐บ. The Graph Power Theorem (ZyBooks 12.6.1) tells us that there is an edge from ๐ข to ๐ฃ in ๐บ ๐ if and only if there is a walk of length ๐ from ๐ข to ๐ฃ in ๐บ. Furthermore (ZyBooks 12.71.1), if ๐ด is the adjacency matrix for ๐บ, then for any ๐ ≥ 1, ๐ด๐ is the adjacency matrix of ๐บ ๐ , where Boolean addition and multiplication are used to compute ๐ด๐ . Suppose that ๐ด is nilpotent, so there exists some positive integer ๐ for which ๐ด๐ = ๐. This means that there is no walk between any two points in ๐บ of length ๐ or more. Now let us consider a graph ๐บ1 that is an undirected graph and has at least one edge. Let ๐ข1 and ๐ฃ1 be the vertices connected by an edge in ๐บ1 . Since 〈๐ข1 , ๐ฃ1 〉 is a valid walk and 〈๐ฃ1 , ๐ข1 〉 is also a valid walk, then for any positive integer ๐, it is always possible to form a walk of length ๐ by simply walking back and forth between ๐ข1 and ๐ฃ1 ๐ times. Therefore, by the cited theorem, the adjacency matrix of an undirected graph with at least one edge is not nilpotent, because there is always a walk between two points of length ๐ for any positive integer ๐. Now let us consider a directed graph ๐บ2 that has at least one cycle. Given any positive integer ๐, it is always possible to traverse the vertices in the cycle to form a walk of length ๐, walking around the cycle many times if needed. Therefore, by the cited theorem, the adjacency matrix of a directed graph with a cycle is not nilpotent, because there is always a walk between two points of length ๐ for any positive integer ๐. It is then concluded that if ๐ด is nilpotent, then ๐บ cannot be undirected and cannot have a cycle, i.e., ๐บ is a directed acyclic graph. Example 1 Rooted tree with four vertices. a b c d ๐ ๐ด= ๐ ๐ ๐ ๐ 0 0 0 0 ๐ 1 0 0 0 ๐ 1 0 0 0 ๐ 0 0 0 0=[ 0 1 0 0 0 0 0 1 0 0 0 0 ๐ด2 = [ ] 0 0 0 0 0 0 0 0 The graph is directed acyclic and ๐ด is nilpotent. 1 0 0 0 1 0 0 0 0 0 ] 1 0 0 0 ๐ด3 = [ 0 0 0 0 0 0 0 0 0 0 0 0 ]. 0 0 10 / 13 Example 2 Directed graph that consists of a single cycle of 4 vertices. b a d c ๐ ๐ด= ๐ ๐ ๐ ๐ 0 0 0 1 ๐ 1 0 0 0 ๐ 0 1 0 0 ๐ 0 0 0 0=[ 0 1 1 0 1 0 0 0 0 1 0 0 0 0 ] 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 ๐ด2 = [ ] ๐ด3 = [ ] ๐ด4 = [ ] ๐ด5 = [ ] 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 5 Notice that ๐ด = ๐ด, so the powers of ๐ด repeat in cycles of 4. Hence ๐ด is not nilpotent in this directed graph with a cycle. 11 / 13 Problem 11 (8 points) Use induction to prove the number of nodes in rooted 5-ary tree with ๐ levels, when all possible nodes are present. Answer We will use induction over the non-negative integer ๐ to prove that the number of nodes is ๐๐ = Let us first look at some base cases. For ๐ = 0, the tree is a single vertex, and ๐0 = for ๐ = 0. 50+1 −1 5−1 5๐+1 −1 5−1 . 4 = 4 = 1. This shows that our formula is correct For ๐ = 1, the 5-ary tree is as shown in Figure 2. 1 2 3 4 6 5 Figure 2. 5-ary tree with 1 level when all possible nodes are present. The nodes have been labeled sequentially and it is evident that there are 6 nodes. Using our proposed formula, we get ๐1 = 51+1 −1 5−1 = 24 4 = 6. This shows that our formula is correct for ๐ = 1 For ๐ = 2, the 5-ary tree is as shown in Figure 3. 7 1 2 3 4 8 5 6 12 13 14 15 16 9 10 11 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Figure 3. 5-ary tree with 2 levels when all possible nodes are present. Counting one by one, we find that there is a total of 31 nodes. Using our proposed formula, we get ๐2 = 52+1 −1 5−1 = 124 4 = 31. This shows that our formula is correct for ๐ = 2. Now let us assume that the number of nodes in a rooted 5-ary tree with ๐ levels, when all possible nodes are present, is given by ๐๐ = 5๐+1 −1 5−1 . We will construct a 5-ary tree with ๐ + 1 levels in the following manner: i. Take one 5-ary tree with ๐ levels that has all possible nodes present and copy it 5 times, all at the same level. This gives us a forest of 5 rooted 5-ary trees. 12 / 13 ii. iii. Add one new node above the 5 rooted trees. Add one directed edge from this new node to the root of each of the five 5-ary trees. The new node becomes the only root of the newly constructed tree, which has ๐ + 1 levels. Since each of the 5-ary trees with ๐ levels that we used has all their possible nodes, and the root of the new tree has 5 children, then the new tree with ๐ + 1 levels has all its possible nodes. To count the number of nodes in the new tree with ๐ + 1 levels, we will consider that our hypothesis of induction is true for each of the five 5-ary trees with ๐ levels that we used, and then we added just one additional node, so the total number of nodes is given by: ๐๐+1 = 5๐๐ + 1 = 5 ( ๐๐+1 = 5๐+2 −5 5−1 +1= 5๐+1 −1 5(5๐+1 )−5 5−1 5−1 )+1= 5๐+2 −5+5−1 5−1 = +1 5๐+2 −1 5−1 And this formula matches our proposed formula of ๐๐ when ๐ = ๐ + 1. This concludes our proof by induction. With this, we have proved that the number of nodes in a rooted 5-ary tree with ๐ levels, when all possible nodes are present is ๐๐ = 5๐+1 −1 5−1 โ 13 / 13