WORKED DEFAULT
Check the calculation with the default inputs
For n = 5 east steps and k = 3 north steps, the constrained path count is 28.
- Validate endpoint0 <= 3 <= 5
- Apply ballot factor3/6 x C(8,3)
- Return count28 paths
LATTICE PATHS / DIAGONAL CONSTRAINT
Count monotone paths to (n,k) that use unit east and north steps and never rise above the main diagonal.
METHOD / WORKED EXAMPLE
Count monotone paths to (n,k) that use unit east and north steps and never rise above the main diagonal. The result panel keeps the defining recurrence or counting identity visible so the output can be checked independently.
WORKED DEFAULT
For n = 5 east steps and k = 3 north steps, the constrained path count is 28.
READ THE RESULT
The diagonal prefix constraint distinguishes this result from the unrestricted binomial path count.
ASSUMPTIONS AND LIMITS
n and k are capped at 25 and combinations beyond safe exact display are refused.
COMMON QUESTIONS
Apply the Bertrand ballot closed form ((n-k+1)/(n+1)) times C(n+k,k) for whole inputs satisfying 0 <= k <= n. The indexing and counted objects are stated in the method and worked example. Inputs must be whole numbers inside the displayed domain; the page never rounds a decimal into an accepted index. This ties the answer to one explicit convention instead of silently mixing sequence offsets or combinatorial interpretations.
The diagonal prefix constraint distinguishes this result from the unrestricted binomial path count. Small boundary cases and the displayed identity provide useful independent checks. Recompute the displayed recurrence or closed form with the same inputs and compare its previous terms or counting factors. That check supports this bounded result, but it does not transfer the interpretation to a different sequence or counting object.
n and k are capped at 25 and combinations beyond safe exact display are refused. The implementation uses integer arithmetic internally and refuses results beyond the safe display boundary. Combinatorial and recurrence values can grow rapidly even when the inputs look small. The conservative cap prevents browser stalls and avoids presenting an unsafe floating-point integer as exact; larger work needs arbitrary-precision software and independent resource controls.
RELATED TOOLS
Use boundary
Apply the Bertrand ballot closed form ((n-k+1)/(n+1)) times C(n+k,k) for whole inputs satisfying 0 <= k <= n.
B(n,k)=((n-k+1)/(n+1)) C(n+k,k).