Suppose there is a smart ant meaning it can teleport. And it is placed in one of the corners cell of a 3 × 3 grid. Now if the probability that the ant lands in the centre cell in 4 moves is α . Then enter ⌊ 1 0 ⁶ α ⌋ as the answer.
This represents the initial position of Ant.
Note:
In the above image you can see that if ants moves up it warps to the bottom row, similarly if ant moves left it warps to rightmost column.
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.
This problem can be solved using Markov chains. If we label the grid as follows:
A | B | C |
D | E | F |
G | H | I |
then the transition matrix M (which shows the probability of moving from the cell in the left column to the cell in the top row) is
(the ant has probability 4 1 ) of move to any of its four orthogonally adjacent cells)
To find the probabilities for where the ant might be after four moves, we just calculate M 4 and read off the top row. Putting this back into the original grid, we get
2 5 6 3 6 | 2 5 6 2 5 | 2 5 6 2 5 |
2 5 6 2 5 | 2 5 6 3 0 | 2 5 6 3 0 |
2 5 6 2 5 | 2 5 6 3 0 | 2 5 6 3 0 |
so the answer we want is ⌊ 1 0 6 ⋅ 2 5 6 3 0 ⌋ = 1 1 7 1 8 7 .
NB: The different states (and therefore the transition matrix) could be simplified by noting the symmetry along the main diagonal of the grid. This makes the matrix smaller, but the transitions are a little less obvious.
Refer to the above image
We can see that by symmetry all the corner cells are equivalent, and the cells except the corner and center are also equivalent by symmetry.
Now let us mark the probability of the ant coming from (in n moves towards the center)
Now,
Now if ant is supposed to finish in n moves from a cell, and now suppose it makes a move to the next cell, then from that cell it has move to the center in n - 1 moves.
Now by using Recurrence Relations we get,
Now solve the equations with a 0 = b 0 = 0 and c 0 = 1. We get a 4 = 0.1171875. Therefore answer is 117187.
Nice approach! Just one thing - the corners aren't all symmetric. You can check this numerically with a bit of code or have a look at my solution. Alternatively, you can get symmetry by shifting the grid; if the original grid you drew is
A | B | C |
D | E | F |
G | H | I |
then sliding it one place right and one place down gives
I | G | H |
C | A | B |
F | D | E |
So the symmetries are E = F = H = I and B = C = D = G .
Also, fun fact: the way you've joined the edges up makes the grid a map of a torus!
Log in to reply
By symmetry, I didn't mean exact symmetry I meant like the probability of it coming from the corner is same for all corners. Yea I was not able draw a 3D image, that is why I drew a 2D image with warping ability.
Log in to reply
ah, sorry, I misinterpreted your solution. Nice problem, by the way!
Problem Loading...
Note Loading...
Set Loading...