What is the probability that mouse with reach state A before state B

守給你的承諾、 提交于 2019-12-14 03:37:45

问题


Maze

I have a maze as shown above(use the link) and state 3 contains prize while state 7 contains shock. a mouse can be placed in any state from 1 to 9 randomly and it move through the maze uniformly at random

Pi denote the probability that mouse reaches state 3 before state 7, given that AIM started in compartment i.

how to compute Pi for ∈ {1,2,3,4,5,6,7,8,9}.


回答1:


Let Px be the probability that the game ends in position 3 if it starts in position x.

We know that P3=1 and P7=0

If you start in any other cell, then after you move you are essentially beginning the game again in the new cell. The probabilities for the other 7 cells can therefore be calculated from the probabilities for their neighbors that they can move to:

P5 = P2/4 + P4/4 + P6/4 + P8/4

P2 = P1/3 + P5/3 + P3/3

P1 = P2/2 + P4/2

... etc.

For each cell you have a linear equation -- 9 equations for 9 cells. Use Gaussian elimination or similar technique to solve the system of equations for the 9 probabilities.




回答2:


Intuitively, it seems that the probabilities of landing on either square would be even, as long as the starting point is random.

+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+

If the mouse starts in position 3 or 7, the game is over.

If the mouse starts in position 1, there is a 1/3 chance of it ending up in position 2, 5 or 4, and so on.

IF we start with each cell containing a 1/9 probability, we can compute the frequency distribution for the next generation by multiplying the current value by the probability of a mouse moving in from another location. For example, in the second generation. Cell 1 will have 1/5 of the mice from cell 2 + 1/5 of the mice from cell 4 and 1/8 the mice from cell 5. So, the next generation of cell 1 is (1/9)(1/5)+(1/9)(1/5)+(1/9)(1/8), or 21/360, or 0.0583. We can then compute the probabilities for all the remaining cells.

Here are the first five generations in a terribly formatted table

    1       2       3       4       5
1   0.111   0.058   0.059   0.046   0.039
2   0.111   0.095   0.078   0.065   0.054
3   0.111   0.169   0.228   0.274   0.312
4   0.111   0.095   0.078   0.065   0.054
5   0.111   0.163   0.115   0.101   0.082
6   0.111   0.095   0.078   0.065   0.054
7   0.111   0.169   0.228   0.274   0.312
8   0.111   0.095   0.078   0.065   0.054
9   0.111   0.058   0.059   0.046   0.039


来源:https://stackoverflow.com/questions/48373320/what-is-the-probability-that-mouse-with-reach-state-a-before-state-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!