Recurrent problems 1.1 The Tower of Hanoi

Source: Internet
Author: User

1.1 The Tower of Hanoi

Let's look first at a neat little puzzle called the tower of Hanoi,
Ted by the French mathematician Edouard Lucas in 1883. We are given
A tower of eight disks, initially stacked in decreasing size on one of three pegs

Let's first look at the small confusion of the next one called qingta. It was discovered by French mathematician Edouard Lucas in 1883. First, a few disks, such as eight disks, are stacked on each dingtalk.

The objective is to transfer the entire tower to one of the other pegs, moving
Only one disk at a time and never moving a larger one onto a smaller.

Our goal is to move all the discs on one tower to the other. Each time, we can only move one disc and do not place the larger ones on the smaller ones.

Lucas [208] furnished his toy with a romantic legend about a much larger
Tower of Brahma, which supposedly has 64 disks of pure gold resting on three
Diamond needles. At the beginning of time, he said, God placed these golden
Disks on the first needle and ordained that a group of priests shold Transfer
Them to the third, according to the Rules abve. The priests reportedly work
Day and night at their task. When they finish, the tower will crumble and
The world will end.

Lucas [208] fabricated a romantic legend about a larger
Fan Tian tower is said to have 64 pure gold disks in three
Diamond needle. At the beginning, he said, "God has put these gold
The disk is placed on the first pin and the group of priests will transfer them to the third nail according to the above rules.
The priest works all day long to complete the task. When they succeed, that is, the end of the world.

It's not immediately obvious that the puzzle has a solution, but a little
Thought (or having seen the problem before) convinces us that it does. Now
The question arises: What's the best we can do? That is, how many moves
Are necessary and sufficient to perform the task?

There is no obvious solution to this confusion, but it can be done after consideration.

The question is: what should we do best? That is to say, the most effective method is used to solve this problem.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.