0

What's the number of shortest paths to (n,n) from (0,0) if you can only go up and right?

I wrote the tree for n=1, n=2 and got 2 and 6, but I cant find a generic pattern?

Also, I have to find the number of shortest paths to (n-1,n+1), and Im not sure how to approach that either

Manny
  • 129

2 Answers2

1

Hint: In every shortest path, you have to make $n$ steps to the right and $n$ steps upward. The only consideration is which order you take these $2n$ steps.

angryavian
  • 93,534
0

Hint: Try to deal with a recursion. Lets say that you have the shortest path from $(0,0)$ to $(n,m)$ call the number of shortest paths $B_{n,m}$ then either it came from $(n-1,m)$ or $(n,m-1)$ so you have the following decomposition $$B_{n,m}=B_{n-1,m}+B_{n,m-1}.$$ Give initial conditions and consider the change of variable $C_{n+m,m}=B_{n,m}.$ Is the recursion of $C_{a,b}$ familiar?

Phicar
  • 14,827