Probability of Reaching Room Q in n Seconds

In summary, the conversation discusses the probability of a ball reaching room Q after n seconds, assuming it starts in room P and moves to adjacent rooms every second. It is impossible for the ball to reach Q in an odd number of moves, so the probability is 0. For even numbers of moves, the probability can be calculated using transition matrices and is equal to (2^(n/2)-1)/(3*2^(n/2)). One person confesses to approaching the problem in a difficult way before realizing there is a simpler solution.
  • #1
jacobi1
48
0
The image shows a network of rooms. A ball starts in room P. If the ball moves from one room to another adjacent one every second (assume no time is spent between the rooms) and it randomly chooses a room to go to, find the probability that it reaches room Q after n seconds. A room is adjacent to another room if and only if they share a side-for example, P is adjacent to three rooms.
View attachment 4010
 

Attachments

  • pq.png
    pq.png
    3.9 KB · Views: 90
Last edited:
Mathematics news on Phys.org
  • #2
jacobi said:
The image shows a network of rooms. A ball starts in room P. If the ball moves from one room to another adjacent one every second (assume no time is spent between the rooms) and it randomly chooses a room to go to, find the probability that it reaches room Q after n seconds. A room is adjacent to another room if and only if they share a side-for example, P is adjacent to three rooms.
To clarify, do you want the probability that the ball reaches Q for the first time after n seconds, or do you include the possibility that it may also have visited Q previously?
 
  • #3
I include the probability that it may have visited Q previously.
 
  • #4
jacobi said:
The image shows a network of rooms. A ball starts in room P. If the ball moves from one room to another adjacent one every second (assume no time is spent between the rooms) and it randomly chooses a room to go to, find the probability that it reaches room Q after n seconds. A room is adjacent to another room if and only if they share a side-for example, P is adjacent to three rooms.
[sp]

First, notice that each move of the ball takes it either from a shaded room to an unshaded room, or from an unshaded room to a shaded room. Since rooms P and Q are both unshaded, it is impossible for the ball to go from P to Q in an odd number of moves. So if $n$ is odd, the probability is $0$.

So assume that $n$ is even, and think about the transition probabilities after two moves. The only way to get from P to Q in two moves is to go via the shaded room between them. The probability of going to this shaded room from P is $1/3$, and the probability of then going from the shaded room to Q is $1/2$. So the probability of going from P to Q in two moves is $1/6$. By symmetry, the probability of going from P to R in two moves is also $1/6$. The probability of going from P back to P in two moves is therefore $2/3$ (since the probabilities must add up to $1$). Thus the matrix $T$ giving the transition probabilities between P, Q and R (in two moves) is $$T = \frac16\begin{bmatrix} 4&1&1 \\ 1&4&1 \\ 1&1&4 \end{bmatrix}.$$ Let $I$ denote the $3\times3$ identity matrix, and let $E$ be the idempotent matrix $$E = \frac13\begin{bmatrix} 1&1&1 \\ 1&1&1 \\ 1&1&1 \end{bmatrix}.$$ Then $T = \frac16(3I+3E) = \frac12(I+E)$, and $$T^k = \frac1{2^k}(I+E)^k = \frac1{2^k}\Bigl(I + {k\choose1}E + {k\choose2}E + \ldots + {k\choose k}E \Bigr) = \frac1{2^k}\bigl((2^k-1)E + I\bigr)$$ (using the fact that $E$ is idempotent). The $(2,1)$-element of this matrix is $\dfrac{2^k-1}{3\cdot 2^k}$. Therefore the probability of the ball being in room Q after an even number $n\;(=2k)$ of moves is $\dfrac{2^{n/2}-1}{3\cdot 2^{n/2}}$.[/sp]
 

Attachments

  • pqr.png
    pqr.png
    5.3 KB · Views: 81
  • #5
Congratulations, Opalg, your answer is correct. And much faster than mine, too.:)
I did this the hard way. As in, the long, stupid way.

View attachment 4025
I turned the network of rooms into a graph as in the image by considering the rooms as vertices and numbering them 1 through 9. Room P is vertex number 2 and Q is number 4. Then I made a Markov transition matrix representing the probabilities of going from one room to another.
\[
M=
\left[ {\begin{array}{ccccccccc}
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\frac{1}{3} & 0 & \frac{1}{3} & 0 & 0 & 0 & 0 & 0 & \frac{1}{3} \\
0 & \frac{1}{2} & 0 & \frac{1}{2} & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & \frac{1}{3} & 0 & \frac{1}{3} & \frac{1}{3} & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & \frac{1}{2} & 0 & 0 & \frac{1}{2} & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & \frac{1}{3} & 0 & \frac{1}{3} & \frac{1}{3} \\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\
0 & \frac{1}{2} & 0 & 0 & 0 & 0 & \frac{1}{2} & 0 & 0 \\
\end{array} } \right]
\]
(Crying)
Then I diagonalized it (with my handy link, because I refused to do it by hand), took it to the nth power, and I got
\[
M^n = PD^n P^{-1} =

\left[ {\begin{array}{ccccccccc}
1 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 0 \\
-\frac{1}{\sqrt 2} & 0 & \frac{1}{\sqrt 2} & 0 & -1 & 1 & 0 & 0 & 0 \\
0 & 1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 \\
\frac{1}{\sqrt 2} & -\sqrt 2 & -\frac{1}{\sqrt 2} & \sqrt{2} & -1 & 1 & 0 & 0 & 0 \\
-1 & 2 & -1 & 2 & 1 & 1 & 0 & 0 & 1 \\
-\frac{1}{2} & 0 & -\frac{1}{2} & 0 & 1 & 1 & 0 & -1 & -1 \\
0 & -2 & 0 & -2 & 1 & 1 & 1 & 2 & 1 \\
0 & \sqrt 2 & 0 & -\sqrt 2 & -1 & 1 & 0 & 0 & 0 \\
\frac{1}{2} & -1 & \frac{1}{2} & -1 & 1 & 1 & -1 & -1 & 0 \\
\end{array} } \right] \times
\]

\[
\left[ {\begin{array}{ccccccccc}
\left (-\frac{1}{\sqrt 2}\right )^n & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & \left (-\frac{1}{\sqrt 2} \right )^n & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & \left (\frac{1}{\sqrt 2} \right )^n & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & \left (\frac{1}{\sqrt 2} \right )^n & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & (-1)^n & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array} } \right] \times
\]

\[
\left[ {\begin{array}{ccccccccc}
\frac{2}{9} & -\frac{\sqrt 2}{3} & \frac{1}{9} & \frac{\sqrt 2}{6} & -\frac{1}{9} & -\frac{2}{9} & -\frac{1}{9} & \frac{\sqrt 2}{6} & \frac{1}{9} \\
\frac{1}{18} & -\frac{\sqrt 2}{12} & \frac{1}{9} & -\frac{\sqrt 2}{12} & \frac{1}{18} & -\frac{1}{18} & -\frac{1}{9} & \frac{\sqrt 2}{6} & -\frac{1}{18} \\
\frac{2}{9} & \frac{\sqrt 2}{3} & \frac{1}{9} & -\frac{\sqrt 2}{6} & -\frac{1}{9} & -\frac{2}{9} & -\frac{1}{9} & -\frac{\sqrt 2}{6} & \frac{1}{9} \\
\frac{1}{18} & \frac{\sqrt 2}{12} & \frac{1}{9} & \frac{\sqrt 2}{12} & \frac{1}{18} & -\frac{1}{18} & -\frac{1}{9} & -\frac{\sqrt 2}{6} & -\frac{1}{18} \\
\frac{1}{18} & -\frac{1}{6} & \frac{1}{9} & -\frac{1}{6} & -\frac{1}{18} & \frac{1}{9} & \frac{1}{18} & -\frac{1}{6} & \frac{1}{9} \\
\frac{1}{18} & \frac{1}{6} & \frac{1}{9} & \frac{1}{6} & \frac{1}{18} & \frac{1}{9} & \frac{1}{18} & \frac{1}{6} & \frac{1}{9} \\
\frac{4}{9} & 0 & -\frac{4}{9} & 0 & \frac{1}{9} & \frac{2}{9} & \frac{1}{9} & 0 & -\frac{4}{9} \\
-\frac{2}{9} & 0 & \frac{5}{9} & 0 & -\frac{2}{9} & -\frac{1}{9} & \frac{1}{9} & 0 & -\frac{1}{9} \\
\frac{1}{9} & 0 & -\frac{4}{9} & 0 & \frac{4}{9} & -\frac{4}{9} & \frac{1}{9} & 0 & \frac{2}{9} \\
\end{array} } \right]
\]
We only want the $ (2,1) $ entry of the resulting matrix, so we only need the diagonal matrix and the second row and fourth column of the $P$ and $ P^{-1} $ matrices, respectively, to find the final matrix (See? I'm stupid-I figured this out only after I multiplied every single entry of the matrices-but I won't show that here). Multiplying, we get
$$ P_{2 \to 4} = \frac{\left ( 1-2^{-n/2} \right ) \Bigl ( (-1)^{n} +1 \Bigr )}{6}, $$
which works for any n, even or odd (it is 0 for odd n, as is clearly seen).
 

Attachments

  • graphpq.PNG
    graphpq.PNG
    3.5 KB · Views: 78
Last edited:
  • #6
jacobi said:
I did this the hard way.
Confession: I also started by writing down a $9\times9$ matrix. But then I thought: that looks impossibly hard, there must be an easier way. (Headbang) (Emo)
 

FAQ: Probability of Reaching Room Q in n Seconds

What is the probability of reaching Room Q in n seconds?

The probability of reaching Room Q in n seconds depends on several factors, such as the distance to Room Q, the speed of the person, and any obstacles that may be in the way. It is not possible to provide a specific probability without knowing these factors.

How do you calculate the probability of reaching Room Q in n seconds?

To calculate the probability, you would need to know the total number of possible outcomes and the number of favorable outcomes. For example, if there are 10 possible routes to Room Q and only 2 of them can be reached in n seconds, the probability would be 2/10 or 20%.

Does the probability of reaching Room Q in n seconds change over time?

Yes, the probability may change over time as factors such as the person's speed or the presence of obstacles may change. It is important to consider these factors when calculating the probability.

Can the probability of reaching Room Q in n seconds be higher than 100%?

No, the probability can never be higher than 100%. This would mean that there are more favorable outcomes than possible outcomes, which is not possible.

How can the probability of reaching Room Q in n seconds be improved?

The probability can be improved by increasing the person's speed or removing any obstacles in the way. Additionally, choosing a more direct route to Room Q may also improve the probability of reaching it in n seconds.

Similar threads

Back
Top