糊涂蚂蚁 I
Confused Ant I
题目详情
一只蚂蚁在立方体的某个顶点上,只能沿棱行走。每一步它等概率走向 3 个相邻顶点之一。
问:从起点到达对顶点(空间对角线另一端顶点)平均要走多少条棱?
An ant is standing on one vertex of a cube and can only walk along the edges. The ant is confused and moves randomly along the edges at random. How many edges, on average, will the ant travel to reach the opposite vertex of the cube?
解析
按与终点的“层级距离”分组,设:
- :从起点(距离 0 层)到终点的期望步数;
- :从与起点相邻的顶点(3 个,距离 1 层)的期望步数;
- :从与终点相邻的顶点(3 个,距离 2 层)的期望步数;
- :终点。
转移:
- 起点必到第 1 层:。
- 第 1 层:以 回到起点,以 去第 2 层:
- 第 2 层:以 到终点,以 回到第 1 层:
联立解得 ,因此
Original Explanation
There are a total of eight vertices: one is the starting vertex denoted , three are the vertices adjacent to the starting vertex denoted , three are the vertices adjacent to the ending vertex denoted , and one is the ending vertex denoted . Let be the expected number of edges travelled to arrive at from . This problem has now been set up as calculating the expecting hitting time of a state within a Markov chain: