文件名称:hanio1
介绍说明--下载内容来自于网络,使用问题请自行百度
四柱汉诺塔问题的求解程序.解题思路:如a,b,c,d四柱. 要把a柱第n个盘移到目标柱子(d柱),先把上层
分两为两部份,上半部份移到b柱,下半部分移到c柱,再把第n盘移到
目标柱子,然后,c柱盘子再移到目标柱子,再把b柱盘子移到目标柱子.
细节地方:
上半部份移到b柱时,它的中间变量柱子是有二选一的.而下半部分
移到c柱时,它的中间变量柱子只有一个(因为一个柱子已被上半部份
占了).b,c也移到目标柱子时同理。-4-Tower of the solution process. Solution ideas : If a, b, c, d pillar. It is necessary to a first-n moved to the target site columns (columns d), the first two of the top two parts, on the part of the column moved to the b, c moved to the second half-and then moved to the site n goal post, and then c-plate then moved to the goal post and then moved to the b-plate goal post. details of places : move on the part of the b-time, the intermediate variables pole is one of the two election. and moved to the second half of c-, It intermediate pole only one variable (because a pole has been part of the first half of the total). b, c also moved to the goal post at the same reason.
分两为两部份,上半部份移到b柱,下半部分移到c柱,再把第n盘移到
目标柱子,然后,c柱盘子再移到目标柱子,再把b柱盘子移到目标柱子.
细节地方:
上半部份移到b柱时,它的中间变量柱子是有二选一的.而下半部分
移到c柱时,它的中间变量柱子只有一个(因为一个柱子已被上半部份
占了).b,c也移到目标柱子时同理。-4-Tower of the solution process. Solution ideas : If a, b, c, d pillar. It is necessary to a first-n moved to the target site columns (columns d), the first two of the top two parts, on the part of the column moved to the b, c moved to the second half-and then moved to the site n goal post, and then c-plate then moved to the goal post and then moved to the b-plate goal post. details of places : move on the part of the b-time, the intermediate variables pole is one of the two election. and moved to the second half of c-, It intermediate pole only one variable (because a pole has been part of the first half of the total). b, c also moved to the goal post at the same reason.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
hanio1.cpp
www.dssz.com.txt
www.dssz.com.txt
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
