[Math] Number of shortest paths

combinatorics

In a city M roads run East West and N roads run North South. Suppose they are parallel and they are equidistant. Find number of shortest paths from one corner to diagonally opposite corner.

What I did was to formulate this alegbraically say the units moved in ith row is r(i) and in jth coloumn is c(j) then sum of r's is m and C's is n. Then using the formula for number of solutions I get solutions of individual coloumn and row equations. But I later realized that two equations are not independent. If r1 =1 then c1 becomes 0. Now I am stuck.

Best Answer

To reach the diagonally opposite corner, you need to take $M - 1$ horizontal steps and $N - 1$ vertical steps, for a total of $M + N - 2$ steps. To calculate the number of paths, it simply comes down to deciding when to move horizontally and when to move vertically. Since there are $M - 1$ horizontal steps and $N - 1$ vertical steps, the number of shortest paths equals:

$${M + N - 2 \choose M - 1} = {M + N - 2 \choose N - 1} = \frac{(M + N - 2)!}{(M - 1)! (N - 1)!}$$