In an $n\times n$ grid with diagonals, how to count number of paths along the diagonals?

342 Views Asked by At

Given an $n\times n$ grid, with two diagonals in each unit square.

I am interested in the number of (directed) paths or walks from one side of the grid to the opposite side, walking along the diagonals. (Not walking along the grid lines of the base $n\times n$ grid.) The restriction is that, for each individual path, you can walk on each diagonal only one time.

How many such walks are there?

(1) I have started to work on a solution, but I ran into a wall when I considered that you can also walk sidewards-backwards, and in loops, which adds a huge number of possibilites.

(2) Another approach I tried is to think of it in terms of two overlayed grids, i.e. the base $n\times n$ grid and then a second one which is turned by $45°$ and shifted, and compressed by $1/\sqrt2$, to represent the diagonals. But I had difficulties with the non-overlapping boundaries of these two grids.

(3) Maybe there is a simple, ingenious approach that I am completely overlooking. For example, I was thinking two paths are different when they differ by at least 1 diagonal. So maybe it comes down to just counting $1\times2\times3\dots$ and then multiply by the number of different starting points. But it did not lead me to a solution either.

I would be very grateful if someone could help me with the solution or point me to a reference.