Suppose that $z \in \mathbb{Z}^+, n > z$. How many lattice paths are there from $(0, 0)$ to $(n, n)$ that do not go above the line $y = x + z$?
This problem seems very similar to the usual Dyck path problem where we need to figure out the number of lattice paths that do not go over $y = x$. However, I can't seem to figure out the logic that would go behind finding the paths that don't cross an abstract linear transformation of the diagonal by the factor $z$.
Here's what I have done so far:
I know that there are $\binom{2n}{n}$ total lattice paths in total from: $(0, 0)$ to $(n, n)$. I figured out a formula that would work well is total paths - bad paths. I have tried using André's reflection method which is also used to calculate the variants of this kind of problem but it was to no avail.
Any help to find a bijection that represents the number of bad paths would be appreciated. I think the final solution after subtracting the bad paths should be: $$\binom{2n}{n} - \binom{2n}{n+1} = \frac{1}{n+1}\binom{2n}{n}$$
Please let me know if I am wrong.
You can indeed use the reflection method. I find the reflection method slightly easier to understand if we talk about “touching” instead of “going above”. Not going above the diagonal $y=x$ is equivalent to not touching $y=x+1$, and this is the line in which we reflect the bad paths that do touch it. This maps $(0,0)$ to $(-1,1)$, which leads to the count of $\binom{(n-(-1))+(n-1)}{n-(-1)}=\binom{2n}{n+1}$ of bad paths.
Analogously, not going above $y=x+z$ is equivalent to not touching $y=x+z+1$, so this is the line in which we need to reflect the bad paths that touch it. This maps $(0,0)$ to $(-z-1,z+1)$, so the number of bad paths is
$$ \binom{n-(-z-1)+(n-(z+1))}{n-(-z-1)}=\binom{2n}{n+z+1}\;. $$
As a check, note that this is $\binom{2n}{n+1}$ for $z=0$ and $1$ and $0$ for $z=n-1$ and $z=n$, respectively, as it should be.