I have a combinatorics problem motivated, of all things, by category theory.


Consider a two-dimensional grid of vertices and edges. Fix two points, $P$ and $Q$, such that $Q$ is $a$ steps right and $b$ steps down from $P$. I'm interested in counting pairs of shortest paths from $P$ to $Q$. That is two paths from $P$ to $Q$ that only go down and right, never up and left. They are also never allowed to touch, either on an edge or a vertex, so one is always down-left and the other up-right.


If $a=1$ or $b=1$ there is just one pair of paths that work, forming a rectangle. If $a=2$ and $b=2$ I count 3 pairs - one forming a square and two forming Ls. How many pairs are there in general?


(This calculation helps count the number of indecomposable objects in a certain abelian category.)



How many double paths in a grid?
This number of such pairs will be 
$$\frac{(a+b-1)!(a+b-2)!}{a!b!(a-1)!(b-1)!}.$$
This follows from the [Lindstrom-Gessel-Viennot lemma](http://en.wikipedia.org/wiki/Lindstr%C3%B6m%E2%80%93Gessel%E2%80%93Viennot_lemma) and the fact that the number of directed paths in an $m\times n$ rectangle is $\binom{n+m}{m}$.


