Dyck Path Counter
Enter a semilength n to count the Dyck paths of that size.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
A Dyck path is a staircase-like lattice path made of "up" and "down" steps that starts and ends at the same height and never dips below its starting level — equivalent to a correctly balanced sequence of parentheses, where an "up" step is an opening bracket and a "down" step is a closing one. This calculator counts how many distinct Dyck paths exist for a given semilength n (n up-steps and n down-steps, 2n steps total), a count that equals the nth Catalan number, C(2n,n)/(n+1).
Catalan numbers via Dyck paths show up constantly in combinatorics and computer science: they count the ways to correctly match parentheses in an expression, the number of distinct binary search trees with n nodes, the ways to triangulate a convex polygon, and valid push/pop sequences on a stack — which is why the same C(2n,n)/(n+1) formula keeps reappearing across seemingly unrelated counting problems in discrete math courses.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)