catalan number presentation final

Upload: radhika-jain

Post on 06-Apr-2018

256 views

Category:

Documents


2 download

TRANSCRIPT

  • 8/3/2019 Catalan Number Presentation Final

    1/27

  • 8/3/2019 Catalan Number Presentation Final

    2/27

    They are a sequence of numbers that arise in various problems. The terms of the sequence

    can be calculated by the formula:

    Notice how the terms of the sequence generated grow rapidly:

    Cn= 1, 1, 2, 5, 14, 42, 132, 429, 1430, ..

    There are other different variations of the formula but these are all equivalent, including:

    What is a Catalan number?

  • 8/3/2019 Catalan Number Presentation Final

    3/27

    Natural number proof

    Expressing Cn as the difference of two binomial coefficients, we have thus proved that it is in

    fact a natural number.

    We shall now see that the Catalan numbers are natural numbers as this is not instantly obvious.

    We shall do this by proving the previous formula:

  • 8/3/2019 Catalan Number Presentation Final

    4/27

    Catalan numbers in Pascals

    triangleThe Catalan series can be found in Pascals triangle:

    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.

    1

    11

    1

  • 8/3/2019 Catalan Number Presentation Final

    5/27

    Numbers in the central column

    2 1 = 1

    64 = 2

    20 15 = 5

    70 56 = 14

    252210 = 42

    -

  • 8/3/2019 Catalan Number Presentation Final

    6/27

    History of the Catalan numbers

    These numbers were first discovered by Leonhard Euler in the18th century while he was trying to see how many ways a

    polygon with n+2 sides can be divided into n triangles withoutany of the lines intersecting.

    They were later named after Eugne Catalan in 1838 after hedefined the sequence and found a more elegant formula.

    He also worked on the polygon problem but later found thatthe Catalan numbers appeared when looking at the problem ofcounting the number of ways a group of n letters could befitted into parentheses.

    Eugne Charles Catalan 1814-1894

  • 8/3/2019 Catalan Number Presentation Final

    7/27

    Appearances of Catalan

    numberThe Catalan numbers appear within combinatorical problems in mathematics. A few of the main

    problems we will be looking at in closer detail include:

    The Parenthesis problem

    Rooted binary trees

    The Polygon problem

    The Grid problem

  • 8/3/2019 Catalan Number Presentation Final

    8/27

    ParenthesesIn 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:

  • 8/3/2019 Catalan Number Presentation Final

    9/27

    Parentheses ExamplesBy this definition, the following are valid chains of parentheses:

    However these are not:

    Catalan demonstrated that the number of possible ways of ordering n pairs of parentheses like

    this is precisely Cn, the nth Catalan number.

  • 8/3/2019 Catalan Number Presentation Final

    10/27

    Parentheses (continued)We can check this manually for small values of n:

    n=0 * 1 way

    n=1 ( ). 1 way

    n=2 ( ( ) ), ( ) ( ). 2 ways

    n=3 ( ( ( ) ) ), ( ( ) ) ( ), ( ( ) ( ) ), ( ) ( ( ) ), ( ) ( ) ( ). 5 ways

    This table confirms Catalans results for C0 to C3.

    We shall now see a proof for the general case.

  • 8/3/2019 Catalan Number Presentation Final

    11/27

    ProofFor 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.

  • 8/3/2019 Catalan Number Presentation Final

    12/27

    Proof (continued)

    Following this process we now have an arrangement of (n+1) Os and (n-1) Cs.

    We can then take these first (2k+1) terms and switch each one so that every O becomes a C

    and vice versa.

    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.

  • 8/3/2019 Catalan Number Presentation Final

    13/27

    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

  • 8/3/2019 Catalan Number Presentation Final

    14/27

    The Recurrence Relation

    .

    For example we can calculate C4 using this recurrence relation.

    We shall now see that the previous problem regarding parentheses satisfies this recurrencerelation.

    It is possible to determine Catalan numbers by expressing them in terms of previous values.

    Here we shall prove that =

    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.

  • 8/3/2019 Catalan Number Presentation Final

    15/27

    Recurrence Relation ProofIt is clear that in any valid string of parentheses, the first character must be an open parenthesis (.

    Later in the string, for validity, there must be a corresponding closed parenthesis ).

    Any further pairs of parentheses must lie either between the initial pair, or after them.

    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.

  • 8/3/2019 Catalan Number Presentation Final

    16/27

    Proof (continued)Hence the possibilities are:

    A contains n pairs B contains 0 pairs CnC0 possibilities

    A contains (n-1) pairs B contains 1 pair Cn-1C1 possibilities

    A contains 0 pairs B contains n pairs C0Cn possibilities

    Giving a total of CnC0 +Cn-1C1+ + C0Cn possibilities.

    Hence =

  • 8/3/2019 Catalan Number Presentation Final

    17/27

    Rooted Binary Trees 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

  • 8/3/2019 Catalan Number Presentation Final

    18/27

    The root of the problem

    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.

    n=1

    DUDU

  • 8/3/2019 Catalan Number Presentation Final

    19/27

    PolygonsThis 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.

    E.g. In the case of n=2:

    There are clearly only two possible ways, C2=2.

  • 8/3/2019 Catalan Number Presentation Final

    20/27

    Further Polygons n=3

    n=4

    n=5

    C4=14

    C5=42 C3=5

  • 8/3/2019 Catalan Number Presentation Final

    21/27

    Connecting Polygons and

    Rooted Binary TreeThis can be done by firstly planting the rootof the tree to one of the edges of

    the polygon:

  • 8/3/2019 Catalan Number Presentation Final

    22/27

    Connecting Polygons and

    Rooted Binary Tree Next adding nodes to each triangle and linking these together with arcs

    corresponds to the branches of the binary tree with degree 3:

  • 8/3/2019 Catalan Number Presentation Final

    23/27

    Connecting Polygons and

    Rooted Binary Tree Finally by inserting the end nodes (leaves) of degree 1, it completes the

    connection for the Polygon to its equivalent Rooted Binary Tree:

  • 8/3/2019 Catalan Number Presentation Final

    24/27

    GridsThis 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

    Cannot make

    moves along these

    lines

    Must only make

    moves along these

    lines

  • 8/3/2019 Catalan Number Presentation Final

    25/27

    A typical path:Here is an example of a route that might be taken:

    And this is equivalent to

    O C O O O C C O C O C C

    ( ) ( ( ( ) ) ( ) ( ) )

    O

    C

  • 8/3/2019 Catalan Number Presentation Final

    26/27

    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

  • 8/3/2019 Catalan Number Presentation Final

    27/27

    Our Catalan 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.