Ma/CS 6a Class 24: More Generating Functions

Similar documents
Logic and Discrete Mathematics. Section 6.7 Recurrence Relations and Their Solution

Ma/CS 6a Class 25: Partitions

Catalan numbers Wonders of Science CESCI, Madurai, August

On Arithmetic Properties of Bell Numbers, Delannoy Numbers and Schröder Numbers

Generating Function Notes , Fall 2005, Prof. Peter Shor

Ma/CS 6a Class 23: Generating Functions

Generating Functions

Catalan Numbers. Richard P. Stanley. June 9, 2017

Some Catalan Musings p. 1. Some Catalan Musings. Richard P. Stanley

The Pigeonhole Principle

Contents. Counting Methods and Induction

Some Catalan Musings p. 1. Some Catalan Musings. Richard P. Stanley

Ma/CS 6a Class 19: Group Isomorphisms

1 Sequences and Summation

Sydney University Mathematical Society Problems Competition Solutions.

Generating functions in enumerative geometry

Livingston American School 4TH Quarter Lesson Plan

Solutions to Exercises Chapter 10: Ramsey s Theorem

Ma/CS 6b Class 23: Eigenvalues in Regular Graphs

Riemann surfaces. Paul Hacking and Giancarlo Urzua 1/28/10

Year 1: Fall. HSA Topics - 2 Year Cycle

1 Directional Derivatives and Differentiability

Notes on the Catalan problem

CIS Spring 2018 (instructor Val Tannen)

Ma/CS 6b Class 15: The Probabilistic Method 2

Jumping Sequences. Steve Butler 1. (joint work with Ron Graham and Nan Zang) University of California Los Angelese

Recurrences COMP 215

A Variation of the nil-temperley-lieb algebras of type A

Generating Functions

Math Precalculus I University of Hawai i at Mānoa Spring

CBSE Class IX Syllabus. Mathematics Class 9 Syllabus

besides your solutions of these problems. 1 1 We note, however, that there will be many factors in the admission decision

Approaches differ: Catalan numbers

Sample. An Incremental Development. John H. Saxon, Jr. Third Edition. Used by Permission SAXON PUBLISHERS, INC.

Problems for Putnam Training

The Essentials of CAGD

Notes on Continued Fractions for Math 4400

CBSE OSWAAL BOOKS LEARNING MADE SIMPLE. Published by : 1/11, Sahitya Kunj, M.G. Road, Agra , UP (India) Ph.: ,

The Advantage Testing Foundation Solutions

Named numbres. Ngày 25 tháng 11 năm () Named numbres Ngày 25 tháng 11 năm / 7

UNC Charlotte Super Competition Level 3 Test March 4, 2019 Test with Solutions for Sponsors

e x = 1 + x + x2 2! + x3 If the function f(x) can be written as a power series on an interval I, then the power series is of the form

Number Theory and Algebraic Equations. Odile Marie-Thérèse Pons

Ma/CS 6b Class 20: Spectral Graph Theory

Math Precalculus I University of Hawai i at Mānoa Spring

Ch 5.7: Series Solutions Near a Regular Singular Point, Part II

MATH 101, FALL 2018: SUPPLEMENTARY NOTES ON THE REAL LINE

Ma/CS 6a Class 4: Primality Testing

What you learned in Math 28. Rosa C. Orellana

Advanced Counting Techniques

Trig Identities. or (x + y)2 = x2 + 2xy + y 2. Dr. Ken W. Smith Other examples of identities are: (x + 3)2 = x2 + 6x + 9 and

Week 9-10: Recurrence Relations and Generating Functions

COURSE STRUCTURE CLASS IX Maths

2 Series Solutions near a Regular Singular Point

Introduction to Real Analysis Alternative Chapter 1

Figurate Numbers: presentation of a book

Mathematics Class 9 Syllabus. Course Structure. I Number System 17 II Algebra 25 III Geometry 37 IV Co-ordinate Geometry 6 V Mensuration 5 Total 90

CHMC: Finite Fields 9/23/17

Putnam Solutions, 2007

CMSC Discrete Mathematics FINAL EXAM Tuesday, December 5, 2017, 10:30-12:30

Chapter 7 Quadratic Equations

Functions of Several Variables: Limits and Continuity

Counting. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Question 1. Find the coordinates of the y-intercept for. f) None of the above. Question 2. Find the slope of the line:

2016 EF Exam Texas A&M High School Students Contest Solutions October 22, 2016

The problematic art of counting

Analysis-3 lecture schemes

2015 IMO Shortlist. a k+1 a 2 k. (s r n)x r x s, 1 r<s 2n

5.3 SOLVING TRIGONOMETRIC EQUATIONS

Due to the detail of some problems, print the contests using a normal or high quality setting.

N M L Nova S. Scotia League. Math. Game One SOLUTIONS

NEWTON POLYGONS AND FAMILIES OF POLYNOMIALS

Ma/CS 6a Class 18: Groups

Animals and 2-Motzkin Paths

15 th Annual Harvard-MIT Mathematics Tournament Saturday 11 February 2012

MATH PRIZE FOR GIRLS. Test Version A

Copyright 2016 Pearson Education, Inc. or its affiliates. All rights reserved. NES, the NES logo, Pearson, the Pearson logo, and National Evaluation

DISCRETE AND ALGEBRAIC STRUCTURES

MA 323 Geometric Modelling Course Notes: Day 11 Barycentric Coordinates and de Casteljau s algorithm

Fourth Lecture: 11/4

Warm-up Quantifiers and the harmonic series Sets Second warmup Induction Bijections. Writing more proofs. Misha Lavrov

TERMWISE SYLLABUS SESSION CLASS-IX SUBJECT : MATHEMATICS. Course Structure. Schedule for Periodic Assessments and CASExam. of Session

MATH Spring 2010 Topics per Section

Passing from generating functions to recursion relations

Ma/CS 6b Class 12: Graphs and Matrices

Ma/CS 6b Class 3: Stable Matchings

Algebraic Expressions

From the definition of a surface, each point has a neighbourhood U and a homeomorphism. U : ϕ U(U U ) ϕ U (U U )

Ma/CS 6b Class 20: Spectral Graph Theory

Joe Holbrook Memorial Math Competition

Basic Equation Solving Strategies

A LINEAR BINOMIAL RECURRENCE AND THE BELL NUMBERS AND POLYNOMIALS

Polynomial analogues of Ramanujan congruences for Han s hooklength formula

Topology Exercise Sheet 2 Prof. Dr. Alessandro Sisto Due to March 7

Polynomial Interpolation Part II

Scott%County%Public%Schools%

Math 192r, Problem Set #3: Solutions

2013 IMO Shortlist. a b c d 1

GLOSSARY TERM DEFINITIONS

Ma/CS 6a Class 19: Isomorphisms and Subgroups

Transcription:

Ma/CS 6a Class 24: More Generating Functions Road signs from http://www.math.ucla.edu/~pak/ By Adam Sheffer Reminder: Generating Functions Given an infinite sequence of numbers a 0, a 1, a 2, the generating function of the sequence is the power series a 0 + a 1 x + a 2 x 2 + Example. Recall the Fibonacci numbers: F 0 = F 1 = 1 F i = F i 1 + F i 2. The corresponding generating function is 1 + x + 2x 2 + 3x 3 + 5x 4 + 1

Reminder: Using Generating Functions By rephrasing the solution to a problem as a generating function, we obtain a recursion relation such as A x = x + 5xA x 6x 2 A x. Solving the problem is equivalent to finding the power series representation of A x. Homogeneous Linear Recursion The generating function of the Fibonacci numbers A x = a 0 + a 1 x + a 2 x + satisfies a 0 = a 1 = 1. a i = a i 1 + a i 2 (for i 2). This is a special case of the homogeneous linear recursion (or HLR) defined as a 0 = c 0, a 1 = c 1,, a k 1 = c k 1. a n+k + d 1 a n+k 1 + + d k a n = 0. 2

HLR Property Theorem. Given a generating function A x with an HLR recursion a n+k + d 1 a n+k 1 + + d k a n = 0, we have A x = R x 1 + d 1 x + + d k x k, where R x is a polynomial and deg R x < k. Example: Fibonacci Numbers The generating function of the Fibonacci numbers A x = a 0 + a 1 x + a 2 x + satisfies a 0 = a 1 = 1. a i a i 1 a i 2 = 0 (for i 2). A x = 1 + x + x 2 a 0 + a 1 + x 3 a 1 + a 2 + = 1 + x 2 a 0 + a 1 x + a 2 x 2 + + x a 0 + a 1 x + a 2 x 2 + = 1 + xa x + x 2 A x. 3

Fibonacci Numbers (cont.) We have A x = 1 + xa x + x 2 A x. That is, 1 A x = 1 x x 2. Proof of HLR Property We rewrite R x A x = 1 + d 1 x + + d k x k as R x = 1 + d 1 x + + d k x k A x = 1 + d 1 x + + d k x k ሺa 0 + a 1 x + a 2 x 2 4

The Auxiliary Equation The auxiliary equation of the HLR a 0 = c 0, a 1 = c 1,, a k 1 = c k 1. a n+k + d 1 a n+k 1 + + d k a n = 0 is t k + d 1 t k 1 + + d k = 0. If the auxiliary equation has k roots (not necessarily distinct), then we can rewrite it as t α 1 m 1 t α 2 m 2 t α s m s = 0, where m 1 + + m s = k. Stronger HLR Property Theorem. Consider the sequence a 0, a 1,, that is defined by an HLR with auxiliary equation t α 1 m 1 t α 2 m 2 t α s m s = 0. Then a n = P 1 n α 1 n + P 2 n α 2 n + + P s n α s n, where P i n is a polynomial of degree at most m i 1. 5

Using the Stronger HLR Property Problem. Solve the following HLR. u 0 = 0, u 1 = 9, u 2 = 1, u 3 = 21. u n+4 5u n+3 + 6u n+2 + 4u n+1 8u n = 0. Solution. The auxiliary equation is t 4 5t 3 + 6t 2 + 4t 8 = 0. This can be rewritten as t 2 3 t + 1 = 0. By the theorem, we have u n = P 1 n α 1 n + P 2 n α 2 n = P 1 n 2 n + P 2 n 1 n. Solution (cont.) From the auxiliary equation t 2 3 t + 1 = 0, we know that u n = An 2 + Bn + C 2 n + D 1 n. From the initial values u 0 = 0, u 1 = 9, u 2 = 1, u 3 = 21, we get the system of equations C + D = 0, 2A + 2B + 2C D = 9, 16A + 8B + 4C + D = 1, 72A + 24B + 8C D = 21. 6

Concluding the Solution We have u n = An 2 + Bn + C 2 n + D 1 n. From the initial conditions, we obtain C + D = 0, 2A + 2B + 2C D = 9, 16A + 8B + 4C + D = 1, 72A + 24B + 8C D = 21. Solving these equations yield A = 1, B = 1, C = 3, D = 3. Therefore u n = n 2 n 3 2 n + 3 1 n. Pineapples Like Fibonacci Numbers! (the number of strips of each of the three types) 7

The Catalan Numers The Catalan numbers. An extremely useful sequence of numbers. In the exercises of the book Enumerative Combinatorics by Stanley, there are over 150 problems whose solution is the Catalan numbers. Obtained by Euler and Lamé (not Catalan!) Convex Polygons A polygon is convex if no line segment between two of its vertices intersects the outside of the polygon. Equivalently, every interior angle of a convex polygon is smaller than 180. Convex Not Convex 8

Triangulating of a convex Polygon A triangulation of a convex polygon P is the addition of non-crossing diagonals of P, partitioning the interior of P into triangles. Number of Triangulations Let c n denote the number of different triangulations of a convex polygon with n + 2 vertices. We set c 0 = 1. c 1 = 1. c 2 = 2. c 3 = 5. c 4 = 14. 9

A Recursive Relation We have initial values for c n. Now we need a recursive relation. Consider a side ab of an n-sided convex polygon P. In every triangulation, ab belongs to exactly one triangle Δ. The third vertex of Δ can be any of the other n 2 vertices of P. A Recursive Relation (cont.) The number of triangulations that contain the triangle abv 4 is c 2 c 3. The number of triangulations that contain the triangle abv 5 is c 1 c 4. Recursive relation: n 3 c n 2 = c i c n 3 i. i=0 10

Are the Catalans an HLR? We have the initial values c 0 = 1, c 1 = 1, c 2 = 2, c 3 = 5, c 4 = 14. We have the relation n 3 c n 2 = c i c n 3 i. i=0 Is this an HLR? No! This is not linear and number of elements in the recursion changes according to n. Solving the Recurence We have the generating series C x = c 0 + c 1 x + c 2 x 2 + We consider C x 2 = c 0 c 0 + c 0 c 1 + c 1 c 0 x + c 0 c 2 + c 1 c 1 + c 2 c 0 x 2 + Writing C x 2 = σ n d n x n, we get n d n = c i c n i, i=0 we have C x 2 = 1 + c 2 x + c 3 x 2 +. 11

Solving the Recursion (cont.) We have C x 2 = 1 + c 2 x + c 3 x 2 +. That is, C x = 1 + xc x 2. Solving the Recursion (cont.) We have C x = 1 + xc x 2. Setting y = C x, we obtain the quadratic equation xy 2 y + 1 = 0, or C x = y = 1 ± 1 4x. 2x How can we handle 1 4x? 12

More Binomial Formulas Recall that x + 1 n = i 0 n i x i. m m m 1 m n+1 By defining = also for n n! negative m s, this formula is generalized also to negative powers. We can also consider values of m that are not integers! The binomial formula holds for fractional n (we will not prove this). Fractional Powers Using the fractional formula, we have 1 4x 1/2 1/2 = 4x i i = 1 + 1/2 1! This implies C x = 1 ± i=0 ሺ 4x) + 1 4x 2x = 1 2 1 2 16x 2 + 2! 1 ± σ 1/2 i=0 i 2x 4x i. 13

Two Solutions C x = 1 ± 1 4x 1 ± σ 1/2 i=0 4x i = i. 2x 2x Considering the plus and minus cases separately, we have C x = 1 1/2 2 ሺ 4) i x i 1. i i=1 C + x = 1 x + 1 1/2 2 i i=1 4 i x i. The Correct Solution C x = 1 1/2 2 n n=1 4 n x n 1. C + x = 1 x + 1 1/2 2 n n=1 4 n x n. Which one is the correct solution? We saw that x 1 is not well defined! c n = 1 1/2 n+1 4 2 n + 1 = ሺ 4)n+1 2 n + 1! 1 2 1 2 3 2 2n 1 2. 14

Tidying Up c n = ሺ 4)n+1 2 n + 1! 1 2 1 2 3 2 2n 1 2 = 2n n + 1! 3 5 7 2n 1 = 2n n + 1! ሺ2n)! n! 2 n = 1 n + 1 2n n. Happy Thanksgiving! 15