MathsReadCompetitive mathematics
Pattern recognition · integer answerhard22 min

Grid paths below diagonal

Catalan Patterns

Walk from (0,0) to (8,8) using only unit right and up moves, never allowing the path to go above the line y=x. How many such paths are possible? Submit one integer.

Learning goal: Recognize lattice paths constrained by a diagonal.

Look for the underlying structure rather than guessing the next number. Submit only the final integer; you can open hints below as needed.

Check your answer without signing in. Sign in to save your progress.

Accepted format: a whole number such as 42 or 123456789. No commas, formulas, or source code.

Hints

Hint 1

Unrestricted paths choose 8 of 16 moves.

Hint 2

The reflection principle removes those crossing above the diagonal.

Hint 3

The Catalan number C(n)=(2n)!/(n!(n+1)!) counts valid paths.

Common mistake to avoid

Assuming the first visible step stays constant without testing the full pattern.

How to approach this problem

Use dynamic programming on grid points, omitting those with y>x, or use the Catalan count for paths constrained by the diagonal.

Worked example with different values

For destination (3,3), the count is choose(6,3)/(3+1)=5.

Apply the same reasoning to the challenge. This example is a separate practice problem.

Learn the technique: Sequence patterns: differences, recurrences and interleaving

Report a question or explanation issue

Sequence patterns · Repeating remainders

Back to problems →