Bob is very familiar with the famous mathematical puzzle/game, "Tower of Hanoi," which consists of three upright rods and disks of different sizes that can slide onto any of the rods. The game begins with a stack of
Only one disk can be moved at a time.
A valid move consists of taking the top disk from one stack and placing it onto another stack (or an empty rod).
No disk can be placed on top of a smaller disk.
Moving on to a variant of this game, consider a long room
Bob begins the game standing at square
Unfortunately, Bob is also drunk. On a given move, Bob will either stumble one square to the left or one square to the right with equal probability, unless Bob is at either end of the room, in which case he can only move in one direction. Despite Bob's inebriated state, he is still capable of following the rules of the game itself, as well as choosing when to pick up or put down a disk.
The following animation depicts a side-view of a sample game for
Let
Interestingly enough, the result is always an integer. For example,
Find the last nine digits of
鲍勃对著名数学谜题 “汉诺塔” 很是熟悉。现有三根竖直的杆子和若干大小互异、可在任何杆子上上下滑动的圆盘。游戏开始时,所有
一次只能移动一个圆盘。
你只能从某堆顶端取盘,并将其置于另一堆(或空杆)的顶端。
不能将某个圆盘放在比它小的圆盘上方。
接着,我们考虑该游戏的一个变种。现有一条由
鲍勃初始时在
不幸的是,鲍勃喝醉了。除非鲍勃已处于长廊的两端,只能往一个方向走,否则,鲍勃每次移动都只能等概率的向左或向右蹒跚地行进一格。当然,纵使鲍勃已酩酊大醉,他仍然能够遵守游戏规则,并能理智的选择何时拿取、放下圆盘。
下面的动图从侧面视角展示了一例
记
有趣的是,这个期望一定是一个整数。例如,
求
点 这个链接 回到源站。
点 这个链接 回到详细版题目目录。