In a city located on the Cartesian plane, every line in the form of and , where , represents a street, and every point where represents an intersection (note that the positive direction indicates North and the positive direction indicates East). A student wants to walk from his school located at to his house located at . He takes one minute to travel a block (i.e. one unit) and can only travel on the streets. Also, because he wants to get to his house as fast as possible, he is only willing to take the shortest route possible (i.e. 10 units).
At each intersection, there is a traffic light that switches every minute, meaning that if the student wants to move North but the traffic light shows red in that direction, he has to wait for exactly one minute before he can continue walking, or he can choose to walk East instead (assume that the traffic light switches as soon as he reaches an intersection). This means that at every intersection, the probability that he hits a red light in one certain direction is , and that if the light is red in one direction, it is green in the other. The student is smart—he does not wait for the traffic light to switch unless he has to (he has to wait for the light to switch if he is, for example, at point and the light only allows him to move East). Note that he has to cross intersections in total.
Assuming that the time the student takes to cross the road is negligible, the average time (in minutes) he takes to walk from his school to his house can be represented by , where are co-prime positive integers. Find .
Clarification: The question would be less confusing if you imagine the student driving a car rather than walking. However, still keep in mind that the student is allowed to change direction even with a red light in front of him, unlike driving in real life.
By the way, check out Crossing Roads 2 .
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.
We can think of the problem this way:
He walks 10 blocks without waiting at all for the traffic lights to turn (so he may not end at his house). This means that the student has a 5 0 % chance of moving North and a 5 0 % chance of moving East at any intersection. As his house is at ( 5 , 5 ) , if he moves more than 5 blocks in one of the directions, he is "penalized" one minute for every "wrong" block he walks on top of the 1 0 minutes he needs to walk 1 0 blocks (e.g. if he turns out to walk 6 blocks North and 4 blocks East, he is "penalized" for one minute, as in the actual situation, instead of walking the last block North, he will instead wait for the traffic light to turn so that he can walk a block East).
The probability of him walking a blocks in one direction and ( 1 0 − a ) blocks in the other direction is 2 1 0 1 0 C a × 2 = 2 9 1 0 C a (except the case where he walks 5 blocks in each direction, where the × 2 is not needed), as the total number of ways he can walk 1 0 blocks is 2 1 0 . Therefore, the total time he is "penalized" for is
5 2 9 1 0 C 0 + 4 2 9 1 0 C 1 + 3 2 9 1 0 C 2 + 2 2 9 1 0 C 3 + 1 2 9 1 0 C 4 + 0 2 1 0 1 0 C 5 = 2 5 6 3 1 5
As m = 3 1 5 and n = 2 5 6 , the answer is 5 7 1 .