1
votes

My Question is that I have a Tower of Hanoi with 5 pegs but movement is limited to

Start -> Aux1 <-> Aux2 <-> Aux3 -> Destination

  1. Start can only move out
  2. Only Aux1, Aux2, Aux3 can exchange disks
  3. Once a disk arrive Destination, it cannot go back

How can I expand the algorithm from 3 peg to 5 peg version with n disks?

n = 1:

  • Aux1 -> Aux2
  • Aux2 -> Aux3

n >= 2 :

  • Hanoi(Aux1,Aux2,Aux3,n-1)
  • Aux1 -> Aux2
  • Hanoi(Aux3,Aux2,Aux1,n-1)
  • Aux2 -> Aux3
  • Hanoi(Aux1,Aux2,Aux3,n-1)
1
This video and its previous part may come in useful: youtube.com/watch?v=bdMfjfT0lKk3141
There's a very good explanation of the process in the accepted answer to Towers of Hanoi with K pegs; the only reason I'm not voting to close this as a duplicate is that yours is tagged C++ and the other is Haskell/F#.Ken White
@3131 So I will need to count using 0,1,2,3,4 with Sierpinski triangle right?Nientai Ho
here possibly a class mate Q duplicate tower of hanoi - How to not skip over a peg every recursionSpektre
Well, moderator deleted my answer and says to vote for close, but you cannot do that if the answer wasn't accepted or upvoted. See answer using Spektre's link.maraca

1 Answers

0
votes

Yes, the answer is 14^-3 because the inverse function overcomes the derivative throughout the newton 5th law