Lecture 3: Catalan Numbers

Similar documents
Infinite Sequences and Series

6.3 Testing Series With Positive Terms

P1 Chapter 8 :: Binomial Expansion

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Math 155 (Lecture 3)

1 Generating functions for balls in boxes

MA131 - Analysis 1. Workbook 2 Sequences I

Sequences I. Chapter Introduction

Lecture 6: Integration and the Mean Value Theorem. slope =

4.3 Growth Rates of Solutions to Recurrences

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

The Binomial Theorem

Seunghee Ye Ma 8: Week 5 Oct 28

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

Zeros of Polynomials

Math 120 Answers for Homework 23

MATH 31B: MIDTERM 2 REVIEW

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

Lecture 7: Fourier Series and Complex Power Series

Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 21. Some Important Distributions

GENERATING FUNCTIONS AND RANDOM WALKS

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

Combinatorics and Newton s theorem

The Growth of Functions. Theoretical Supplement

Worksheet on Generating Functions

1 Approximating Integrals using Taylor Polynomials

Chapter 6: Numerical Series

1. n! = n. tion. For example, (n+1)! working with factorials. = (n+1) n (n 1) 2 1

Bertrand s Postulate

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

CHAPTER 10 INFINITE SEQUENCES AND SERIES

Ma 530 Introduction to Power Series

Lecture 6: Integration and the Mean Value Theorem

10.1 Sequences. n term. We will deal a. a n or a n n. ( 1) n ( 1) n 1 2 ( 1) a =, 0 0,,,,, ln n. n an 2. n term.

The Riemann Zeta Function

Recitation 4: Lagrange Multipliers and Integration

Random Models. Tusheng Zhang. February 14, 2013

1+x 1 + α+x. x = 2(α x2 ) 1+x

SYDE 112, LECTURE 2: Riemann Sums

MATH 147 Homework 4. ( = lim. n n)( n + 1 n) n n n. 1 = lim

The Random Walk For Dummies

NUMERICAL METHODS COURSEWORK INFORMAL NOTES ON NUMERICAL INTEGRATION COURSEWORK

Z ß cos x + si x R du We start with the substitutio u = si(x), so du = cos(x). The itegral becomes but +u we should chage the limits to go with the ew

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Polynomial Functions and Their Graphs

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

Lesson 10: Limits and Continuity

Understanding Samples

Ma 530 Infinite Series I

Chapter 6 Overview: Sequences and Numerical Series. For the purposes of AP, this topic is broken into four basic subtopics:

7 Sequences of real numbers

Math 113 Exam 3 Practice

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

Sequences III. Chapter Roots

MA131 - Analysis 1. Workbook 7 Series I

Tennessee Department of Education

Recurrence Relations

II. Descriptive Statistics D. Linear Correlation and Regression. 1. Linear Correlation

Once we have a sequence of numbers, the next thing to do is to sum them up. Given a sequence (a n ) n=1

Combinatorially Thinking

is also known as the general term of the sequence

Math 475, Problem Set #12: Answers

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

Frequentist Inference

Statistics 511 Additional Materials

MAT1026 Calculus II Basic Convergence Tests for Series

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer.

Infinite Series. Definition. An infinite series is an expression of the form. Where the numbers u k are called the terms of the series.

In algebra one spends much time finding common denominators and thus simplifying rational expressions. For example:

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

The Phi Power Series

Math 299 Supplement: Real Analysis Nov 2013

Sequences, Series, and All That

Riemann Sums y = f (x)

Lecture Chapter 6: Convergence of Random Sequences

INTEGRATION BY PARTS (TABLE METHOD)

Math 2784 (or 2794W) University of Connecticut

n outcome is (+1,+1, 1,..., 1). Let the r.v. X denote our position (relative to our starting point 0) after n moves. Thus X = X 1 + X 2 + +X n,

MA131 - Analysis 1. Workbook 3 Sequences II

Definitions and Theorems. where x are the decision variables. c, b, and a are constant coefficients.

TR/46 OCTOBER THE ZEROS OF PARTIAL SUMS OF A MACLAURIN EXPANSION A. TALBOT

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

MATH 21 SECTION NOTES

David Vella, Skidmore College.

Calculus BC and BCD Drill on Sequences and Series!!! By Susan E. Cantey Walnut Hills H.S. 2006

Sequences. Notation. Convergence of a Sequence

Chapter 7: Numerical Series

( 1) n (4x + 1) n. n=0

Math 113 Exam 3 Practice

CALCULUS II. Sequences and Series. Paul Dawkins

Math 61CM - Solutions to homework 3

Math 451: Euclidean and Non-Euclidean Geometry MWF 3pm, Gasson 204 Homework 3 Solutions

Fall 2018 Exam 2 PIN: 17 INSTRUCTIONS

Revision Topic 1: Number and algebra

Machine Learning for Data Science (CS 4786)

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Chapter 7 COMBINATIONS AND PERMUTATIONS. where we have the specific formula for the binomial coefficients:

Topic 1 2: Sequences and Series. A sequence is an ordered list of numbers, e.g. 1, 2, 4, 8, 16, or

Transcription:

CCS Discrete Math I Professor: Padraic Bartlett Lecture 3: Catala Numbers Week 3 UCSB 2014 I this week, we start studyig specific examples of commoly-occurrig sequeces of umbers (as opposed to the more geeral coutig techiques we discussed for the past few weeks. Our first example of such a sequece are the Catala umbers: 1 Catala Numbers 1.1 Ascii Moutai Rages Questio. Suppose you have a umber of forward-slashes / ad backward-slashes \. A Ascii moutai rage is ay sequece made of these 2 slash marks, with forward slashes iterpreted as a icrease i altitude ad backward-slashes iterpreted as a decrease i altitude, so that We ed at the same height that we start. We ever dip below the height that we start at. Here are some Ascii moutai rages: /\ /\ /\ / \/\ /\ / \ / \ /\/ \ / \ /\ / \/\ / \ / \ /\/\/\/ \ / \/ \/\ Here are some sequeces that are ot moutai rages: /\/\/\/ /\ / /\ /\ / \ /\ / /\ /\/\/ \ / \ /\/\ /\/ \ / \ \/ \/ \/ \ Let M deote the total umber of moutai rages of legth 2. What is M, for ay? Aswer. We start by first collectig some data, to help us make a guess. I a sese, there is exactly oe possible moutai rage made out of 0 slash marks, i the same way that there is oe way to pick 0 thigs out of a set: so we say that M 0 1. More ituitively, there is exactly oe moutai rage made out of 2 slash marks; this is because our first move must be to place a / so that we icrease i altitude, which we must follow with a \ to go back dow to our startig height. There are two possible moutai rages made out of 4 slash marks: /\ 1

/\ /\/\ / \ There are five possible moutai rages made out of 6 slash marks: /\ /\ /\ / \ /\/\ /\/\/\ / \/\ /\/ \ / \ / \ With some time, you ca figure out that M 4 14 ad M 5 42, givig us the followig table: 0 1 2 3 4 5 M 1 1 2 5 14 42 It s hard to see a patter i the above data! So, istead, let s try to thik about how we actually make these moutais. Notice that with ay moutai,we must have the followig: We must start our moutai with a forward slash. Let s color it gree: /. We must at some poit i time retur back to our origial height via a backslash. Let s color the first such backslash that returs to our origial height red: \. Now, make the followig observatios: /\ / \ /\ / \/ \ /\/\ / \ / \ / \/ \ Betwee our gree forward-slash ad our red backslash, we have a moutai that starts at height 1 ad ever dips below height 1. After our red backslash, we have a moutai that starts ad eds at height 0. I other words, we have writte our origial moutai rage as the combiatio of two smaller moutais, oe of which we put o top of the /, \ marks ad the other of which we put to the right of the \ mark. Furthermore, This decompositio is uique: that is, give ay origial moutai rage, our process above is t ambiguous i how it breaks our moutai ito two smaller moutais! This process is reversible: give our two smaller moutais, we ca combie them by udoig our process to get back to our origial moutai rage! Cosequetly, if we wat to cout the total umber of large moutais, it suffices to cout all of the pairs of smaller moutais that ca create those larger moutais. I other words, we have a recursive relatioship! Specifically, because we ca break ay 2-legth moutai 2

dow ito some 2k-legth moutai o top of the /, \ marks, alog with a 2( 1 k- legth moutai after those marks, we have the followig recursive relatioship: 1 M M 0 M 1 + M 1 M 2 +... M k M 1 k. This looks familiar! I fact, we ve oticed a relatioship like this before: last week, whe we studied geeratig fuctios, we saw that ( ( ( a x b x a k b k x for ay two formal power series a x, b x. I particular, this tells us that if we set F (x M x, we get ( ( ( F (x F (x M x M x M k M k k0 k0 k0 x Our recursive relatioship tells us that k0 M km k M +1 ; therefore, we have ( (F (x 2 M k M k x M +1 x x(f (x 2 k0 M +1 x +1 x(f (x 2 1 + F (x x(f (x 2 F (x + 1 0. M x M 0 + M x 1 So: we have a expressio for F (x! I particular, we have a quadratic-polyomialtype expressio for F (x: therefore, we kow that F (x has to algebraically satisfy this expressio! However, we kow the form of ay solutio to a quadratic of the form a? 2 + b? + c: it s give by the quadratic formula? b± b 2 4ac 2a. I particular, we have that F (x 1 ± 1 4x for our specific formal power series F (x. Now: remember whe we defied formal power series, ad I said that we d ever plug thigs ito them? I kida lied. We will almost ever plug thigs ito geeratig fuctios, ad wheever we do we will be careful to make sure that the ifiite sum we ve created actually coverges to somethig sesible ad that we re makig sese. But! Now is totally oe of the times where it makes sese to do this! Cosider what we ve got here: 3

O oe had, if we take ay formal power series o matter what it is! we ca always plug i x 0 to it ad get somethig well-defied. Specifically, if our formal power series is some A(x a x, settig x 0 is just sayig that every term other tha the a 0 term gets multiplied by 0 0; i other words, A(0 a 0! So o matter what our formal power series is, we kow that pluggig i 0 to it should give us its costat term. O the other had, for the problem we re curretly cosiderig, we kow that F (x 1± 1 4x. This is a little irritatig, i that we have this ± term: we re gettig two possible aswers for F (x, whe we really wat oe (after all, there is oly oe correct value for M, the umber of 2-legth moutai rages! So: what happes whe we plug i x 0 to 1± 1 4x? Well: if we have the +-brach, we get somethig of the form 2 0 at x 0; this is hopeless, as it will either equal 1 M 0 F (0 or could it eve equal 1 i the limit, as the top goes to 2 while the bottom goes to 0! Coversely, if we take the brach, we get somethig of the form 0 0 at x 0, which is... ot great, but better! I specific, if we take limits + use L Hopital, we ca see that 1 ( d 1 4x dx 1 1 4x 1 2 lim lim x 0 x 0 d dx ( lim (1 4x 1/2 4 1, x 0 2 which is right! So, we actually kow which of the two braches is right to cosider here: we must have F (x 1 1 4x. Cool! So. If this was a stadard geeratig-fuctios problem, we d fid some way to expad the right-had side as a power series, ad use this expasio to determie what the M s are! To do this, we re goig to eed ew tools, however: we have this 1 4x term, which we do t have tools for. Let s build them! 1.2 Detour: Newto s Geeralized Biomial Theorem Last week, we proved that for ay N, (x + y k0 ( x k y k. k We wat to uderstad (1 4x 1/2. A seemigly very dumb thig we could write to try to aswer this problem is the followig: 1/2 ( 1/2 (1 4x 1/2 1 k ( 4x (1/2 k. k k0 4

Surprisigly, this is actually correct! Let s make some defiitios, so we ca prove this: Defiitio. Take ay real umber r ot i the atural umbers, ad ay atural umber k. We defie the geeralized biomial coefficiet ( r k as follows: ( r k (r(r 1(r 2... (r (k 1. k! Notice that if r was a atural umber k, this is literally the same thig as the ormal biomial coefficiet! By covetio, if k 0, we set this expressio equal to 1. This lets us make the k terms make sese. To get the rest of the expressio, let s pull out some results from calculus: Defiitio. Take ay fuctio f(x. The Taylor series aroud 0 correspodig to f(x is the power series f ( (0 x,! where f ( (0 deotes the -th derivative of f(x evaluated at x 0. So. Suppose that we cosider the Taylor series for (x + y r, for ay o-atural real value r. To do this, we ll eed to fid the derivatives of this fuctio with respect to x. It is ot too hard to see that d dx ((x + yr r(x + y r 1 d dx (x + y r(x + yr 1 1 r(x + y r 1 d 2 dx 2 ((x + yr d ( r(x + y r 1 r(r 1(x + y r 2 d (x + y r(r 1(x + yr 2 dx dx d 3 dx 3 ((x + yr d ( r(r 1(x + y r 2 r(r 1(r 2(x + y r 3 dx. d dx ((x + yr d ( r(r 1... (r ( 2(x + y r 2 r(r 1... (r ( 1(x + y r. dx (The last step here is justified by iductio; we leave formal details to the reader! Do this iff you do t see why it s true. If you plug i x 0, you get that d dx ((x + yr r(r 1... (r ( 1(x + y r x0 r(r 1... (r ( 1y r, x0 5

ad therefore that the Taylor series correspodig to (x + y r is just f ( (0 x! r(r 1... (r ( 1 y r x.! The coefficiets here are precisely our geeralized biomial coefficiets! Therefore, we ve show that the Taylor series for (x + y r is actually ( r y r x, ad specifically that the Taylor series for (1 4x 1/2 is ( r ( 4x. From here, we eed a few quick results from calculus: we simply state them, ad leave their derivatio (because they ivolve more i-depth Taylor series maipulatios tha we wat to do here for the reader! Our Taylor series for (1 4x 1/2 coverges ad is equal to (1 4x 1/2 for values of x i ( 1/4, 1/4. Two power series are equal if ad oly if all of their coefficiets are equal! Therefore, we have M x F (x 1 1 4x 1 ( 4x. 1.3 Back to Moutais So we ca solve for the M coefficiets! We do this here. First, let s clea up our expressio above, by just doig some algebraic maipulatios. Nothig crazy happes here; try to read lie-by-lie ad make sure you follow our steps! 6

M x 1 ( 4x 1 ( 1/2 0 ( 4x 0 1 ( 4x 1 1 1 1 +1 2 + 1 ( 4x ( 4x +1 ( 4x ( 4x (1/2((1/2 1... ((1/2 (( + 1 1 2 ( 4x ( + 1! (+1 terms {}}{ 1 2 2 1 2 3 2 5 2... 1 2 2 ( 1 4 x ( + 1! (+1 terms {}}{ 1 2 2 1 2 3 2 5 2... 2 1 ( 1 2 ( 1 4 x ( + 1! 1 3 5 7... (2 1 ( 1 1 2 ( 1 4 x ( + 1! 1 3 5 7... (2 1 2 x ( + 1! Ok, let s breathe for a secod. The right-had side is certaily less awful tha before, but it s still ot as simple as possible. I particular, the 1 3 5 7... (2 1 expressio is t ecessarily as simple as we d like! We ca fix this, with the followig clever trick; I call this out mostly because it s a maipulatio I ve see come up about oce every four-five moths, ad it s useful to have somewhere i your mid! Notice that 2! 2 (1 2... 2 4 6... 2. 7

Therefore, we have ad thus that 1 3 5 7... (2 1 (2! 2!, M x 1 3 5 7... (2 1 2 x ( + 1! (2! 2!( + 1! 2 x 1 (2! + 1 2!! 2 x ( 1 2 x + 1 That is... a far icer expressio. Also: it works! I theory, we should have M 1 for all, ad check it out: M 0 1 ( 2 0 1, 0 + 1 0 M 1 1 ( 2 1 1 2! 1 + 1 1 2 1!1! 1, M 2 1 ( 2 2 1 4! 2 + 1 2 3 2!2! 2, M 3 1 ( 2 3 1 6! 3 + 1 3 4 3!3! 5, M 4 1 ( 2 4 1 8! 4 + 1 4 5 4!4! 14, M 5 1 ( 2 5 1 10! 5 + 1 4 6 5!5! 42. +1( 2 Amazig! Math: it s ridiculous. 1.4 Alterate Derivatios Whe you get a aswer as simple as M 1 +1( 2, it suggests that there may be a ice combiatorial iterpretatio of this formula as it relates to moutais that is, some way i which we ca pick thigs out of 2 thigs, ad after scalig by 1/( + 1 to deal with overcoutig get our aswer! Pleasatly, this is true: there is a way to derive our closed-form forumla for M without geeratig fuctios! We preset this here, after the 8

geeratig fuctio solutio, because (while this is a much shorter solutio it is arguably oe that requires more cleveress: ulike the above, which was a (crazy applicatio of tools we kow, this oe ivolves either kowig the aswer M +1( 1 2 ahead of time or comig up with some surprisig isights ito moutai rages (or both! We do this here. First, let s chage our problem somewhat: cosider ay sequece made out of + 1 forward-slashes / ad backslashes \. Here, we re ot worryig about these sequeces formig proper moutai rages: i.e. we ca dip below our startig altitude. Moreover, we kow that after oe of these sequeces, we will be precisely oe uit higher tha we started, as we wet up + 1 times ad dow times. Imagie drawig these slashes o the iteger lattice Z 2, so that each forward slash coects some (a, b to (a + 1, b + 1, ad each backwards slash coects some (a, b to (a + 1, b 1. 1.5 Catala Numbers i Other Cotexts Not to kock the above derivatios, but they re actually ot what most mathematicias thik are the cool thigs here! Istead, cosider the recurrece relatio we studied to get these umbers: 1 C 0 C 1 1, C C k C ( 1 k The crazy thig about this recurrece is that there are literally hudreds of mathematical objects ad cocepts that reduce to this patter! O the homework you have six of these recurreces to study; we give oe more particularly beautiful example here. Let C deote the total umber of ways to take a + 2-sided regular covex polygo ca be cut ito triagles by drawig straight lies betwee vertices. There are fourtee ways to do this for 4, as draw below: k0 (Picture stole from Wikipedia I claim that this sequece satisfies the recurrece relatio described above. Our base cases, as typical, are automatic; C 0 is kid-of trivially 1, as there s exactly oe way (do othig to cut the o-existet 2-sided regular polygo ito triagles, while C 1 1 because there s exactly oe way (do othig! to cut a triagle ito... triagles. To get our recurrece relatio: Take ay regular + 2-go. How are we goig to break this ito smaller polygos? Well: if we ve divided our polygos ito triagles, this motivates us to thik about cuttig alog a triagle to get smaller polygos! 9

Specifically, take our polygo, ad pick out the triagle that uses the top edge: because we ve broke our polygo ito triagles, we kow that exactly oe such triagle exists! Split our polygo ito two polygos alog this triagle: because we create two ew edges from the chord-lies of this triagle, ad delete oe edge by gettig rid of the top edge, we must have C k C -1-k Split our polygo ito two polygos alog this triagle: because we create two ew edges from the chord-lies of this triagle, ad delete oe edge by gettig rid of the top edge, we must have + 2 + 2 1 + 3 edges, split over two polygos. So we have oe k + 2-go ad oe 1 k + 2-go! I other words, we have the recurrece as claimed. 1 C 0 C 1 1, C C k C ( 1 k k0 10