Michael's walk on the number line

An ant starts a random walk on the real number line at 0 0 . At each step, the ant moves by + 1 +1 or 1 -1 with equal probability. After 6 6 moves, the probability that the ant is on a positive number can be expressed as a b , \dfrac{a}{b}, where a a and b b are positive coprime integers. What is the value of a + b ? a+b?

This problem is posed by Michael T.


The answer is 43.

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

Rhiju Chatterjee
May 20, 2014

First note that given the conditions the only possible totals are even, and they are 6 , 4 , 2 , 0 , 2 , 4 , -6, -4, -2, 0, 2, 4, and 6 6

In order to get to any of these totals, the ant must generate a string of length 6 6 of 1 s 1's and 1 s -1's . For example, 1 , 1 , 1 , 1 , 1 , 1 -1,-1,1,1,-1,1 would give a total of 0 0 .

Since there are two states and the string has a length of six, there are 2 6 = 64 2^6 = 64 ordered strings that could be generated.

Now we note that whatever strings can generate a number, say 2 2 could be used to generate a 2 -2 by inverting the 1 s 1's and 1 s -1's . That is to say there are an equal number of ways to make positive integers as there are ways to make negative integers.

In order to generate the zero, we need three 1 s 1's and three 1 s -1's . There are 6 ! 3 ! 3 ! = 20 \frac{6!}{3!*3!} = 20 ordered strings that will generate a zero. 64 20 = 44 64-20 =44 So there are 44 44 strings that will generate the positive and negative integers.

Since there are an equal number of strings for both positive and negative integers, there must therefore be 44 / 2 = 22 44/2 = 22 strings that generate positive numbers.

22 / 64 = 11 / 32 22/64 = 11/32 so a + b = 11 + 32 = 43 a+b = 11+ 32 =43

This solution shows you how to calculate the probability for a general n n , which doesn't involve numerous cases.

Calvin Lin Staff - 7 years ago
Abel Chen
May 20, 2014

The ant can choose to either move in the positive or the negative direction. It has 2 options, and it needs to make this choice six times, so there are 2 6 = 64 2^6=64 possible paths it could take.

Let us find the probability that the ant will end up on 0 0 , a neither positive nor negative number. The ant must take 3 3 steps in each direction to arrive at 0 after 6 6 steps. Another way to think about this is that the ant has 3 moves in the positive direction and 3 moves in the negative direction. We calculate the number of distinct ways you can order the moves.

6 ! 3 ! 3 ! = 20 \frac{6!}{3!3!}=20

There are 20 20 possible ways for the ant to land on 0 after 6 6 moves.So the probability that the ant will end up on 0 is 20 64 \frac{20}{64} .

The probability that the ant will be on a positive number is the same as the probability that the ant will be on a negative number, so we can arrive at our answer if we halve the probability that the ant will not be on 0.

64 64 20 64 = 44 64 \frac{64}{64}-\frac{20}{64}=\frac{44}{64}

44 64 / 2 = 22 64 = 11 32 \frac{44}{64}/2=\frac{22}{64}=\frac{11}{32}

11 + 32 = 43 11+32=43

Lucas Colucci
May 20, 2014

As we start at 0 and have the same probability of going left of right, the probability of ending on a positive number is the same as the probability of ending on a negative number, so we are done if we calculate the probability of ending on 0, subtract it from 1 and divide by two. The probability of ending on 0 is the probability of taking the same number of +1 and -1, i.e., 3 times each one. So it is ( 6 3 ) × 1 2 ) 6 = 5 16 {6 \choose 3} \times \frac{1}{2})^6 = \frac{5}{16} . Then the probability of ending on a positive number is 1 5 16 2 = 11 32 \frac{1-\frac{5}{16}}{2}=\frac{11}{32} , so a + b = 43 a+b=43 .

Tadeu Belfort
May 20, 2014

Veja que para cada movimento há 2 possibilidades,assim no total existem 64 possíveis movimentos .Vejamos que pela simetria do passo existem o mesmo número de caminhos terminando em um um número positivo e um negativo.Se o caminho termina em zero significa que houve três movimentos +1 e três -1 ,e existem C(6,3)=20 ordenações desses movimentos.Assim devem haver 22 movimentos terminando no lado positivo e 22 no lado negativo ,assim a/b=22/64=11=32 ,a+b=11+32=43

Quý Bùi Tứ
May 20, 2014

We can devide the possible final number k that the ant land after 6 moves into 3 types: k > 0 , k = 0 , k < 0 k>0, k=0, k<0 . So: P ( k > 0 ) + P ( k = 0 ) + P ( k < 0 ) = 1 P(k>0) + P(k=0) + P(k<0) = 1 .

There are 2 6 2^6 ways of 6–step walk. If k = 0 k = 0 then there are 3 steps move by “+1” and 3 steps move by “–1”, which comprises C ( 6 , 3 ) = 20 C(6,3) = 20 ways. Therefore, P ( k = 0 ) = 20 2 6 = 5 16 P(k=0) = \frac {20}{2^6} = \frac {5}{16} .

By symmetry, we can see that P ( k > 0 ) = P ( k < 0 ) P(k>0) = P(k<0) . So: P ( k > 0 ) = 1 P ( k = 0 ) 2 = 1 5 16 2 = 11 32 = a b P(k>0) = \frac {1 - P(k=0)}{2} = \frac {1 - \frac {5}{16}}{2} = \frac {11}{32} = \frac {a}{b} .

Hence, a = 11 , b = 32 a = 11, b = 32 , we’ve got a + b = 43 a + b = 43 .

Ahaan Rungta
May 20, 2014

We realize that we want more + moves than - moves. We have three cases:

Case 1 : We can have 4 +s and 2 -s. In this case, we use binomial probability to count the cases ++++--, +++--+, etc. This is: ( 6 4 ) ( 1 2 ) 6 . \dbinom {6}{4} \cdot \left( \dfrac {1}{2} \right)^6. This is because we have a 1 2 \dfrac {1}{2} probability of each move, so we raise it to the 6 6 th power. But also, there are ( 6 4 ) \dbinom {6}{4} to arrange the +s and -s. Thus, the above probability.

Case 2 : We can have 5 +s and 1 -. In a similar manner, we have ( 6 5 ) ( 1 2 ) 6 . \dbinom {6}{5} \cdot \left( \dfrac {1}{2} \right)^6.

Case 3 : We can have 6 +s and 0-s. In a similar manner, we have ( 6 6 ) ( 1 2 ) 6 . \dbinom {6}{6} \cdot \left( \dfrac {1}{2} \right)^6.

Our total probability is ( 6 4 ) + ( 6 5 ) + ( 6 6 ) 2 6 = 15 + 6 + 1 64 = 11 32 , \dfrac {\dbinom {6}{4} + \dbinom {6}{5} + \dbinom {6}{6}}{2^6} = \dfrac {15 + 6 + 1}{64} = \dfrac {11}{32}, so our answer is 11 + 32 = 43 11 + 32 = \boxed {43} .

Great solution.

Arron Kau Staff - 6 years, 6 months ago
Xuan Hien Bui
May 20, 2014

In order to have a positive number after 6 moves, ant must walk a number of move -1 and +1 which satisfies 3 cases below:

Case 1 : 6 moves +1 => 1 method

Case 2 : 5 moves +1 and 1 move -1 => 6 methods

Case 3 : 4 moves +1 and 2 moves -1 => the number of methods is C(6,4)=C(6,2)=15 methods

we have 1+6+15 = 22 methods

and the total possible number of methods that the ant can walk ( both negative and positive) is 2^6 = 64

the possibility that the ant is on a positive number is a/b = 22/64 =11/32

a+b=11+32=43

Ruslan Abdulgani
May 20, 2014

To be in a positive number, the number of positive move ( +1) which I call P, must be bigger than the number of negative move (-1), which I call N. There are many possibilities : (a) PPPPPP : 1 way (b) PPPPPN : 6 ways (6!/5!) (c) PPPPNN : 15 ways (6!/(4!)(2!)) Total possibilities are 22. The sample space is 2^6 = 64 So the possibility to be in a positive number after 6 moves = 22/64 = 11/32 = a/b. And a+b = 43

Bill Bell
Nov 21, 2014

Pascal's triangle in disguise.

The 7th row is 1, 6, 15, 20, 15, 6, 1 whose sum is 64, and 1 2 64 \frac { 1 }{ { 2 }^{ 64 } } is the probability of following any one of the 64 paths. There are 20 ways of reaching zero, and 1+6+15 ways of reaching a positive value. Hence the probability required is 1 + 6 + 15 64 \frac { 1+6+15 }{ 64 } .

Since I try to avoid trusting my reasoning ability this far I also wrote the following Monte Carlo code to verify the probability.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from random import randint

N = 100000
count = 0

for n in range ( N ) :
    place = 0
    for move in range ( 6 ) :
        movement = 2 * randint ( 0, 1 ) - 1
        place += movement
        #~ print n, move, movement, place
    count += place > 0

print count, N

It printed 34431 100000.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...