Generating function for the number of lattice paths such that there are not three upsteps in a row.

196 Views Asked by At

Find a closed form for the generating function for the number of lattice paths with up (1,1) and down (1,-1) starting at (0,0) and ending at (2n,0) remaining above the x axis of length 2n in which there are never 3 consecutive upsteps

I have a solution to the problem, that is the generating function can be written in the form $A(x) = x^2 A(x)^2 + x A(x) + 1$ (which includes the empty path).

Now to avoid three upsteps in a row a path can either start with an upstep or a downstep followed by a downstep, which apparently has a contribution of $x A(x)$. In the second case we can start with two upsteps followed by a downstep which has contribution $x^{2} A(x)^2$.

My question is how do we know these are the "contributions" of these paths? What is the combinatorial explanation for this?

Thank you