Bug starts on the origin on the coordinate plane and makes random unit moves only in the four compass directions (Up, Down, Left, Right). Bug starts on coordinate and makes two random unit moves only in the four compass directions. The probability that bug is closer or equal in distance to the origin with bug can be expressed as for positive coprime integers Find .
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.
Observe that the first move of A doesn't affect anything; we can rotate the grid so A moves to the right, and all the distances remain equal. In addition, A and B don't interact with each other, so let's as well put A and B on the same starting point, ( 1 , 0 ) , moving two steps randomly.
image
It can be verified that the numbers in red, green, and blue above are the number of ways to get to that node with exactly two steps; all other nodes have zero ways to reach in exactly two steps from the central red node. From here, we can also observe that there are three distinct distances: 1 (pink), having 9 ways to arrive there; 5 (orange), having 6 ways to arrive there; 9 (purple), having 1 way to arrive there. Note that there are 1 6 ways in total, so the probability for each distance is simply the number of ways to arrive with that distance divided by 1 6 .
Thus the rest is immediate. For each distance, compute the probability that B arrives to that distance and multiply it with the probability that A arrives to that distance or more.
P = 1 6 9 ⋅ ( 1 6 9 + 6 + 1 ) + 1 6 6 ⋅ ( 1 6 6 + 1 ) + 1 6 1 ⋅ 1 6 1
= 1 6 ⋅ 1 6 9 ⋅ 1 6 + 6 ⋅ 7 + 1 ⋅ 1
= 2 5 6 1 8 7
And so p + q = 1 8 7 + 2 5 6 = 4 4 3 .