Number of paths between two points

880 Views Asked by At

I was wondering, how to find the number of paths between $(x_1,y_1)$ and $(x_2,y_2)$. I found that the number of paths between $(0,0)$ and $(x,y)$ is $x+y\choose x$, but how to find between two point ($(x_1,y_1)$ and $(x_2,y_2)$)?

Edit: In our course we found that the number of points between $(0,0)$ and $(n,n)$ is $2n\choose n$, so I was trying to find the number of steps between $(0,0)$ and $(22,22)$ that go through $(0,21)$. So I found that the number of paths between $(0,0)$ and $(0,21)$ is $21\choose 0$ and now I want to know how to find the number of points between $(0,21)$ and $(22,22)$. When I talk about paths, I mean not a diagonal path.

Edit: Path - Up or Right

1

There are 1 best solutions below

0
On

You can just move the axis, so your problem becomes the number of paths between $(0, 0)$ and $(x_2 - x_1, y_2 - y_1)$ (so we translated both points $x_1$ to the left and $y_1$ down). I assume you're talking about a grid right?