3

The question is just what you would expect from the title:

How many paths (with steps going North or East) are there from $(0,0)$ to $(4,6)$, where three consecutive steps in any direction are prohibited?

My attempted solution with a generating function

We can consider distributing northward steps between the four eastward steps: there are five "slots" for the north steps to be situated, and we can have either $0,1,2$ consecutive north steps. This gives the answer $[x^6](1+x+x^2)^5 = 45$.

I would like to learn how to solve this using inclusion exclusion for good practice and possibly to verify the above result. My issue in particular is how to break apart the cases.

Edit to correct the generating function solution

As pointed out in the comments, the generating function solution still allows three right steps. However, there are only two ways this happens, namely

$$ \begin{align} &\underline{uu}r\underline{uu}rrr\underline{uu},\\ &\underline{uu}rrr\underline{uu}r\underline{uu}, \end{align} $$

so the right answer is $45-2=43$.

R.T.
  • 69
  • A basic Inclusion-Exclusion might be a little complicated. We'd need to consider all the ways the consecu-runs can intersect (I think involving the clique-polynomial of this graph: https://i.sstatic.net/QSK0uznZ.png ). For other methods see this duplicate question: https://math.stackexchange.com/q/4960759/111594 (there isn't a plain I-E solution, though so I don't know can we mark it as duplicate?) – ploosu2 Feb 05 '25 at 08:08
  • @RobPratt I apologise, thank you for correcting the 6, I intended to write a 5 (I asked the question at 3 am in my time). – R.T. Feb 05 '25 at 10:30
  • @RobPratt Thinking some more about it, I again believe the exponent of $x$ should be $6$, because we want a total of six moves going up. Why am I wrong here? – R.T. Feb 05 '25 at 11:02
  • Sorry, yes, only one $6$ needed to be changed to $5$, and your final count of $43$ is correct. – RobPratt Feb 05 '25 at 13:26

0 Answers0