← Back to all activities한국어 → 📖 Read the Article
🔢 Catalan Numbers Lab

Why Do Completely Different
Problems Give the Same Number?

The number of ways to match parentheses, and the number of ways to split a polygon into triangles with diagonals, look completely unrelated at first glance. Yet remarkably, both turn out to be exactly the same sequence (1, 1, 2, 5, 14, 42...). These fascinating numbers are called Catalan numbers.

Catalan numbers are given by the formula Cn = (2n)! / ((n+1)! × n!). Starting from n=0, they go 1, 1, 2, 5, 14, 42, 132... Change n below to see the values, and list them out yourself to see why matching parentheses and triangulating a polygon give exactly the same count.

🔢 What Are Catalan Numbers?

Pick n and see exactly how the Catalan number is calculated.

n
0
Cₙ
1
( ) Matching Parentheses

Using n pairs of opening and closing parentheses, list out every arrangement where the parentheses match correctly (at no point are there more closing parentheses than opening ones).

Pairs of parentheses n
1
Number of possible arrangements
1
🔺 Polygon Triangulation

See how many ways there are to split an (n+2)-gon with diagonals so every piece is a triangle, by flipping through them one at a time.

Number of sides
3
Currently viewing
1/1
🌳 It Shows Up in Binary Trees Too? (Bonus)

The number of distinct shapes for a binary tree with n nodes (a tree structure where each node has at most a left and a right child) is also exactly the Catalan number Cn. Think of each parenthesis as a node and the nesting structure of parentheses as the branches of a tree, and it turns out all three problems (parentheses, polygons, binary trees) are really the same structure wearing different clothes.

Mathematicians describe problems like these — completely different on the surface but with the exact same count — by saying "there's a bijection" between them. Catalan numbers turn up in more than 200 different known combinatorics problems.

🧩 Catalan Numbers Quiz

Question 1 / 10 · Correct 0