A Standard Walk on the Coordinate Space

Daniel is standing on the origin in the coordinate space . He walks either up, down, left, right, forwards, or backwards one unit each second, each with equal probability. After 6 seconds, the probability he is back on the origin can be expressed as p q \dfrac{p}{q} for positive coprime integers p , q p,q . Find p p .


The answer is 155.

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.

1 solution

Nicola Mignoni
Apr 21, 2018

Let's consider A = ( a 1 , a 2 , . . . , a 6 ) A=(a_1, a_2,...,a_6) the vector representing the random walk. Each step can be done going up, down, left, right, forwards or backwards. So a i { up , down , left , right , forw , back } a_i \in \{\text{up}, \text{down}, \text{left}, \text{right}, \text{forw}, \text{back}\} , i { 1 , 6 } i \in \{1,6\} . Let's indicate, for each a i a_i step, its opposite movement a i -a_i . For example if a i = down a_i=\text{down} , than a i = up -a_i=\text{up} and viceversa.

It's clear that for a generic walk A A is it possible to come back at the origin at the 6th step only if, for each a i a_i , there is a a 1 -a_1 in A A . So, over all the 6 6 6^6 possible walk, the ones we are interested in have an opposite movement for each movement. Here's a simple MATLAB code to count the k k occurrences

clear
a=combinator(6,6,'p','r');
v={'up' 'down' 'left' 'right' 'back' 'fow'};
k=1;
     for i=1:46656
       for j=1:6
          b(i,j)=v(a(i,j));
       end
      if sum(count(b(i,:),'up'))==sum(count(b(i,:),'down')) && sum(count(b(i,:),'left'))==sum(count(b(i,:),'right')) 
         && sum(count(b(i,:),'back'))==sum(count(b(i,:),'fow'))
         k=k+1;
      end
    end

where k 1 = 1860 k-1=1860 . Eventually

1860 6 6 = 1860 46656 = 155 3888 = p q \displaystyle \frac{1860}{6^6}=\frac{1860}{46656}=\frac{155}{3888}=\frac{p}{q} .

So p = 155 \displaystyle p=\boxed{155} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...