糊涂蚂蚁 II
Confused Ant II
题目详情
一只蚂蚁从立方体某顶点出发,每一步等概率走向 3 个相邻顶点之一。求它回到起点所需步数的期望。
An ant walks the corner of a 3D cube and moves to one of the three adjacent vertices with equal probability at each step. Find the expected number of steps needed for the ant to return to the vertex it started at.
解析
这是一个在 8 个顶点上的 3-正则图随机游走。
该链的平稳分布是均匀分布(正则图),即每个顶点平稳概率为 。
马尔可夫链性质:从状态 出发回到 的期望回返时间等于 。
因此期望回返步数为
Original Explanation
This seems like a very complicated problem on the surface but you can actually use Markov Chains to solve this problem. There is a lot of symmetry in cubes to help us decrease the number of states involved in this question. Let’s let your starting state be .
No matter which way the ant goes, by symmetry it’ll basically always be the same position. That position being 1 side length away from the starting vertex. Let's denote the expected number of moves to get back to the initial vertex as . Thus .
Let be the expected number of moves from being in the state of 2 side lengths away from the starting vertex. Finally, let be the expected moves from being at the opposite vertex of the starting vertex. The equations for all these states are:
We know that . Solving all of these equations, we get . Thus it takes 8 steps for the ant to start at one vertex of the cube and return to it.