[Math] Find the total Number of Path of length L

combinatoricsgraph theorypermutations

find the number of the path between two points on a grid where you can only move one unit up, down, left, or right? Is there a formula for this?.

Any shortest path from $(0,0)$ to $(m,n)$ includes $m$ steps in the x axis and $n$ steps in the y axis. This is counted by the binomial coefficient $\binom{m+n}{m} = \binom{m+n}{n}$.

But what number about the total path exist of Length L in a grid and We can revisit the cell ?

Best Answer

The classic method for counting number of walks of length $L$ on a graph $G$ are to take the corresponding adjacency matrix $A$ and compute $A^L$.

No idea if this approach can be used to give a closed form etc solution though.