1 / 26

The Catalan Numbers and their Applications

The Catalan Numbers and their Applications. 1, 2, 5, 14, 42, 132, … Christen Mirando Western New England University. In this presentation…. History of the Catalan Numbers Examples/Applications Euler’s triangulation of convex polygons Catalan’s parenthesization problem

elkan
Download Presentation

The Catalan Numbers and their Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Catalan Numbers and their Applications 1, 2, 5, 14, 42, 132, … Christen MirandoWestern New England University

  2. In this presentation… • History of the Catalan Numbers • Examples/Applications • Euler’s triangulation of convex polygons • Catalan’s parenthesization problem • Mountain ranges on a graph • Hankel matrix • Relationship to computer science • Pascal’s Triangle • Formulas • Recursive • Explicit • Generating Function

  3. The Fibonacci Sequence0, 1, 1, 2, 3, 5, 8, 13… … is a set of numbers with which most people are familiar. These numbers appear in several areas of mathematics, in nature and in many other places. One set of numbers people may not be as familiar with is the set of Catalan numbers. This set of numbers, like the Fibonacci numbers, has many unexpected occurrences and beautiful relationships in mathematics.

  4. The first few Catalan Numbers

  5. History of the Catalan Numbers • Eugene Charles Catalan (1814-1894) was a Belgian mathematician who “discovered” the Catalan Numbers in 1838 while studying well-formed sequences of parentheses. • Although this set of numbers is named after him, he was not the first to discover it. • Leonhard Euler (1707-1783) discovered this set of numbers while studying triangulations of convex polygons. • Published a recursive formula in 1761. • Worked with Hungarian mathematician, Johann von Segner(1704-1777) , to develop a second order recurrence relation. • Gabriel Lame (1795-1870), was a French mathematician who used Euler’s recursive formula to find a explicit formula in 1838. • Although Euler and Catalan are given credit for this sequence, there is speculation that a Chinese mathematician Antu Ming (1692-1763) discovered them in the 1730’s through geometric models.

  6. Euler’s triangulation of a convex n-gon • Let Tn be the number of ways a convex n-gon can be divided into n-2 triangles by drawing n-3 nonintersecting diagonals where n ≥ 3. When n = 4, Tn = 2 When n = 5, Tn = 5 When n = 6, Tn = 14

  7. Euler’s Recursive Formula Euler let Tn be the number of triangulations of a convex n-gon Tn = 2610…(4n – 10) n ≥ 3 (n – 1)! T3 = 2 = 1, T4 = 26 = 2, and T5 = 2610 = 5 2! 3! 4! These look like the Catalan numbers, except the subscript of Tn is shifted two places to the right, so Cn = Tn+2. Substituting n + 2 into Tn yields: Cn= 2610…(4n – 2) (n + 1)! Cn = 4n – 2  2610…(4n – 6) n + 1 n! Cn = 4n – 2  Tn+1 n + 1 = 4n – 2 Cn – 1 n + 1

  8. Catalan’s Parenthesization Problem • Suppose we are given npairs of left and right parentheses. Find the number of correctly parenthesized sequences, Pn, that can be formed. Correct: () () Incorrect: ())( () When n = 1, Pn = 1 ()(), (()) When n = 2, Pn = 2 ()()(), (())(), ()(()), (()()), ((())) When n = 3, Pn = 5 (((()))), ((()())), ((())()), (()(())), When n = 4, Pn= 14 (()()()), (())(()), ()()()(), ()(())(), ()()(()), ()(()()), ()((())), (())()(), (()())(), ((()))()

  9. Since |Pn| = |Tn| = Cn, a bijection must exist between Tn and Pn • In 1961, H.G. Forder found a solution to this problem. He let each diagonal spanning adjacent sides be labeled with the parenthesized concatenation of the labels of the sides. c b d a e c b d (ab) a e c b d (ab) (de) a e c b((ab)c) d (ab) (de) a e c b((ab)c) d (ab) (de) a e ((ab)c)(de)) Since n = 6, there are 14 different ways to triangulate a hexagon

  10. Classic Problem – Mountain Ranges • Find the number of mountain ranges that can be drawn with n upstrokes and ndownstrokes. That is, find the number of different paths, Mn, we can choose from the origin to the lattice point (2n, 0). • Can touch the x-axis but cannot cross it. • From the point (x, y) we can climb up to the point (x+1, y +1) or climb down to the point (x+1, y −1).  n = 0, Mn= 1 n = 1, Mn= 1 n = 2, Mn= 2 n = 3, Mn= 5

  11. For n = 4, there are 14 possible mountain ranges.

  12. Hankel Matrix is a nxn matrix whose (i, j) entry is the Catalan number Ci+j-2. These matrices always have determinant 1. (1,1) (1,2) (2,1) (2,2) C(1+1-2) C(1+2-2) C(2+1-2) C(2+2-2) C0C1 C1C2 1 1 1 2 (1)(2) – (1)(1) = 2 – 1 = 1

  13. Now for a 3x3 matrix: (1,1) (1,2) (1,3) (2,1) (2,2) (2,3) (3,1) (3,2) (3,3) C(1+1-2) C(1+2-2) C(1+3-2) C(2+1-2) C(2+2-2) C(2+3-2) C(3+1-2) C(3+2-2) C(3+3-2) C0C1 C2 C1C2C3 C2 C3 C4 1 1 2 1 2 5 2 5 14 Det = [(2)(14) – (5)(5)] – [(1)(14) – (2)(5)] + 2[(1)(5) – (2)(2)] = [28 – 25 – 14 + 10 + 10 - 8] = 1

  14. Application to Computer Science • Stacks, Pushing, Popping Using a stack, determine the number of different ways of the ordered list of integers, 1, 2, 3, ..., n can be pushed onto an empty stack and then popped resulting in an empty stack. For n = 1, there is only one way to push/pop data. For n = 2, there are two ways to push/pop data. Output: 12 1 2 empty stack push 1 pop 1 push 2 pop 2 Output: 21 2 1 1 1 empty stack push 1 push 2 pop 2 pop 1

  15. When n = 3, there are 6 permutations, but only 5 satisfy the stack structure.

  16. Notice that the permutation, 312, cannot be made. It would have to start with the steps shown below, but there is no way to pop 1 before popping 2.

  17. Explicit Formula from Euler’s Recursive Formula Cn= 4n – 2 Cn – 1 n + 1 = (4n – 2)(4n – 6) Cn – 2 (n + 1)n = (4n – 2)(4n – 6)(4n-10) Cn – 3 (n + 1)n(n – 1) This continues on until the last term is C0 = (4n – 2)(4n – 6)(4n-10)…62 C0 (n + 1)n(n – 1)… 32

  18. 2 is factored out from each term in the numerator , and the denominator becomes (n + 1)! Also, remember C0 = 1 = (2n – 1)(2n – 3)(2n – 5)… 31  2n (n+1)! In order to make the numerator (2n)!, terms are inserted in red = (2n)(2n – 1)(2n - 2)(2n – 3)(2n - 4)(2n – 5)… 321  2n (2n)(2n -2)(2n - 4) … (2)(n+1)! Note, what is inserted in red, (2n)(2n – 2)(2n-4)…2 = 2n n! by factoring out a 2 from all n terms. We can substitute this in the denominator. = (2n)!  2n 2n n!(n+1)! = (2n)! n!(n+1)!

  19. = (2n)! (n + 1)! n! Note: = (2n)! (n + 1) n! n! 2n = (2n)! n n! (2n – n)! = 1 2n (n + 1) n = (2n)! n! n! This is the explicit formula from Euler’s recursive formula.

  20. Pascal's Triangle and the Catalan Numbers • Explicit formula for the Catalan numbers; Cn = 1  2n n + 1 n Example C4: 1 8 = 1 (70) = 14 (4+1) 4 5 row 0 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1

  21. Another Example, Cn = 1  2nn n-1 2n is the term directly to the right/left of the CBC . n -1 Now, we divide this term by row number n. 1 row 0 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 Example C4: 1  8 = 1 (56) = 14 4 3 4

  22. Generating Function for the Catalan Numbers • We have given a recursive and an explicit formula for finding the nth Catalan number, Cn. We will now find the generating function for the Catalan numbers. • Segner’s Recursive Formula: • Cn= (C0, C1, C2,…, Cn-1)  (Cn-1 ,Cn-1,…,C0 ) = C0Cn-1+ C1Cn-2 +…+ Cn-1C0 • Let C(x) = C0 + C1x + C2x2 + C2x2 + … + Cnxn • [C(x)]2 = (C0 + C1x + C2x2 + C2x2 + … + Cnxn) (C0 + C1 + C2x2 + C2x2 + … + Cnxn) = (C0C0) + (C0C1 + C1C0) x + (C0C2 + C1C1 + C2C0) x2 +….. = (11) + (11 + 11) x + (12 + 11 + 21) x2 +….. = 1 + 2x + 5 x2 +….. = C1x0 + C2x1 + C3x2 +…. + Cn+1xn

  23. C(x) 2 = C1 + C2x + C3x2 +…. + Cn+1xn C(x) 2 =C1x + C2x2 + C3x3 …. + Cnxn x C(x) 2 = (C0 + C1x + C2x2 + C3x3 …. + Cnxn)– C0 x C(x) 2 = C(x)– C0 x xC(x) 2 = C(x) – C0 xC(x) 2 - C(x) + 1 = 0 Using the quadratic formula, a = x, b = -1, c = 1 C(x) = 1 +/- (-1)2 – 4(x)(1) 2x C(x) = 1 - 1 – 4(x) 2x

  24. If any of these problems appear: … the solution is the Catalan Numbers! • Number of binary trees with n vertices • Number of full binary trees with n vertices • Number of nmultisets {a1, a2, …, an} of elements ai such that a1 + a2 + … + an = 0 • Number of ways nsemicircles can be arranged such that no two intersect • Number of permutations for the set {1, 2, …, 2n} where f is an involution that has no fixed points and satisfies the noncrossing condition • Number of ways to arrange 2n soldiers in two rows in ascending height order • Number of tilings of the staircase shape that can be made with n rectangles • Number of paths a rook can take from the upper left-hand corner to the lower right-hand corner on an nxn chessboard without crossing the main diagonal • Number of ideals in a ring is Cn+1 • Number of nilpotent ideals in a ring • ….. Many more!

  25. Any Questions?

  26. References • Guy, R.K. Letters to the Editor. Mathematics Magazine 61 (Oct. 1988): 269. • Larcombe, P. “The 18th Century Chinese Discovery of the Catalan Numbers.” Mathematical Spectrum 32 (1999-2000): 5-6. • Jarvis, F. “Catalan Numbers.” Mathematical Spectrum 36 (2003-2004): 9-12. • Koshy, Thomas. “The Ubiquitous Catalan Numbers.” Mathematics Teacher 100.3 (2006): 184-88. • Gardner, M. “Mathematical Games.” Scientific American 234 (June 1976): 120-125. • Grimaldi, Ralph P. Fibonacci and Catalan Numbers: An Introduction. Hoboken, NJ: John Wiley & Sons, 2012. Print. • Koshy, Thomas. Catalan Numbers with Applications. Oxford: Oxford UP, 2009. Print. • Brualdi, Richard A. Introductory Combinatorics. New York: North-Holland, 1977. Print.

More Related