Towers of Hanoi
Introduction
The Towers of Hanoi is a mathematical puzzle or game invented in 1883 by French mathematician Eduard Lucas.Este solo is a set of eight discs of increasing radius to be stacked back into one of three stakes on a board. The objective is to create another stack of cuttings by following certain rules. The problem is well known in computer science and appears in many textbooks as an introduction to the theory of algorithms.
In its most traditional form, consists of three vertical rods. In one of the rods are stacked any number of disks (made of wood) to determine the complexity of the solution, generally considered eight records. The disks are stacked on a rod in decreasing size. No two identical disks, all of which are stacked from largest to smallest radius of the rods, leaving the other two vacant rods. The game is to move all the disks in the rod busy (ie the one with the tower) to one of the other rods vacancies. To achieve this objective, you must follow three simple rules:
1. You can only move one disk at a time.
2. A larger disk can not rely on one smaller than himself.
3. You can only move the disk that is on top on each rod.
There are several ways to make the final solution, all following different strategies.
0 comments:
Post a Comment