MathematicsCombinatoricsUniversity
AQAAPOntarioNSWCBSEGCE O-LevelMoECAPS

Catalan Numbers Calculator

Compute the n-th Catalan number.

Use the free calculatorCheck the variablesOpen the advanced solver
This is the free calculator preview. Advanced walkthroughs stay in the app.
Result
Ready
Catalan Number

Formula first

Overview

Catalan numbers define a sequence of natural numbers frequently used in combinatorics to count various recursive structures like rooted trees or non-crossing paths. They specifically represent the number of ways to form a valid string of n pairs of balanced parentheses.

Symbols

Variables

C_n = Catalan Number, n = Index

Catalan Number
Index

Apply it well

When To Use

When to use: Use this formula when counting the number of monotonic paths on an n×n grid that stay below the diagonal or when dividing a convex polygon into triangles. It is also applicable when finding the number of distinct binary search trees that can be constructed with n unique nodes.

Why it matters: These numbers are vital in computer science for determining the structural possibilities of data types and the efficiency of parsing algorithms. They also appear in physics and biology to model folding patterns and lattice structures where intersections are prohibited.

Avoid these traps

Common Mistakes

  • Using (2n choose n) without dividing by (n+1).
  • Off-by-one indexing (C0=1).

One free problem

Practice Problem

A programmer needs to determine how many different ways they can arrange 3 pairs of balanced parentheses, such as ((())) or ()()(). Calculate the total number of valid combinations.

Index3

Solve for:

Hint: Use the formula where n represents the number of pairs, calculating (6 choose 3) first.

The full worked solution stays in the interactive walkthrough.

References

Sources

  1. Wikipedia: Catalan number
  2. Concrete Mathematics: A Foundation for Computer Science by Ronald L. Graham, Donald E. Knuth, Oren Patashnik
  3. Discrete Mathematics and Its Applications by Kenneth H. Rosen
  4. Richard P. Stanley, Enumerative Combinatorics, Volume 1
  5. Concrete Mathematics: A Foundation for Computer Science by Graham, Knuth, Patashnik
  6. Standard curriculum - University Combinatorics / Discrete Mathematics