Whenever Richard takes a step, he chooses one of the four cardinal directions at random and moves one unit in that direction. For a certain number of steps n , the probability of Richard starting at the origin and ending at the point ( 4 , 4 ) is maximized.
What is n ?
Note: If you decide to use a more brute force solution to this problem, it is highly recommended and encouraged that you use a calculator and/or a bit of programming.
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.
How did you find that expression in the bracket? i.e the expression of F(x,y)
Log in to reply
These kinds of problem are often solved most easily by generating functions. Here there are two variables--the "left-right" variable is x and the "up-down" variable is y . Going right corresponds to multiplying by x , going left corresponds to multiplying by x − 1 , going up corresponds to multiplying by y , and going down corresponds to multiplying by y − 1 . Each of those things has a probability of 1 / 4 , and we take n steps, so that's where that expression comes from.
Let us ask a simpler question: What if the expected value of d , the distance to the origin, after n steps are made. The answer is straightforward, one of the principal property of random walks, d = n . Using d 2 = 4 2 + 4 2 = 3 2 we get n = 3 2 .
This happens to be the solution to the current problem. Is that a coincidence or is it always true?
I believe I can prove that for any point ( a , b ) , the solution is always n = a 2 + b 2 . I edited my solution to reflect this generalization.
Log in to reply
Thanks, this is very interesting.
Log in to reply
Well, I have to walk back my statement a bit. I haven't finished the proof (and I'm not totally sure it's true). In particular, it's not hard to see that for points on the x - or y -axis, the probability of reaching the point in a 2 + b 2 steps is equal to the probability of reaching it in a 2 + b 2 − 2 steps. So there's already a slight subtlety there.
Very much interested in your proof!
Your result seems to be correct, except on the main axes at distance>1 from the origin (where we have to subtract 2). I made a small program that outputted this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
I think you have it. I reasoned exactly as you have.
Whether it is "always true" here at Brilliant is another question, best left to the admin folks to answer.. :-)
To reach ( 4 , 4 ) from ( 0 , 0 ) , we need to take a + 2 steps to the right, a − 2 steps to the left, b + 2 steps up, and b − 2 steps down, for some integers a , b ≥ 2 , which means that we have achieved our goal after a total of 2 ( a + b ) steps. Thus the probability of reaching ( 4 , 4 ) from ( 0 , 0 ) after 2 n steps is equal to p n = 4 2 n 1 a = 2 ∑ n − 2 ( a − 2 ) ! ( a + 2 ) ! ( n − a − 2 ) ! ( n − a + 2 ) ! ( 2 n ) ! = 4 2 n 1 × π ( n − 4 ) ! ( n + 4 ) ! 2 4 n Γ ( n + 2 1 ) 2 After simplification, this is equal to p n = 4 2 n ( n ! ) 2 ( n − 4 ) ! ( n + 4 ) ! ( ( 2 n ) ! ) 2 n ≥ 4 Thus we deduce that p n p n + 1 = 1 6 ( n + 1 ) 2 ( n − 3 ) ( n + 5 ) ( 2 n + 2 ) 2 ( 2 n + 1 ) 2 = 4 ( n − 3 ) ( n + 5 ) ( 2 n + 1 ) 2 and this implies that p n ≤ p n + 1 provided that 4 n ≤ 6 1 . Hence we deduce that the largest value of p n is p 1 6 .
It is not possible to reach ( 4 , 4 ) from ( 0 , 0 ) after an odd number of steps, and hence the number N of steps that maximizes the probability of getting from ( 0 , 0 ) to ( 4 , 4 ) in N steps is N = 2 × 1 6 = 3 2 .
I found a similar expression to the one you found with the sum. How did you find the closed form of that?
Log in to reply
Ultimately, it is Patrick’s argument that proves the identity.
Terrific solution! Thanks!
Here is a counting approach to this problem (that will require the assistance of a calculator to realistically solve):
Let's create a bijection. If we write out the steps of that path Richard takes, the number of ways to reach ( 4 , 4 ) is the number of sequences of these steps. For example, N N N E W E E N E N S E is one possible path, where each letter represents a cardinal direction (north, south, east, west).
In order to reach ( 4 , 4 ) , we need a minimum of 8 steps total. We also note that if we have an odd number of steps, we cannot possibly reach our destination. Let s be the number of pairs of steps more than the minimum needed to reach ( 4 , 4 ) . In other words, s = 2 1 ( n − 8 ) . Let k be the number of pairs of steps assigned to just the north and south directions. This makes s − k represent the number of pairs of steps assigned to the east and west directions.
First, we find the number of ways to divide up the positions of the north/south letters versus the east/west letters, which is ( 4 + 2 k 8 + 2 s ) . Then we calculate the number of ways to select which letters are north/south, which is ( k 4 + 2 k ) , and the number of ways to select which letters are east/west, which is ( s − k 4 + 2 ( s − k ) ) , and multiply all of these values together. If we sum this expression for values of k from 0 to s , we will be able to find the total number of ways to reach the point.
Let P ( s ) be the number of ways to reach ( 4 , 4 ) for a given s . We now have that P ( s ) = k = 0 ∑ s ( 4 + 2 k 8 + 2 s ) ( k 4 + 2 k ) ( s − k 4 + 2 ( s − k ) ) Since each pair adds 2 steps, each pair multiplies the total number of paths Richard can take by 4 2 = 1 6 . To find where the probability is maximized, we find where the probability begins to first decrease. This occurs at the first non-negative integer s such that P ( s ) P ( s + 1 ) < 1 6 . We notice that P ( 1 2 ) P ( 1 3 ) = 1 3 5 7 1 9 6 4 8 3 2 6 4 0 7 6 0 0 2 1 6 5 5 4 8 6 7 4 3 9 4 9 8 7 2 0 0 < 1 6 so the probability is maximized where n = 8 + 2 ⋅ 1 2 = 3 2 .
Additional comments: The particularly high numbers are a result of choosing a destination point that would make the answer difficult to simply guess. However, using recursion or some other more advanced techniques and identities, solving this problem is equivalent to finding the first non-negative s such that: 4 ( 1 + s ) ( 9 + s ) ( 9 + 2 s ) 2 < 1 Can you figure out how to obtain this condition?
As we have to go from ( 0 , 0 ) to ( 4 , 4 ) . Lets make a square with side 8 so we a giant square made of 8 × 8 = 6 4 small squares of unit length. We can make use of half the small squares i.e, 32 to move from origin to ( 4 , 4 ) .
I came up with this.To move from ( 0 , 0 ) to ( r , r ) make a square of side 2r with (0,0) as center and symmetric about the coordinate axes, thus giving you total number i.e, 4 r 2 small squares of unit length and using half of them i.e, 2 r 2 will give you maximum probability to reach the point ( r , r ) ,
So according to this Question, r = 4
Maximum Steps = 2 r 2 = 2 × 4 2 = 2 × 1 6 = 3 2 .
Therefore N = 3 2
How did u learn all of this? You did a nice job
You go forward 1 step (statistically) after taking four equally probable random steps in any one of the four cardinal directions. Therefore, you need 8×4=32 random walks to travel 8 steps to reach any one of the four points {(4,4), (-4,4), (-4,-4), ( 4,-4)} starting from origin at (0,0).
Answer=32
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
Since we're talking of random walks, the reference I learned when I was 12 mentioned that distance d = s t e p s .
The location ( 4 , 4 ) is 4 2 + 4 2 or 4 × 2 steps from the start. Squaring that is 3 2 .
N.b. : I'm not sure how programming or a calculator will help, since that reference is in my dad's bookshelf, next to the Table of Areas and Volumes of Items Used in Physics and Math Problems (Engineering Edition) . The table for Red Rubber Balls has been somewhat famously referenced elsewhere in cyberspace.
Another one I guesstimated right. It is known that the expected distance of a random walk is n . In this problem we have two independent random walks one East-West and one North-West. So to maximize the chance of being +4 on each axis then 16 steps are needed for each and so 3 2 for the total.
Problem Loading...
Note Loading...
Set Loading...
The probability of reaching ( 4 , 4 ) is the coefficient of x 4 y 4 in the expansion of f n ( x , y ) = ( 4 1 x + 4 1 x − 1 + 4 1 y + 4 1 y − 1 ) n . Well, f n ( x , y ) = ( 4 1 ) n ( x y ) − n ( x 2 y + y + x y 2 + x ) n = ( 4 1 ) n ( x y ) − n ( x + y ) n ( x y + 1 ) n . The coefficient of x 4 y 4 in f n ( x , y ) is the coefficient of x n + 4 y n + 4 in ( 4 1 ) n ( x + y ) n ( x y + 1 ) n . Looking at degrees of terms makes it clear that the only way to get x n + 4 y n + 4 is by getting x n / 2 y n / 2 in the first part and ( x y ) n / 2 + 4 in the second part. (It makes sense that n has to be even; otherwise it's easy to see from the polynomial or from thinking about the problem that the probability will be 0.)
So the conclusion is: let n = 2 k . Then the probability of getting to ( 4 , 4 ) in n steps is exactly p k = ( 4 1 ) 2 k ( k 2 k ) ( k + 4 2 k ) .
Consider p k / p k + 1 . The claim is that for k ≤ 1 5 this is less than 1, and for k ≥ 1 6 it's greater than 1, which would mean that p k is maximized when k = 1 6 . Let's write it down: p k + 1 p k = 1 6 ( k + 1 2 k + 2 ) ( k + 5 2 k + 2 ) ( k 2 k ) ( k + 4 2 k ) = 1 6 ( 2 k + 2 ) ( 2 k + 1 ) ( 2 k + 2 ) ( 2 k + 1 ) ( k + 1 ) ( k + 1 ) ( k + 5 ) ( k − 3 ) = 4 ( 2 k + 1 ) 2 ( k + 5 ) ( k − 3 ) = 4 k 2 + 4 k + 1 4 k 2 + 8 k − 6 0 = 1 + 4 k 2 + 4 k + 1 4 k − 6 1 , which is greater than 1 for k ≥ 1 6 and less than 1 for k ≤ 1 5 . So the claim is proved, and p k is maximized when k = 1 6 , or n = 3 2 .
Edit: For any point ( a , b ) , here is a partial proof that the probability of reaching ( a , b ) in n steps is maximized when n = a 2 + b 2 .
First note that the parity of a 2 + b 2 is correct: if a and b are both even or both odd, it takes an even number of steps to reach ( a , b ) , and a 2 + b 2 is even. Otherwise, it takes an odd number of steps to reach ( a , b ) and a 2 + b 2 is odd.
Now the same argument as above gives a value of p n , the probability of reaching ( a , b ) in n steps, as p n = ( 4 1 ) n ( 2 n − a + b n ) ( 2 n + a + b n ) , and, similar to the above, we get p n + 2 p n = ( n + 2 ) 2 ( n + 1 ) 2 ( n + 2 + a + b ) ( n + 2 + a − b ) ( n + 2 − a + b ) ( n + 2 − a − b ) . Let r n be the top and s n be the bottom. Then I get r a 2 + b 2 − s a 2 + b 2 r a 2 + b 2 − 2 − s a 2 + b 2 − 2 = 4 a 4 + 4 a 2 b 2 + 1 2 a 2 + 4 b 4 + 1 2 b 2 + 1 2 > 0 = − 4 a 2 b 2 ≤ 0 . This at least shows that p a 2 + b 2 − 2 ≤ p a 2 + b 2 > p a 2 + b 2 + 2 . But it is not quite so clear that this "local maximum" is a "global maximum" in general. The numerator of p n + 2 p n − 1 is a cubic, so it might have some other critical points...