Getting From Here To There On A Lattice Grid

What is 8 more than the mean area under a path of length 129 that goes only right or up through a square grid and starts at the origin?

Note: If the path ends at ( X , Y ) (X,Y) , then the area is bounded by the path, the x x -axis, and the line x = X x = X .


The answer is 2072.

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.

3 solutions

Patrick Corn
May 15, 2014

Paths can be separated into pairs, where each pair is related by switching the ups and rights (so e.g. ("up right up up right" pairs with "right up right right up"). The key observation is that the sum of the areas under the paths in a pair is the area of the rectangle whose corners are at (0,0) and the end of the path. To see this, tilt your head 90 degrees. :)

There are ( 129 m ) \binom{129}{m} paths with m m "ups," and they pair with ( 129 m ) \binom{129}{m} paths with 129 m 129-m ups. So the sum of all the areas is m = 0 64 m ( 129 m ) ( 129 m ) = m = 1 64 129 128 127 ! ( m 1 ) ! ( 128 m ) ! = ( 129 128 ) n = 0 63 ( 127 n ) = 129 128 2 126 \sum_{m=0}^{64} m(129-m) \binom{129}{m} = \sum_{m=1}^{64} \frac{129 \cdot 128 \cdot 127!}{(m-1)!(128-m)!} = (129 \cdot 128) \sum_{n=0}^{63} \binom{127}{n} = 129 \cdot 128 \cdot 2^{126} (by symmetry).

Then the mean is 129 128 2 126 2 129 = 129 16 \frac{129 \cdot 128 \cdot 2^{126}}{2^{129}} = 129 \cdot 16 , and 8 8 more than that is 2072 \fbox{2072} .

Found mine using roughly the same method. Only difference is that I used rotational Symmetry to conclude that the average area under a path to the point (k,129-k) is exactly half of the rectangle. This leads to a sum with 130 terms, but with an extra factor of one half, leading to the same result. Nice.

Bart Nikkelen - 6 years, 12 months ago

Here is a short program for a simulation:

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

def simulation():path = [(random.random()>=0.5) for x in xrange(129)]x = 0y = 0area = 0for i in path:if i:x += 1area += yelse:y += 1return area

print sum([simulation() for i in xrange(100000)])/100000.0

That returns approximately 2064 \boxed{2064} , 8 more than which is 2072

Nicola Mignoni
May 4, 2019

Let E n E_n be the expected area after n n steps. Notice that if we are at step n n , we have two possibility (both equally likely)

  • The n + 1 n+1 -th step goes up ( E n = E n + 1 E_n=E_{n+1} )
  • The n + 1 n+1 -th step goes right ( E n = E n + 1 + h ( n 1 ) E_n=E_{n+1}+\overline{h}(n-1) )

where h ( n 1 ) \overline{h}(n-1) is the maximum average height of the path (the y y -coordinate of the ending point) at step n 1 n-1 . It's easy to show that h ( n 1 ) \overline{h}(n-1) follows a binomial distribution, hence

h ( n 1 ) = k = 0 n 1 k ( n 1 k ) 1 2 n 1 = n 1 2 \displaystyle \overline{h}(n-1)=\sum_{k=0}^{n-1} k \binom{n-1}{k} \frac{1}{2^{n-1}}=\frac{n-1}{2} .

We can eventually write a recurrence for E n E_n :

{ E n = 1 2 E n 1 + 1 2 ( E n 1 + n 1 2 ) E 1 = 0 \displaystyle \begin{cases} E_n=\frac{1}{2}E_{n-1}+\frac{1}{2}\Big(E_{n-1}+\frac{n-1}{2}\Big) \\ E_1=0 \end{cases}

which solution is

E n = 1 8 n ( n 1 ) \displaystyle E_n=\frac{1}{8}n(n-1)

Eventually

E 129 + 8 = 1 8 128 129 = 2072 \displaystyle E_{129}+8=\frac{1}{8} \cdot 128 \cdot 129=\boxed{2072}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...