Expected number of paths

Probability Level pending

Consider a 8 × 8 8 \times 8 grid of city streets, and let S S be the points of intersections of the streets and let P P be the set of paths from the bottom left corner to the top right corner which consist of only walking to the right and up. A point s s is chosen at random from S S . The expected number of paths in P P which contain s s can be expressed as a + b c a + \frac{b}{c} where a , b , c a,b,c are positive integers, b b and c c are coprime, and b < c b < c . What is the value of a + b + c a + b + c ?

Details and assumptions

There are 8 rows and columns of city streets, and a total of 64 points of intersection in S S . (This corresponds to 7 city blocks in each direction.)


The answer is 815.

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.

6 solutions

Jimmy Kariznov
Aug 4, 2013

Let N s N_s be the number of paths in P P which contain s s . We want E [ N s ] E[N_s] .

Count the number of (path,point) pairs ( p , s ) P × S (p,s) \in P \times S such that p p contains s s .

There are 8 8 = 64 8 \cdot 8 = 64 points in the grid, each having N s N_s paths through it.

So, the total number of (path,point) pairs is s S N s = 64 E [ N s ] \sum_{s \in S} N_s = 64E[N_s] .

Every path takes 7 7 right steps and 7 7 up steps in some order.

There are ( 7 + 7 7 ) = 3432 \binom{7+7}{7} = 3432 such paths, each with 7 + 7 + 1 = 15 7+7+1 = 15 points on it.

So, the total number of (path,point) pairs is 3432 15 = 51480 3432 \cdot 15 = 51480 .

However, both methods must yield the same number of (path,point) pairs.

Thus, 64 E [ N s ] = 51480 E [ N s ] = 804 + 3 8 a + b + c = 815 64E[N_s] = 51480 \leadsto E[N_s] = 804+\dfrac{3}{8} \leadsto a+b+c = \boxed{815} .

Yup. This question was very similar to a question about 2-3 months ago which asked basically the same thing except instead of the expected value of number of paths it asked the probability that a path chosen at random contains it. Anyways, good solution Jimmy as usual.

Michael Tong - 7 years, 10 months ago

Absolutely stunning solution! I hacked it out using a combinatorial sum, wish I thought of this! Would have saved me a good hour...

Karthik Tadinada - 7 years, 10 months ago

Log in to reply

If something seems like it takes way too much calculation to solve, then you're probably right! I always try to find a more simple solution before deciding to brute force it like that.

Michael Tong - 7 years, 10 months ago

Elegant!

Cody Johnson - 7 years, 10 months ago

Wonderful solution! Especially compared to mine (i.e. calculate expectations for a couple of smaller grids and then use OEIS to find a pattern in the numbers :)

Vitaly Breyev - 7 years, 10 months ago
Sumit Goel
Aug 7, 2013

E ( ) = i = 1 64 P ( i ) E()= \sum_{i=1}^{64}P(i)* (paths through i)

P(i)=1/64 for all points

Total no. of paths from bottom left corner to top right corner is ( 14 7 ) \dbinom{14}{7}

Each path goes through 15 points.

E ( ) = 1 / 64 i = 1 64 E()=1/64\sum_{i=1}^{64} (paths through i)

i = 1 64 \sum_{i=1}^{64} (paths through i)=total paths*no of points across each path= ( 14 7 ) 15 \dbinom{14}{7}*15 (This is because each path will add 1 each to 15 different points )

Thus the ans. is 1 / 64 ( 14 7 ) 15 = 804 + 3 / 8 1/64*\dbinom{14}{7}*15=804+3/8

Jeremy Kong
Aug 6, 2013

At any time, the remaining distance to the top right hand corner will be an integer, say N N . Since our grid is 8 × 8 8\times 8 we have 0 N 14 0 \leq N \leq 14 . At each possible distance, the total number of paths to the top right hand corner will equal the total number of paths in S S which is ( 14 7 ) = 3432 \left( \begin{array}{c} 14 \\ 7 \end{array} \right) = 3432

Since we have 15 15 possible distances and the number of paths at each distance is 3432 3432 counting the total number of paths through any intersection gives 15 × 3432 15 \times 3432 .

Since we had 8 × 8 = 64 8 \times 8 = 64 intersections the expected number of paths is 3432 × 15 64 = 804 + 3 8 \frac{3432 \times 15}{64} = 804+\frac{3}{8} and thus our answer is 804 + 3 + 8 = 815 804 + 3 + 8 = \boxed{815}

Matthew Fan
Aug 9, 2013

The number of paths is the no. of arrangements of 7 N and 7 E s, which is ( 14 7 ) \binom{14}{7} , If we tilt our diagram 45 degress clockwise, we will have 15 rows. Each row will contain the same total no. of paths, since every path from its neighboring row must intersect this row. Hence, expected no. of paths= 15 × ( 14 7 ) 64 \frac{15\times \binom{14}{7}}{64} . Ans= 815 815

my solution is similar to Sumit G.

Matthew Fan - 7 years, 10 months ago
Luca Bernardelli
Aug 8, 2013

a + b c a + \frac{b}{c} = # _ o f _ s t r e e t s × # _ o f _ p o i n t s _ p e r _ s t r e e t # _ o f _ p o i n t s \frac{\#\_of\_streets \times \#\_of\_points\_per\_street}{\#\_of\_points}

# of streets = ( 14 7 ) {14 \choose 7}

# of points per street = 15

# of points = 64

( 14 7 ) 15 64 = 3432 15 64 = 429 15 8 = 6435 8 = 804 + 3 8 \frac{{14 \choose 7} \cdot 15}{64} = \frac{3432 \cdot 15}{64} = \frac{429 \cdot 15}{8} = \frac {6435}{8} = 804 + \frac{3}{8}

804 + 3 + 8 = 815 804+3+8 = \boxed{815}

Felipe Siqueira
Aug 5, 2013

{

public static double factorial(int n) {
    double result = 1;
    for (int i = n; i >= 2; i--) {
        result *= i;
    }
    return result;
}
public static void main(String[] args) {
    double sum = 0;
    for (int i=1; i<=8; i++) {
        for (int j=1; j<=8; j++) {
            sum += factorial(i+j-2)*factorial(16-i-j)/(factorial(i-1)*factorial(j-1)*factorial(8-i)*factorial(8-j));
        }
    }
    System.out.println(sum/64);
}

}

sum/64 = 804.375 = 804 + 3/8 = a + b/c => a+b+c = 815

CHEATER!

By the way, you can do much more efficient cheating by coding an nCr method.

Cody Johnson - 7 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...