Inspired by Alan Yan

On a cube, Markov the ant sits at a vertex, A A . After every minute, he travels to one of the three adjacent vertices, along an edge, with equal probability. Find the probability that after ten minutes (having traveled exactly ten times) Markov is back at vertex A A . Write the answer as m 3 9 \dfrac{m}{3^9} , and enter m m .


Inspiration .


The answer is 4921.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Otto Bretscher
Nov 8, 2015

Let's make the coordinates of the vertices all 0's and 1's, for simplicity, and let's say that Markov is at A(0,0,0) initially. Since the number of 1's changes by one each time he moves along an edge, after an even number of moves he will be at one of the points A ( 0 , 0 , 0 ) , B ( 1 , 1 , 0 ) , C ( 1 , 0 , 1 ) A(0,0,0),B(1,1,0),C(1,0,1) and D ( 0 , 1 , 1 ) D(0,1,1) .

Let p 2 n p_{2n} be the probability that he is at A A after 2 n 2n moves and q 2 n = 1 p 2 n q_{2n}=1-p_{2n} the probability that he is at one of the points B , C B,C or D D . The rules of the game and the geometry of the cube imply that p 2 n + 2 = 1 3 p 2 n + 2 9 q 2 n = 1 9 p 2 n + 2 9 p_{2n+2}=\frac{1}{3}p_{2n}+\frac{2}{9}q_{2n}=\frac{1}{9}p_{2n}+\frac{2}{9}

If we write the probability as a deviation from the equilibrium, p n = 1 4 + d n p_n=\frac{1}{4}+d_n , we find that d n + 2 = 1 9 d n d_{n+2}=\frac{1}{9}d_n and p 2 n = 1 4 ( 1 + 1 3 2 n 1 ) p_{2n}=\frac{1}{4}\left(1+\frac{1}{3^{2n-1}}\right)

For n = 5 n=5 we have p 10 = ( 3 9 + 1 ) / 4 3 9 = 4921 3 9 p_{10}=\frac{(3^9+1)/4}{3^9}=\frac{\boxed{4921}}{3^9}

Moderator note:

Good way of tracking the probability changes. The simplicity of expression is motivated by the underlying Markov chain structure.

If we write the probability as a deviation from the equilibrium, p n = 1 4 + d n p_n=\frac{1}{4}+d_n

I'm lost here. What does this means?

Pi Han Goh - 5 years, 7 months ago

Log in to reply

Just a computational technique. If you prefer, I could say "let d n = p n 1 / 4 d_n=p_n-1/4 " Does that make sense, Comrade Pi?

I am doing this problem with eigenvectors and eigenvalues, but I'm trying to avoid them in the solution I write down.

Otto Bretscher - 5 years, 7 months ago

Log in to reply

No. What is the meaning/use of "probability as a deviation from the equilibrium"?

Pi Han Goh - 5 years, 7 months ago

Log in to reply

@Pi Han Goh Maybe I'm lacking in some basics. Does this question have something to do with actual Markov Chains? Or Gambler's Ruin? etc (because I need to brush up on them again). That's why I didn't understand what this "deviation from equilibrium" line means.

Pi Han Goh - 5 years, 7 months ago

Log in to reply

@Pi Han Goh Of course it's a Markov chain... that's why Comrade Markov is involved. The systematic way to do those is with eigenvalues... 1 is always an eigenvalue in a Markov chain, and the corresponding eigenvector represents the equilibrium state.

Otto Bretscher - 5 years, 7 months ago

Log in to reply

@Otto Bretscher Damn. I thought this is NOT a Markov Chain due to the lack of matrices in your solution. I'm not sure how to proceed though. Let me put my thinking cap on.

Pi Han Goh - 5 years, 7 months ago

Log in to reply

@Pi Han Goh Here you get away with only two compartments: A and (not A), so, you will have a 2 x 2 matrix M M . Just write the recursive formulas for your probabilities p n + 1 p_{n+1} and q n + 1 q_{n+1} in terms of p n p_n and q n q_n , and you have your 2 x 2 matrix M M . I simplified things by going directly for M 2 M^2 .

I did the work with matrices and then "wrote the matrices out of my solution"... that's why my solution may sound a bit "forced".

Otto Bretscher - 5 years, 7 months ago
Bill Bell
Nov 7, 2015

Interesting to represent computationally.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from collections import defaultdict
from itertools import chain
from fractions import Fraction

A,B,C,D,E,F,G,H=range(1,9)

edges=[ [1,2], [1,7], [1,3], [2,4], [2,8], [8,6], [8,7], [7,5], [3,4], [3,5], [4,6], [6,5] ]

initialLength=len(edges)
for i,j in edges[:initialLength]:
    edges.append([j,i])

choices=defaultdict(list)
for i,j in edges:
    choices[i].append(j)

sequence=[1]
numberMoves=10
for moveNumber in range(1,1+numberMoves):
    sequence = list(chain(*[choices[s] for s in sequence]))

probability=Fraction(sequence.count(1),len(sequence))
print probability

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...