Let The Mouse Go

At a famous scientific laboratory, a mouse is stuck in a (infinitely large) three dimensional lattice. As scientists have injected it with experimental drugs, the mouse is extremely groggy and thus has a uniform probability of moving to any of the 6 adjacent cells (up, down, left, right, front, back).

What is the probability that after its sixth move, the mouse is back at its starting cell?

Give your answer to 5 decimal places.


The answer is 0.03987.

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.

9 solutions

Zhi Bang Lim
Feb 12, 2014

There is a total of 6^6 distinct paths (6 steps, 6 choices each).

To be back at the starting cell, we need all of the following:

  • left moves = right moves
  • front moves = back moves
  • up moves = down moves

Using 3-D coordinates, the starting point would be (x,y,z) = (0,0,0)

Let

  • A = (+1, 0, 0)
  • B = (-1, 0, 0)
  • C = (0, +1, 0)
  • D = (0, -1, 0)
  • E = (0, 0, +1)
  • F = (0, 0, -1)

The possible ways of moving back to the starting point are (then considering ordered ways):

  • AAABBB: 6!/(3!*3!) = 20 ways
  • CCCDDD: 6!/(3!*3!) = 20 ways
  • EEEFFF: 6!/(3!*3!) = 20 ways
  • AABBCD: 6!/(2!*2!) = 180 ways
  • AABBEF: 6!/(2!*2!) = 180 ways
  • CCDDAB: 6!/(2!*2!) = 180 ways
  • CCDDEF: 6!/(2!*2!) = 180 ways
  • EEFFAB: 6!/(2!*2!) = 180 ways
  • EEFFCD: 6!/(2!*2!) = 180 ways
  • ABCDEF: 6! = 720 ways

Total number of possible ways to get back to starting cell = 1860

Total number of distinct paths after 6 steps = 6^6 = 46656

Probability of getting back = 1860/46656 = 0.039866

Almost exactly what I did, but instead of ABCDEF I decided to group A and B, C and D, E and F. In order to end up at (0,0,0) you must have sets of A and B, C and D, or E and F, I shall refer to the sets as A, B, C (did it this way) The 3 sets can be in the form of: A,B,C (all different) - 6! A,B,B (2 same 1 diff) - 6! 6/4 A,A,A (all same) - 6! 3/(3!*3!) Summing up and dividing we get the same answer.

Liu Tianyi - 7 years, 3 months ago

awesome , just classic

Gunjan Sheth - 7 years, 3 months ago
Atul Anand Sinha
Feb 2, 2014

Denote by P n ( i , j , k ) P_n(i,j,k) the probability that the walker is at position ( i , j , k ) (i,j,k) in the lattice after n n moves. Then the rule governing the walker's motion implies that:

P n + 1 ( i , j , k ) = 1 6 ( P n ( i + 1 , j , k ) + P n ( i 1 , j , k ) + P n ( i , j + 1 , k ) + P n ( i , j 1 , k ) + P n ( i , j , k + 1 ) + P n ( i , j , k 1 ) ) \begin{aligned} P_{n+1}(i,j,k) &= \frac{1}{6}(P_n(i+1,j,k)+P_n(i-1,j,k)\\ &+P_n(i,j+1,k)+P_n(i,j-1,k)\\ &+P_n(i,j,k+1)+P_n(i,j,k-1))\\ \end{aligned}

Define Q n ( x , y , z ) = i , j , k = n n P n ( i , j , k ) x i y j z k Q_n(x,y,z)=\sum_{i,j,k=-n}^{n} P_n(i,j,k)x^iy^jz^k

with Q 0 = 1 Q_0=1 . Consequently, Q n ( x , y , z ) = 1 6 n ( ( x + x 1 ) + ( y + y 1 ) + ( z + z 1 ) ) n Q_n(x,y,z)=\frac{1}{6^n}((x+x^{-1})+(y+y^{-1})+(z+z^{-1}))^n

P 6 ( 0 , 0 , 0 ) P_6(0,0,0) represents the probability that the walker returns to the origin on the sixth step, and is the constant term in Q 6 ( x , y , z ) Q_6(x,y,z) . To find that term, expand Q 6 Q_6 using the trinomial theorem as

Q 6 ( x , y , z ) = 1 6 6 n 1 + n 2 + n 3 = 6 6 ! n 1 ! n 2 ! n 3 ! ( x + x 1 ) n 1 ( y + y 1 ) n 2 ( z + z 1 ) n 3 Q_6(x,y,z)=\frac{1}{6^6} \sum_{n_1+n_2+n_3=6}^{ }\frac{6!}{n_1!n_2!n_3!}(x+x^{-1})^{n_1}(y+y^{-1})^{n_2}(z+z^{-1})^{n_3}

where n 1 , n 2 , n 3 n_1,n_2,n_3 are all even, in which case the binomial theorem implies that the constant term is ( n 1 n 1 / 2 ) ( n 2 n 2 / 2 ) ( n 3 n 3 / 2 ) \binom{n_1}{n_1/2}\binom{n_2}{n_2/2}\binom{n_3}{n_3/2} . Equivalently,

Q 6 ( x , y , z ) = 6 ! 6 6 m 1 + m 2 + m 3 = 3 ( x + x 1 ) 2 m 1 ( y + y 1 ) 2 m 2 ( z + z 1 ) 2 m 3 ( 2 m 1 ) ! ( 2 m 2 ) ! ( 2 m 3 ) ! P 6 ( 0 , 0 , 0 ) = 6 ! 6 6 m 1 + m 2 + m 3 = 3 1 ( 2 m 1 ) ! ( 2 m 2 ) ! ( 2 m 3 ) ! ( 2 m 1 m 1 ) ( 2 m 2 m 2 ) ( 2 m 3 m 3 ) = 6 ! 6 6 m 1 + m 2 + m 3 = 3 1 ( m 1 ! ) 2 ( m 2 ! ) 2 ( m 3 ! ) 2 . \begin{aligned} \\ Q_6(x,y,z) &= \frac{6!}{6^6} \sum_{m_1+m_2+m_3=3} \frac{(x+x^{-1})^{2m_1}(y+y^{-1})^{2m_2}(z+z^{-1})^{2m_3}}{(2m_1)!(2m_2)!(2m_3)!} \\ P_6(0,0,0) &= \frac{6!}{6^6} \sum_{m_1+m_2+m_3=3} \frac{1}{(2m_1)!(2m_2)!(2m_3)!}\binom{2m_1}{m_1}\binom{2m_2}{m_2}\binom{2m_3}{m_3} \\ &= \frac{6!}{6^6} \sum_{m_1+m_2+m_3=3} \frac{1}{(m_1!)^2(m_2!)^2(m_3!)^2}. \end{aligned}

Calculating this sum shows

P 6 ( 0 , 0 , 0 ) = 6 ! 6 6 31 12 = 155 3888 0.03987 . P_6(0,0,0)=\frac{6!}{6^6}\cdot \frac{31}{12}=\frac{155}{3888}\approx \boxed{0.03987}.

Can you explain another way of arriving at the formula for P k ( 0 , 0 , 0 ) P_k (0,0,0) directly?

Calvin Lin Staff - 7 years, 4 months ago

For lack of being able to include a labeled 3D picture, there's a lot of words even though there are very few steps in this method.

For a geometric approach, imagine the set of all cells the mouse may move to in any 3 moves. If you know each of these points, and the number of way to get to each one (and thus return) you've got the solution!

The trick is that due to symmetry, there are only 4 different types or 'groups' of points. Begin with moving 3 times, all in a single direction. (i.e. up, up, up)

*You may do this in each of the 6 directions. These 6 cells can be seen as vertices that form a diamond. These vertices are 1 of the 4 'groups' of points in the diamond, in that each of the 6 vertices have only 1 way of being reached, and returned from. (i.e., Left, Left, Left, right right right.) So the 6 vertices contain only 6 x 1 = 6 total paths.

*Next we can consider the edges of the diamond, or the cells forming a line between each vertex. There are 24 of them in all, and 3 ways to reach each one. It also follows that there are 3 ways to return from each one, or that there are 9 different ways of going to one of these 24 cells and returning. So these 24 cells contain 24 x 3^2 = 216 paths

*The third group of symmetrical cells are in the 'surface' of the diamond. If we think of the diamond as two square pyramids base to base, there is 1 of these cells in the center of each of the 8 faces of the pyramids. There are 6 ways of reaching them (in 3 moves, remember!) and thus 6^2 ways of reaching and returning from them. So these 8 cells contain 8 x 6^2 = 288 paths

*The final group are the 6 cells directly adjacent to the starting position. There are 15 ways of reaching each of these 6 cells in 3 moves. (Counting this is the only difficult part of this method, once you see the diamond!) So there are 15^2 unique paths to and from each of these 6 cells, meaning this group has 6 x 15^2 = 1350 paths.

Now add them all together and divide by the number of all possible paths, 6^6.

6 + 216 + 288 + 1350 = 1860

1860/6^6 = WEEEEE geometric combinatorics

Sam Holden - 7 years, 3 months ago

nice solution @atul keep it up!!

vicky bansal - 7 years, 4 months ago

please can you explain how this problem can be done using generating function.I tried but got wrong answer

dp dp - 7 years, 3 months ago

this is a pretty cool solution!, i did it the long way...

Mandar Sohoni - 7 years, 3 months ago
Ron van den Burg
Feb 10, 2014

Six moves, choices are u, d, l, r, f, b. All moves in every direction must cancel out. Thus:

Move in 1 dimension: choose 3 x a and 3 x c out of six moves: ( 6 3 ) = 20 {6\choose {3} }=20 , where a, c is u, d or l, r or f, b. This makes 20 × 3 = 10 × 6 20\times 3=10\times 6 possible trajectories.

Move in two dimensions: choose 2 x a and 2 x c in one dimension and 1 x e and 1 x g in another dimension, out of 6 moves: ( 6 2 , 2 , 1 , 1 ) = 6 ! / 2 ! / 2 ! / 1 ! / 1 ! = 180 {6\choose { 2,2,1,1}}=6!/2!/2!/1!/1!=180 where there are 6 combinations of dimensions to take for a, c, e, g. This makes 180 × 6 180\times 6 possible trajectories.

Move in three dimensions: choose 1 of each u, d, l, r, f and b moves: 6 ! = 120 × 6 6!=120\times 6 possible trajectories.

Totalling, dividing by the total nr of moves 6 6 6^6 gives ( 10 + 180 + 120 ) 6 6 6 = 310 6 5 \frac {(10+180+120) 6}{6^6}=\frac {310}{6^5} which gives 0.0399 \approx\boxed {0.0399}

Caleb Stanford
Feb 10, 2014

Let Up, Right, and Forward be the "positive" directions, and let the others be negative. We need to count the number of sequences of 6 moves that get us back to the start. Such a sequence must contain three positive moves and three negative moves, so there are first of all ( 6 3 ) 6 \choose 3 ways to assign positives and negatives.

Now, consider the three positive moves. If x , y , z x,y,z are the three directions, the three positive moves will have one of the following forms: x x x xxx , x x y xxy , or x y z xyz .

  • For the pattern x x x xxx , there are 3 ways to choose which direction "x" represents, but all orders are the same. The three negative moves must be the opposite of the three positive moves, so there are 3 ways total in this case.

  • For the pattern x x y xxy , there are 3 directions to choose for what "x" represents, then 2 directions remaining to choose for what "y" represents. Then, there are 3 3 ways of ordering the positive moves ( x x y , x y x , y x x xxy, xyx, yxx ), and similarly 3 3 orders for the negative moves, for a total of 3 2 3 3 = 54 3 \cdot 2 \cdot 3 \cdot 3 = 54 possibilities.

  • For the pattern x y z xyz , we use all three directions, so we don't need to choose which directions are represented by which letter. However, there are 6 6 ways of ordering the three letters, and 6 6 ways of ordering the negative moves also, for 6 6 = 36 6 \cdot 6 = 36 total possibilities.

There are 6 6 6^6 moves altogether, so the answer is ( 6 3 ) ( 3 + 54 + 36 ) 6 6 = 20 91 6 6 = 310 6 5 0.039866 . \frac{{6 \choose 3} (3 + 54 + 36)}{6^6} = \frac{20 \cdot 91}{6^6} = \frac{310}{6^5} \approx \boxed{0.039866}.

Typo: the 91 should be a 93.

Caleb Stanford - 7 years, 4 months ago
Shamik Banerjee
Feb 10, 2014

Starting from (0, 0, 0) the mouse moves 1 unit in the positive or negative direction of x, y, or z axis at each turn.

The probability = {Constant i.e. the coefficient of (x^0) (y^0) (z^0) in (x + y + z + 1/x + 1/y + 1/z)^6}/(6^6) = 1860/46656 = 155/3888 = 0.03986625514403292181069958847737

Joel Tan
Oct 12, 2014

Consider the generating function f ( x , y , z ) = ( x + 1 x + y + 1 y + z + 1 z ) 6 f (x, y, z)=(x+\frac {1}{x}+y+\frac {1}{y}+z+\frac {1}{z})^{6} . The constant term is 1860 after tedious expansion. Hence the probability is 1860 6 6 = 0.039866... \frac {1860}{6^{6}}=0.039866... hence the answer.

Kartik Prabhu
Jun 9, 2014

Firstly we must realise that there are 3 different axes along which the mouse can move. Whichever way the mouse moves, the positive movement along an axis has to equal the negative movement along the axis.

Hence, let's label any positive movement along the x axis as x x , and any negative movement as x -x , and do the same for y and z.

There are three distinct cases to address - if the mouse moves along 1 axis only, if he moves along two, and if he moves along all three.

If he moves along just one, then there is only one way for him to do it, x + x + x x x x x + x + x - x - x - x . There are 6 ! 3 ! × 3 ! = 20 \frac{6!}{3! \times 3!} = 20 ways of doing this. 20 x 3 = 60 20 x 3 = 60 (to take into account the other 2 axes).

So there are 60 ways of doing it this way.

The second case is if the mouse moves along just two axes. Using the same logic as above, we realise that there is also only one way in which he can do this x + x x x + y y x + x - x - x + y - y . There are 6 ways of arranging x x and y y and z z in the above form.

The total ways in which any version of x + x x x + y y x + x - x - x + y - y can be arranged is 6 ! 2 ! × 2 ! = 180 \frac{6!}{2! \times 2! } = 180 .

So there are 180 × 6 = 1080 180 \times 6 = 1080 ways of doing it with movement along two dimensions.

The third distinct case is movement along all three dimensions. Again, there is only one way in which to do this x x + y y + z z x - x + y - y + z - z , which can be arranged in 6 ! = 720 6! = 720 ways.

So the total ways of moving back to the original spot are 720 + 1080 + 60 = 1860 720 + 1080 + 60 = 1860 .

The total number of possible moves are 6 6 6^6 .

So the probability of that happening is 1860 6 6 = 0.03986625514 \frac{1860}{6^6} = \boxed{0.03986625514}

mouse moves in only +/-x, +/-y, +/-z directions. to come back, it has to do equal number of +ve or -ve moves in all axes. May be all +/- 3 in same axes, or +/-2 in one and +/-1 in another or +/-1 in all 3 axes first case in any axes gives 6!/(3!3!) = 20 for all 3 axes 3*20 = 60 in 2nd case 6 *(6!/2!2!) 3rd case 6! Total 1860 out of 46656 cases

Aditya Sriram
Feb 12, 2014

This answer might be a little too big, but I like to consider it comprehensive.


Notation used for the solution:

  • + x +x denotes moving one unit along the positive x a x i s x-axis
  • x -x denotes moving one unit along the negative x a x i s x-axis
  • similar moves can be defined for the positive and negative y y and z a x e s z\ \ axes .
  • one particular solution sequence of moves using the above notation looks like + x + y x + z y z +x +y -x +z -y -z

Basic Ideas/Formulae used for the actual solution:

  1. In order to return to the starting position any move along any positive axis must be balanced out by another move along the same axes in the negative direction. In other words, a + x +x must always be followed by a x -x in the sequence.
  2. Number of possible ways of arranging n n objects of which r r are alike, another s s are alike and the remaining t t are all distinct is given by n ! r ! s ! \large\frac{n\,!}{r\,!s\,!}
  3. The total number of moves, 6 here, plays an important role in the solution and solving the same problem for any other number might prove to be difficult.

Solution

The total possible movements possible in 6 moves with 6 choices in each move is 6 × 6 × . . . 6 × 6 = 6 6 ( I ) \boxed{6 \times 6 \times ... 6 \times 6 = 6^6\quad\dots\quad (I)}

The required number of moves is calculated below:

Any solution sequence can be classified into 3 types:

  • Moving along just one axes, throughout.
  • Moving along two axes.
  • Moving along all the three axes

We will calculate the number of ways in which the above movements can be made while returning to the original position using "Idea no. 1" (seen above)

1.Moving along just one axis

An axes can be chosen in ( 3 1 ) \large 3 \choose 1 ways. After choosing an axes (say x a x i s x-axis )we have to arrange + x +x and x -x in such a way that they balance out meaning 3 + x s \ +x's and 3 x s \ -x's . Now number of ways of arranging 6 x s \ x's of which 3 are alike (the 3 + x s \ +x's ) and another 3 are alike is given by 6 ! 3 ! 3 ! \large\frac{6!}{3!3!} (using "Idea no. 2" (seen above))

So total number of ways of returning to starting point while moving along just one axis is \mathrm\large\large\boxed{{3 \choose 2} \times \frac{6!}{3!3!}\quad\dots\quad (II)}

2.Moving along two axes

Two axes can be chosen in ( 3 2 ) \large 3 \choose 2 ways. After choosing two axes (say x a x i s x-axis and y a x i s y-axis ) they can be arranged in the manner + x x + y y + y y +x -x +y -y +y -y where one of the two selected axes repeats twice(here y a x e s y\ axes ), so this axis can be chosen in ( 2 1 ) \large 2 \choose 1 ways. Now the number of ways of chosing axes is same as number of ways of arranging 6 objects of which 2 are alike(the 2 + y s \ +y's ) another 2 are alike(the 2 y s \ -y's ) and the remaining 2 are distinct( + x +x and x -x ) which is 6 ! 2 ! 2 ! \large{\frac{6!}{2!2!}}

So total number of ways of returning to starting point while moving along only two axes is \mathrm\large\large\boxed{{3 \choose 2}\times{2 \choose 1}\times {\frac{6!}{2!2!}}\quad\dots\quad (III)}

3.Moving along all the three axes

Three axes can be chosen in ( 3 3 ) \large 3 \choose 3 or 1 way. Further any sequence in this category will be a permutation of + x x + y y + z z +x-x+y-y+z-z . So number of ways of arranging these 6 objects is 6 ! \large 6! .

So total number of ways of returning to starting point while moving along all the three axes is \mathrm\large\large\boxed{6!\quad\dots\quad (IV)}

Finally the probability of returning to the starting point is

\mathrm\large\large{\frac{number\ of\ ways\ of\ returning\ to\ starting\ point}{total\ number\ of\ ways\ possible\ in\ 6\ moves}\ = \frac{II\ +\ III\ +\ IV}{I}\ = \frac{1860}{6^6}}

= 0.039866 \boxed{= 0.039866\dots}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...