How many paths exist on an $n\times m$ grid?
The Path requirements are
- You start at the bottom left and end at the top right
- The Path can not intersect it's self
- Each Line has to start and end on a point on the grid
- Reflections and flips of a Path are not necessary an equivalent Path.
I found $26$ Paths for a $2$ by $3$ grid I believe that I found all paths for a $2$ by $3$ grid.
What can I use to try to make a general formula for an $n\times m$ grid?
Best Answer
We shall find the desired number for $m = 2$.
Let $V(G) = \{1, 2,\dots, n\}\times \{1, 2\}$ be the set of points of our grid $G$.
Note that a path on $G$ is uniquely determined by the edges (path segments that connect two points) that change column (because anywhere in a path you're forced to go up until you change column). Let's call those edges transversals. Since a path ends in a different column than the one it starts, there must be an odd number transversals in it. Also, any odd number of transversals that do not intersect determines a valid path, so we just have to count how many of those are there.
Let us now argue that the number of ways to choose our non crossing transversals is the number of ways to choose two multisubsets of $\bar{n}_2 = \{1, 1, 2, 2, \dots, n, n\}$ with the same odd number of elements. To this end, we will establish the following bijection:
If I didn't get my maths wrong, it's not hard to show that the number of ways to choose a multisubset with $s$ elements of $\bar{n}_2$ is given by
$$\sum_{r=1}^s \binom{n}{r}\binom{r}{s-r} = \sum_{r=1}^s \frac{n!}{(n-r)!(s-r)!(2r-s)!}$$
So the number of ways to choose two multisubsets with an odd number of elements from $\bar{n}_2$ is
$$\sum_{p=0}^{n-1}\left[\sum_{r=1}^{2p+1} \binom{n}{r}\binom{r}{2p+1-r}\right]^2$$
Honestly, I don't think the methods used can be generalized to different values of $m$. Many particular features of the $m = 2$ case were used. Also, I believe that the value obtained for the case $m = 2$ may be simplified to a nicer expression, but I failed to get it. Anyway, I hope these elaborations give someone some insight.