Vivian the Vole is leading her brother Vitalis across a meters wide road that runs east-west.
Starting at the edge of the road, Vivian will decide at random to run 1 meter northwest or 1 meter northeast every second (she is equally likely to choose either direction).
Unfortunately, Vitalis is legally blind, so he can see no further than 250 centimeters. He also has a very poor sense of direction, so if he ever loses sight of Vivian, he cannot make it across the road.
Let be the probability that both voles make it across the road, where and are coprime positive integers.
What is ?
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.
Relevant wiki: Linear Recurrence Relations - Problem Solving
To calculate the probability that a random path is successful, we can count the number of successful paths and divide by the total number of paths.
We can represent any path as a word consisting of W s and E s, where W represents a run of 1 meter northwest and E represents a run of 1 meter northeast. There is a bijection between every possible path and every possible 9-letter word.
The total number of words is 2 9 , because there are two choices for each of the 9 letters in the word.
Let a word be called valid if the path that it represents will allow both voles to cross the road.
A word is valid if and only if it is a word with no three consecutive E s or W s, because if this is the case, the maximum distance between the two voles would be 5 meters, which is less that 250 centimeters. Any other word will cause the voles to be 3 meters apart at some point.
To count the number of valid words, we can use a recurrence relation.
Let W W n be the number of n -letter words that end with W W . Let E E n , W E n , and E W n be defined similarly. Note that by symmetry, E E n = W W n and E W n = W E n .
The total number of valid n -letter words will be W W n + E E n + W E n + E W n .
To make a valid n -letter word ending in W W , we can add a W to the end of any and every valid ( n − 1 ) -letter word ending in E W . This accounts for all valid n -letter words ending in W W .
W W n = E W n − 1
Similarly,
E E n = W E n − 1
Using the same logic, we can generate every n -letter word ending in E W by adding a W to the end of any and every valid ( n − 1 ) -letter word ending in either W E or E E .
E W n = W E n − 1 + E E n − 1
Knowing that E E n = W E n − 1 , we can replace E E n − 1 in the above equation with W E n − 2 .
E W n = W E n − 1 + W E n − 2
Recall that E W n = W E n . Substituting:
W E n = W E n − 1 + W E n − 2
To solve this recurrence we need two initial values. We can manually count all 2-letter words ( W E ) and 3-letter words ( W W E , E W E ) to find that W E 2 = 1 and W E 3 = 2 .
This generates the Fibonacci sequence . We seek W E 9 , which is F 9 = 3 4 .
We also know that E E 9 = F 8 = 2 1 because E E n = W E n − 1 .
Finally, we can count the number of valid 9-letter words.
W W 9 + E E 9 + W E 9 + E W 9 = 2 1 + 2 1 + 3 4 + 3 4 = 1 1 0
For the final probability:
2 9 1 1 0 = 2 5 6 5 5
5 5 + 2 5 6 = 3 1 1