MATH 2056 Discrete Mathematics II, Fall 2015 October 8, 2015 ASSIGNMENT #4 (Solution) Problem #8, p. 302: Find the first four terms of the recursively defined sequence vk = vk−1 + vk−2 + 1, for all integers k ≥ 3 v1 = 1, v2 = 3 Solution: v3 = v2 + v1 + 1 = 3 + 1 + 1 = 5, v4 = v3 + v2 + 1 = 5 + 3 + 1 = 9. The first four terms of the sequence are 1, 3, 5, 9. Problem #12, p. 302: Let s0 , s1 , s2 , . . . be defined by the formula sn = Show that the sequence satisfies the recurrence relation sk = (−1)n for all integers n ≥ 0. n! −sk−1 . k Solution: −sk−1 =− k (−1)k−1 (k−1)! k (−1)k−1 =− k · (k − 1)! (−1)k−1 =− k! (−1)k−1 = (−1) · k! (−1)k = k! = sk by the definition of sk−1 rewriting the fraction in equivalent form by the properties of the factorial factoring out − 1 by the properties of the exponents by the definition of sk Problem #16, p. 302: Use the recurrence relation and values for the Tower of Hanoi sequence m1 , m2 , m3 , . . . discussed in Example 5.6.5 to compute m7 and m8 . Solution: m1 = 1, m2 = 3, m3 = 7, m4 = 2m3 + 1 = 2 · 7 + 1 = 15, m5 = 2m4 + 1 = 2 · 15 + 1 = 31, m6 = 2m5 + 1 = 2 · 31 + 1 = 63, m7 = 2m6 + 1 = 2 · 63 + 1 = 127, m8 = 2m7 + 1 = 2 · 127 + 1 = 255. MATH 2056 Discrete Mathematics II, Fall 2015 October 8, 2015 Problem #21, p. 303: Double Tower of Hanoi: In this variation of the Tower of Hanoi there are three poles in a row and 2n disks, two of each of n different sizes, where n is any positive integer. Initially one of the poles contains all the disks placed on top of each other in pairs of decreasing size. Disks are transferred one by one from one pole to another, but at no time may a larger disk be placed on top of a smaller disk. However, a disk can be placed on top of one of the same size. Let tn be the minimum number of moves needed to transfer a tower of 2n disks from one pole to another. a. Find t1 and t2 . b. Find t3 . c. Find a recurrence for t1 , t2 , t3 , . . .. Solution: a. There are 2 disks only, of the same size, when n = 1. Therefore, we can move both directly to the desired pole. Hence, t1 = 2. (Note that we cannot accomplish this in less than two moves, since there are 2 disks to be moved, and each move involves one disk only.) When n = 2, we have 4 disks, 2 larger and 2 smaller. Say, the disks are on pole A and we want to move them to pole C. The following sequence of moves, using the notation used in class, accomplishes the task with 6 moves: A→B A→B A→C A→C B→C B→C To argue that 6 is the minimal number of moves, we have to consider (the fact that) the movement of the larger disks is not possible before we remove the smaller disks from the initial pole. This requires at least 2 moves. Further, moving the larger disks to the desired pole requires (at least) 2 moves. Then, stacking the smaller disks on top of the larger ones requires additional (at least) 2 moves. To summarize, we have proven that t2 = 6. b. t3 = 14. To establish this, reason as above. The two largest disks cannot be moved before 4 disks on top of them are removed from the pole. This requires at least 4 moves. However, with 4 moves we are going to occupy both other poles, and we still cannot move the largest disks from their initial position. Thus, we not only have to remove the 4 top disks from the initial pole, but to have them on one of the other poles. This, as proven in a. requires at least 6 moves. Then, we move the 2 largest disks to the desired pole in 2 moves (minimal, cannot be done in 1 move), and then we have to move the 4 smaller disks on top of the two largest, which requires no less that 6 moves, as already argued. We have a total of 14 moves. c. It is clear from the reasoning in b. that the recurrence is tn = 2tn−1 + 2.
© Copyright 2026 Paperzz