Comment l'utiliser (3 étapes)
- Choose n and a representation tab (parentheses, path, or tree).
- Pick enumerate or sample, then set limits and seed as needed.
- Review C_n, examples, and the full table, then export CSV or share the URL.
Inputs
Result
How to read the examples
Parentheses use '(' and ')'. Paths use U for up, R for right. Trees use (L,R) with '*' as a leaf.
Enumeration is automatically disabled for large n. Sampling uses a uniform DP method with a fixed seed.
Examples
Table (C_0 to C_nMax)
| n | C_n | digits |
|---|
Example walkthroughs
n = 3 (5 strings)
Balanced parentheses of length 6: ((())), (()()), (())(), ()(()), ()()().
n = 10 (C_10 = 16796)
Use sampling to browse examples and export a CSV if you need test data.
FAQ
Qu’est-ce qu’un nombre de Catalan ?
Catalan numbers count balanced parentheses, Dyck paths, full binary trees, and many other structures that share the same recurrence.
Pourquoi l’énumération est-elle plafonnée ?
The number of examples grows very quickly. Sampling keeps the page responsive while still giving representative outputs.
L’échantillonnage est-il uniforme ?
Yes. The sampler uses DP counts to choose each step so every Dyck word is equally likely. A fixed seed reproduces the same list.
Comment les chemins de Dyck se traduisent-ils en parenthèses ?
Map '(' to U and ')' to R. The path stays under the diagonal exactly when the parentheses string is balanced.
Quel est le lien avec la triangulation de polygone ?
The number of triangulations of a convex (n+2)-gon is also C_n, so polygon triangulation is another Catalan structure.
Quelle définition d’arbre est utilisée ?
This page uses full binary trees with n internal nodes. Leaves are shown as '*', and internal nodes are written as (L,R).