In the Tower of Hanoi puzzle, suppose our goal is to transfer all n disks from peg 1 to peg 3, but we cannot move a disk directly between pegs 1 and 3. Each move of a disk must be a move involving peg 2. As usual, we cannot place a disk on top of a smaller disk.
a) Find a recurrence relation for the number of moves required to solve the puzzle for n disks with this added restriction.
b) Solve this recurrence relation to find a formula for the number of moves required to solve the puzzle for n disks.
c) How many different arrangements are there of the n disks on three pegs so that no disk is on top of a smaller disk?
d) Show that every allowable arrangement of the n disks occurs in the solution of this variation of the puzzle.
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Discrete Mathematics and Its Applications
- Suppose that the check digit is computed as described in Example . Prove that transposition errors of adjacent digits will not be detected unless one of the digits is the check digit. Example Using Check Digits Many companies use check digits for security purposes or for error detection. For example, an the digit may be appended to a -bit identification number to obtain the -digit invoice number of the form where the th bit, , is the check digit, computed as . If congruence modulo is used, then the check digit for an identification number . Thus the complete correct invoice number would appear as . If the invoice number were used instead and checked, an error would be detected, since .arrow_forwardA path is 2 meters wide and n meters long. It is to be pave using paving stones of sizes 1m x 2m and 2m x 2m. Let pn denote the number of pavings of a 2 x n path. Then (a) p1 = (b) p2 = Next, find a recurrence relation and solve for pn; then use your solution to find (c) p10 = (d) p15 =arrow_forwardUse the characteristic root technique to solve the following recurrence relations ( find a closed-form expression): a) an= 7an-1 - 10an-2 with a0 = 2 a1 = 3 b) an= 3an-1 + 4an-2 with a0 = 5 a1 = 8arrow_forward
- Find and solve a recurrence relation for the number of ways to park motorcycles and cars in a row of n spaces if each motorcycle requires one space and each car needs two spacesarrow_forwardFind the solution to the following lhcc recurrence:arrow_forwardConsider the nonhomogeneous linear recurrence relation an=2an-1 + 27. Click and drag the given steps to their corresponding step names to show that an = n2" is a solution of the given recurrence relation in the correct order. Step 1 Step 2 Step 3 The right-hand side of the given recurrence relation can be written as 2(n-1)2(-1) + 2". If an = n2n for all n, then an-1= 2(n − 1)2(n − 1). If an = n2n for all n, then an-1= (n − 1)2(n − 1). The right-hand side of the given recurrence relation can be written as 2(n-1)2(-1)+2(-1). Substituting both equations into the recurrence, we obtain (n- 1)2"-1+2= n2"-1 Substituting both equations into the recurrence, we obtain (n- 1)2"+2" = n2".arrow_forward
- Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage LearningAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningElements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,
- Holt Mcdougal Larson Pre-algebra: Student Edition...AlgebraISBN:9780547587776Author:HOLT MCDOUGALPublisher:HOLT MCDOUGALCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning