英语翻译So the real problem is that problem solving does not bel

英语翻译
So the real problem is that problem solving does not belong to the things Charlie is good at.Actually,the only thing Charlie is really good at is "sitting next to someone who can do the job".And now guess what — exactly!It is you who is sitting next to Charlie,and he is already glaring at you.
Luckily,you know that the following algorithm works for n = 1 disks on tower A are fixed and the remaining n-k disks are moved from tower A to tower B using the algorithm for four towers.Then the remaining k disks from tower A are moved to tower D using the algorithm for three towers.At last the n - k disks from tower B are moved to tower D again using the algorithm for four towers (and thereby not moving any of the k disks already on tower D).Do this for all k 2 ∈{1,.,n} and find the k with the minimal number of moves.
So for n = 3 and k = 2 you would first move 1 (3-2) disk from tower A to tower B using the algorithm for four towers (one move).Then you would move the remaining two disks from tower A to tower D using the algorithm for three towers (three moves).And the last step would be to move the disk from tower B to tower D using again the algorithm for four towers (another move).Thus the solution for n = 3 and k = 2 is 5 moves.To be sure that this really is the best solution for n = 3 you need to check the other possible values 1 and 3 for k.(But,by the way,5 is optimal...)
lqsd1331 1年前 已收到1个回答 举报

huangshiwan 幼苗

共回答了20个问题采纳率:85% 举报

So the real problem is that problem solving does not belong to the things Charlie is good at. Actually, the only thing Charlie is really good at is "sitting next to someone who can do the job". And now guess what — exactly! It is you who is sitting next to Charlie, and he is already glaring at you.
真正的问题在于解决问题并不属于查理的强项.事实上,查理唯一最会干的事就是“紧挨着坐在一个能干活儿的人的身边”.你猜怎么着? 对啦!您正是坐在查理身旁的那位,他现在正不怀好意地盯着你瞧呢.
Luckily, you know that the following algorithm works for n = 1 disks on tower A are fixed and the remaining n-k disks are moved from tower A to tower B using the algorithm for four towers.Then the remaining k disks from tower A are moved to tower D using the algorithm for three towers. At last the n - k disks from tower B are moved to tower D again using the algorithm for four towers (and thereby not moving any of the k disks already on tower D). Do this for all k 2 ∈{1, . , n} and find the k with the minimal number of moves.
所幸的是,你知道下面这种算法对 n= 1 个在A那一摞的圆盘数量是固定的,采用四摞的步骤把剩下的 n-k 个圆盘从A摞移到B摞.接着用三摞的步骤把剩下的 k 个圆盘从A摞移到D摞.最后,再一次用四摞的步骤把剩下的 n-k 个圆盘从B摞移到D摞(这样就不会去动到任何已经在D摞的 k 个圆盘啦. 在所有k 2 ∈{1, . , n} 时重复这个程序,这样就能找出移动次数最少的 k 值了.
So for n = 3 and k = 2 you would first move 1 (3-2) disk from tower A to tower B using the algorithm for four towers (one move). Then you would move the remaining two disks from tower A to tower D using the algorithm for three towers (three moves). And the last step would be to move the disk from tower B to tower D using again the algorithm for four towers (another move). Thus the solution for n = 3 and k = 2 is 5 moves. To be sure that this really is the best solution for n = 3 you need to check the other possible values 1 and 3 for k. (But, by the way, 5 is optimal. . . )
因此当 n = 3 而 k = 2 时你首先将采用四摞的步骤把1个(3-2) 圆盘从A摞移到B摞(移动一次“走一步”).接着用三摞的步骤把剩下的2个圆盘从A摞移到D摞(走三步).而最后一步将是再一次用四摞的步骤把剩下的最后1个圆盘从B摞移到D摞(又算一步).如此当 n = 3 而 k = 2 时的答案就是移动五次(走五步).要想确定这是 n=3 时的最佳方案,你必须查一下其他当K 在1和3时的结果.(但,顺便一提的,5会是最理想的...)
注:听来是挺有趣的某种数学理论实验...

1年前

7
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.012 s. - webmaster@yulucn.com