Professional Documents
Culture Documents
Catalan Number Presentation Final
Catalan Number Presentation Final
A presentation by
They are a sequence of numbers that arise in various problems. The terms of the sequence can be calculated by the formula:
Expressing Cn as the difference of two binomial coefficients, we have thus proved that it is in fact a natural number.
1
1 1 1
Looking at the numbers in the central column and the adjacent column, you will notice that the difference of these numbers produces the Catalan sequence.
These numbers were first discovered by Leonhard Euler in the 18th century while he was trying to see how many ways a polygon with n+2 sides can be divided into n triangles without any of the lines intersecting.
They were later named after Eugne Catalan in 1838 after he defined the sequence and found a more elegant formula. He also worked on the polygon problem but later found that the Catalan numbers appeared when looking at the problem of counting the number of ways a group of n letters could be fitted into parentheses.
Eugne Charles Catalan 1814-1894
Parentheses
In 1838 Eugene Catalan solved the following problem:
How many different ways is it possible to arrange n pairs of parentheses so that they make sense?
We shall say that a string of parentheses makes sense (or is valid) if it follows these rules:
i) There are an equal number of open and closed parentheses in the string. ii) Counting from the left, the number of closed parentheses do not exceed the number of open parentheses at any point, for example:
Parentheses Examples
By this definition, the following are valid chains of parentheses:
Catalan demonstrated that the number of possible ways of ordering n pairs of parentheses like this is precisely Cn, the nth Catalan number.
Parentheses (continued)
We can check this manually for small values of n:
* ( ). ( ( ) ), ( ) ( ). ( ( ( ) ) ), ( ( ) ) ( ), ( ( ) ( ) ), ( ) ( ( ) ), ( ) ( ) ( ).
Proof
For clarity, throughout this proof we will let O denote an open parenthesis and let C denote a closed parenthesis. The total number of different arrangements of n Os and n Cs is
This however includes the invalid cases (such as OCOCCO) that we are not interested with. We must now calculate the number of invalid cases and subtract this number from to find our answer.
Proof (continued)
Consider an invalid string of n pairs of parentheses. The first fault is some C that is preceded by an equal number of Os and Cs, say k of each.
Hence the faulty C lies in the (2k +1)th position in the string of parentheses. We can then take these first (2k+1) terms and switch each one so that every O becomes a C and vice versa.
Following this process we now have an arrangement of (n+1) Os and (n-1) Cs.
Proof (continued)
Conversely, any arrangement of (n+1) Os and (n-1) Cs can be rewritten as an invalid sequence of n pairs of parentheses. We do this by noting the first time Os outnumber Cs by one and switching each term, up to and including that point.
Therefore the number of invalid sequences of n pairs of parentheses is equal to the total number of arrangements of (n+1) Os and (n-1) Cs. This is equal to .
Subtracting this value we see that the number of ways of arranging n pairs of parentheses is equal to
For example we can calculate C4 using this recurrence relation. Assume we know that C3 = 5, C2 = 2, C1 = 1, C0 = 1. C4 = C0C3 +C1C2+ C2C1 + C3C0 = 1*5 + 1*2 + 2*1 + 5*1 = 14.
. We shall now see that the previous problem regarding parentheses satisfies this recurrence relation.
If we wished to arrange (n+1) pairs of parentheses so that they make sense we would place an initial pair, and then a further n pairs of parentheses in the places marked A and B in the diagram. A and B must be valid strings of parentheses themselves and clearly either can contain up to n pairs, however if A contains a string of k pairs of parentheses, B must contain n-k pairs.
Proof (continued)
Hence the possibilities are: A contains n pairs A contains (n-1) pairs B contains 0 pairs B contains 1 pair CnC0 possibilities Cn-1C1 possibilities
A contains 0 pairs
B contains n pairs
C0Cn possibilities
A binary tree is a rooted tree where each node has two descendants, the left child and the right child. Except for the end (shaded) nodes. Problem: How many rooted binary trees can be made with n+1 end nodes? n=0 n=1
n=2
n=3
The rules of these sequences of Ds and Us are such that no initial part of the sequence has more Us than Ds. This is exactly the same as for the Os and Cs in the Parentheses examples.
Polygons
This problem involves the number of ways an n+2-sided polygon can be divided into n triangles by adding straight non-intersecting lines between the vertices.
Further Polygons
n=3
n=4
n=5
C3=5
C4=14
C5=42
Next adding nodes to each triangle and linking these together with arcs corresponds to the branches of the binary tree with degree 3:
Finally by inserting the end nodes (leaves) of degree 1, it completes the connection for the Polygon to its equivalent Rooted Binary Tree:
Grids
This problem looks at the number of ways to cross an n x n grid, in the shortest way, starting in the bottom left corner and going to the top right, without crossing the diagonal line.
Finish
Start
A typical path:
Here is an example of a route that might be taken: And this is equivalent to OCOOOCCOCOCC ( ) ( ( ( ) ) ( ) ( ) ) C
Summary
We have given a few examples of counting problems in which the Catalan numbers arise but there are many other problems where they can be found. We have seen how they are related when the problem is viewed in a different way. If we remember the condition that In a sequence of 2n items with n As and n Bs no initial part of the sequence has more Bs than As. Then the number of ways of counting these is the nth Catalan number. We can make a new example
Suppose two groups of mathematics students each perform a presentation, say one regarding Catalan numbers (group A) and another regarding eclipses (group B).
Assume an audience of 2n people had to vote for their favourite project, n choosing group A, the other n choosing group B. How many different ways can the votes be counted so that the eclipses group are never ahead? The answer is the nth Catalan number Cn.