Towers of hanoi how many states




















Viewed times. Tom Tom 1. I can not find an easier way right now. Add a comment. Active Oldest Votes. If there are three stacks of one disc each then the position is legal. Upcoming Events. Featured on Meta. Now live: A fully responsive profile. Related Courses. Learn in-demand tech skills in half the time. Early Access Courses. Assessments New. Free Trial New. For Business.

For Educators. Become an Affiliate. Terms of Service. Business Terms of Service. The Tower of Hanoi is a famous problem which was posed by a French mathematician in What you need to do is move all the disks from the left hand post to the right hand post. You can only move the disks one at a time and you can never place a bigger disk on a smaller disk.

The aim is to try and complete the transfer using the smallest number of moves possible. For example if you have three disks, the minimum number of moves is 7. If you have four disks, the minimum number of moves is Can you complete the problem in the smallest number of moves possible?

Many people want to know what the minimum number of moves needed is when you have 5,6,7 or any number of disks. This can be surprisingly easy to show and will save you time wondering whether you have actually found the most efficient way to solve the Tower of Hanoi problem. First of all it is easy to show that if you only have one disk it will take only one move.

It is also easy to show that if you have 2 disks the minimum number of moves is 3. After this, it is possible to show the minimum number of moves using a recursive pattern.



0コメント

  • 1000 / 1000