Abstract

The famous Tower of Hanoi puzzle was invented by Edouard Lucas in 1883. This puzzle proposed three pegs, and the number of disks with different size. The puzzle starts with the disks in a neat stack in ascending order of size on one peg, the smallest at the top. The objective of the puzzle is to move the entire stack to another peg, by following these simple rules: (1) only one disk can be moved at a time; (2) Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack; (2) No disk is placed on the top of a smaller disk and the minimum number of move is the goal of this puzzle. Many variations have been proposed as exercises and challenges. Some have more than three pegs and some with colours. This paper poses a new variation. There are two or more disks with similar size. The goal is to move each stack of the disk from its initial location to its final location. As usual, disk must be moved one at a time and a disk can never sit above a disk of smaller. Let n be a number of disks and there are p similar size disks. The disks are labelled from 1 to n − p + 1 in increasing order of size so the disk with similar size has the same label. If m is the label of the similar disks, so Mp(n; m) is the minimum number moves needed to move all the disks in original peg to destination peg. We have,M2(n; m) = 2n−1 + 2n−m−1 − 1M3(n; m) = 2n−2 + 2n−m−1 − 1The number moves needed to move if there are p1 similar size disks m1 and p2 similar size disks m2 isMp1,p2 (n; m1, m2) = 2n−p1−p2 + 2[(p12−m1 + p22−m2) − (2−m1 + 2−m2 + 1] − 1

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call