MATH 895-4 Fall 2010 Course Schedule L ECTURE 2 f ac ulty of sc ience depar tment of mathem atics Generating functions Generating functions Week Date Sections from FS2009 Part/ References Contents 1 Sept 7 I.1, I.2, I.3 1 Combinatorial Structures FS: Part A.1, A.2 Enumeration Comtet74 3 21 II.1, II.2, II.3 Handout #1 . 1.1 Generating functions (self study) 4 28 II.4, II.5, II.6 2 14 Topic/Sections Notes/Speaker Symbolic methods I.4, I.5, I.6 Unlabelled structures Labelled structures II 2 Manipulating formal power series Combinatorial Combinatorial 5 5 III.1, III.2 2.1Oct Definitions . parameters . . . . . . . . . .Parameters . . . . . . . . FS A.III and . . . . . . .Multivariable . . . . .GFs. . . 6 2.212 Sum IV.1, IV.2 Product (self-study) 2.3 Multiplicative inverse A(x)−1 . . . . . . . . 7 19 IV.3, IV.4 Complex Analysis 2.4 Composition Analytic . . . Methods . . . . . . . . . . . . . . . FS: Part B: IV, V, VI 8 Appendix 2.526 Differentiation . . .B4. . . . . .Singularity . . . .Analysis . . . . IV.5 V.1 Stanley 99: Ch. 6 9 2.6NovTwo 2 special series: exp, log . .Asymptotic . . . . methods . . . . Handout #1 9 VI.1 12 A.3/ C 1 1 . . . .Labelled . . . structures . . . .I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Asst . .#1. Due . . . . . . . . . . . . . . . . . . . . . . . . . . . Asst . .#2. Due . . (self-study) 3 10The basic toolbox for coefficient extraction Introduction to Prob. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 3 3 4 4 . . . . . . Sophie 4 Mariolys 18 IX.1 Limit Laws andgenerating Comb Marni 4 A sampling of counting sequences and functions 11 4.120 Advanced Ideas . .Structures . . . . . .Discrete . . . Limit . . Laws . . . . Sophie . . . . . . . . . . . . . . . . . . . . . . . . . . Random IX.2 1 12 23 IX.3 and Limit Laws FS: Part C (rotating presentations) Enumeration 25 IX.4 Combinatorial instances of discrete Mariolys Continuous Limit Laws Marni 6 6 Quasi-Powers question about aandcombinatorial Sophie Gaussian limit laws Perhaps most fundamental class, is “how many?”. The enumeration 13 30 theIX.5 problem can be extremely useful for solving other problems, and our approach will use generating 14 Dec 10since they are so extremely Presentations powerful. We will Asstonly #3 Duejust scratch the surface of their potential. functions Our initial approach will build up a small toolbox of combinatorial constructions • union • cartesian product • sequence • set and multiset • cycle Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITY Version of: 11-Dec-09 • pointing and substitution which translate to simple (and not so simple) operations on the generating functions. 1.1 Generating functions We now jump head first into generating functions. Wilf ’s book generatingfunctionology is a great first text if you want more details and examples. Definition. The ordinary generating function (OGF) of a sequence (An ) is the formal power series A(z) = ∞ X An z n . n=0 We extend this to say that the ogf of a class A is the generating function of its counting sequence An = cardinality(An ). Equivalently, we can write the OGF as X A(z) = z |α| . α∈A In this context we say that the variable z marks the size of the underlying objects. M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013 MATH 343: A PPLIED D ISCRETE M ATHEMATICS PAGE 1/6 MATH 895-4 Fall 2010 Course Schedule L ECTURE 2 f ac ulty of sc ience depar tment of mathem atics Week Date 1 Sections Part/ References Topic/Sections Generating functions Notes/Speaker from FS2009 Exercise. Prove that these two forms for A(z) are equivalent. Sept 7 I.1, I.2, I.3 2 14 I.4, I.5, I.6 Symbolic methods 3 21 II.1, II.2, II.3 4 28 II.4, II.5, II.6 5 Oct 5 III.1, III.2 Combinatorial For example, consider the class of graphs H given here Structures FS: Part A.1, A.2 Comtet74 Handout #1 (self study) Unlabelled structures Labelled structures I Labelled structures II Combinatorial parameters Combinatorial Parameters Asst #1 Due If we define size to be FS the A.IIInumber of vertices, then the generating function is simply 6 12 7 19 8 26 9 Nov 2 IV.1, IV.2 Multivariable GFs (self-study) 4 4 H(z) = z + z +Complex z 3 + zAnalysis + z 1 + z 4 + z 3 = z + z 2 + 2z 3 + 3z 4 . Analytic Methods IV.3, IV.4 2 FS: Part B: IV, V, VI Singularity Analysis Appendix B4 size to be the number of edges, then the ogf is On the otherIV.5hand, if we define V.1 10 9 VI.1 Stanley 99: Ch. 6 Handout #1 H(z)(self-study) = z4 + z1 3 Asymptotic methods 6 0 Asst #2 Due 3 + z + z + z + z + Sophie z 2 = 1 + z + z 2 + 2z 3 + z 4 + z 6 . 12 A.3/ C Introduction to Prob. Mariolys In both these cases we are treating the generating function as some sort of projection in which we 18 eachIX.1 Limit Laws and Comb Marni replace vertex (edge) by a single atomic “z” and forget all detailed information about the object 11 Random Structures together and then monomials toLaws get the ogf. 20 just IX.2gather the Discrete Limit Sophie Limit Laws Thus our examplesand become FS: Part C Combinatorial 23 IX.3 25 IX.4 13 30 IX.5 14 Dec 10 12 (rotating presentations) instances of discrete Mariolys ∞ X Continuous Limit Laws Marni Binary words: W (z) = 2n z n = Quasi-Powers and Gaussian limit laws Permutations: Presentations n=0 ∞ X Sophie 1 1 − 2z n P (z) =Asst #3 n!z Due n=0 The first of these is a simple geometric sum. The second function does not have any simple expression in terms of standard functions. Indeed it does not converge (as an analytic object) for any z complex z other than 0. However, we can still manipulate it as a purely formal algebraic object. We only care about convergence in that we require that that the coefficient of any finite power of z is finite. This brings us to even more notation: Definition. Let [z n ]f (z) denote the coefficient of z n in the power series expansion of f (z) Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITY ! ∞ Version of: 11-Dec-09 X n n n [z ]f (z) = [z ] fn z = fn n=0 2 2.1 Manipulating formal power series Definitions Let a0 , a1 , a2 , . . . be a sequence of real numbers. We call the (possibly infinite) sum a0 + a1 x + a2 x2 + · · · + ak xk + . . . a formal power series. Here x is a variable, but we do not apriori care if the sum makes sense for any value of x aside from 0. Despite this, we can consider it a function of x and write it as A(x). We say that ak is the coefficient of xn in A(x), and we make use of the shorthand [xk ]A(x) = ak . The sum is said to be formal because we cannot collapse any of the terms. So, if a0 + a1 x + a2 x2 = b0 + b1 x + b2 x2 , then it must be that a0 = b0 , a1 = b1 and a2 = b2 . There is a single power series equal to 1: 1 = 1 + 0x + 0x2 + . . . , and a single one equal to 0: 0 + 0x + 0x2 + . . . . The formal power series turns out to be a very convenient way to store a sequence. We will see that we can store infinite sequences with a very small amount of memory using what we know about functions formal power series which arise as Taylor series expansions around 0. M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013 MATH 343: A PPLIED D ISCRETE M ATHEMATICS PAGE 2/6 MATH 895-4 Fall 2010 Course Schedule L ECTURE 2 f ac ulty of sc ience depar tment of mathem atics Week 2.2 Date Sections Part/ References FS2009 Sumfrom and Product Topic/Sections Generating functions Notes/Speaker 1 Sept 7 I.1, I.2, I.3 Symbolic methods A formal power seriesCombinatorial is a mathematical object which behaves essentially P like nan infinite polynomial. P Structures 2 14 I.4, I.5, I.6 Unlabelled structuresseries. Let A(x) = We can define additionFS:and of power Part multiplication A.1, A.2 n≥0 an x and B(x) = n≥0 a = Comtet74 bn x3 n . Then 21 II.1, II.2, II.3 Labelled structures I X Handout #1 A(x) + B(x) := (an + bn ) xn (self study) 4 28 II.4, II.5, II.6 Labelled structures II 5 Oct 5 III.1, III.2 6 12 IV.1, IV.2 Combinatorial parameters FS A.III (self-study) Combinatorial Parameters n≥0 X X Asst #1 Due A(x) · B(x) := ak bn−k xn . Multivariable GFsn≥0 0≤k≤n 7 Remark, 19 IV.3, Complex Analysis weIV.4have completely the coefficient of xn for each n, and Analytic Methodsspecified FS: Partbe B: IV, V, VI are8 well can computed in finite time given A(x) and B(x). 26 defined. TheyAppendix Singularity Analysis B4 IV.5 V.1 Stanley 99: Ch. 6 9 Nov 2 Asst #2 Due Asymptotic methods Handout #1 −1 (self-study) 9 VI.1 Sophie 2.3 so the sum and product Multiplicative inverse A(x) 10 12 A.3/ C to Prob. A(x) Mariolys The multiplicative inverse of a formalIntroduction power series is the formal power series C(x) = that satisfies 18 IX.1 Limit Laws and Comb Marni 11 A(x) · C(x)Sophie = 1. Random Structures 20 IX.2 Discrete Limit Laws Thus, 12 23 IX.3 25 IX.4 and Limit Laws FS: Part C (rotating presentations) P n≥0 cn x n Combinatorial XX Mariolys instances of discrete ak cn−k xn = 1 + 0x + 0x2 + . . . . n≥0 k≥n Continuous Limit Laws Marni Recall that two formal power seriesQuasi-Powers are equal and if and only all of their coefficients are the same. This 13 30 IX.5 Sophie Gaussian limit laws leads to the system of equations: 14 Dec 10 Presentations Asst #3 Due a0 c0 = 1 (1) a1 c0 + a0 c1 = 0 (2) a2 c0 + a1 c1 + a0 c2 = .. . 0 (3) (4) This is a triangular system, and hence we can compute ck once we know of c0 , . . . , ck−1 . We see from (1) that c0 = 1/a0 , and provided that a0 6= 0, this is well-defined. Dr. Marni MISHNA, Department of Mathematics, SIMON Example: The inverse of A(x) = 1FRASER − x. UNIVERSITY The above Version of: 11-Dec-09 system simplifies to: c0 = 1 −c0 + c1 = 0 −c1 + c2 = .. . 0 −ck + ck+1 = .. . 0 This has the unique solution: cn = 1 for all n. We should recognize this as the geometric series: X −1 (1 − x) = xn = 1 + x + x2 + x3 + . . . . n≥0 2.4 Composition We define composition of formal power series as follows: X A(B(x)) := an · B(x)n . n≥0 M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013 MATH 343: A PPLIED D ISCRETE M ATHEMATICS PAGE 3/6 MATH 895-4 Fall 2010 Course Schedule L ECTURE 2 f ac ulty of sc ience depar tment of mathem atics Week 2.5 Date Sections Part/ References from FS2009 Differentiation Topic/Sections Generating functions Notes/Speaker Sept 7 I.1, I.2, I.3 Symbolic methods Combinatorial We1 can develop a complete theory of derivatives and integrals of formal power series using the power Structures d14 k k−1 2 I.4, I.5, I.6 Unlabelled structures , and generalizing the derivative of a polynomial. Remark, this does not rule dx x = kx FS:essentially Part A.1, A.2 Comtet74 involve and rule, product rule, chain rule) should be proved from 3 21 a limit II.1, II.2, II.3 so the usual properties Labelled (sum structures I Handout #1 the4 definition of formal power series. (self study) 28 II.4, II.5, II.6 Labelled structures II P d n Combinatorial Combinatorial • Definition: A(x) = n≥0 (n + 1)a n+1 x ; 5 Oct 5 III.1, III.2dx Asst #1 Due parameters Parameters d d d FS A.III 6 • Product 12 IV.1,rule: IV.2 Multivariable GFs (A(x)B(x)) = dx A(x) B(x) + A(x) dx B(x) ; dx ;(self-study) 7 8 19 IV.3, IV.4 Complex Analysis d d Analytic Methods (A(x))n = n(A(x))n−1 dx A(x). • Chain rule for powers: FS: Part B:dx IV, V, VI 26 Singularity Analysis Appendix B4 IV.5 V.1 Exercise. Prove the above product and chain rules. Stanley 99: Ch. 6 9 Nov 2 10 2.6 9 Asymptotic methods Handout #1 (self-study) VI.1 Asst #2 Due Sophie TwoA.3/ special series: exp, Introduction log 12 C to Prob. Mariolys P The formal power series n≥0 xn /n! isLimit reminiscent the Taylor series for the exponential, and hence 18 IX.1 Laws and Comb ofMarni 11 we define Random Structures 20 IX.2 Discrete Limit Laws X Sophie and Limit Laws exp(x) := xn /n!. 12 23 FS: Part C (rotating presentations) IX.3 Combinatorial Mariolys instances of discrete n≥0 In fact, all of the usual properties of Laws exp, Marni but again, since it is defined as the sum, these 25 it satisfies IX.4 Continuous Limit properties should be proved from the basic formal Quasi-Powers and power series properties: 13 • 14 30 IX.5 d exp(x) dx Dec 10 Gaussian limit laws = exp(x); Presentations Sophie Asst #3 Due • exp(F (x) + G(x)) = exp(F (x)) · exp(G(x)); • exp(F (x))−1 = exp(−F (x)). Similarly, we can define a series log(1 − x)−1 := X xn . n n≥1 Exercise. Prove the following properties which we can derive from formal power series definitions: Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITY Version 1. of:d11-Dec-09 log(1 − x)−1 = (1 − x)−1 ; dx 2. log(exp(A(x))) = A(x); 3. exp(log(A(x))) = A(x), if a0 =1; 4. log(A(x) + B(x)) = log(A(x)) + log(B(x)), if a0 = b0 = 1. 3 The basic toolbox for coefficient extraction There are several key theorems to aid with coefficient extraction. If A(z) = an . P∞ n=0 an z n , then [z n ]A(z) := Power rule [z n ]A(pz) = pn [z n ]A(z) Reduction rule [z n ]z m A(z) = [z n−m ]A(z) Sum rule [z n ] (A(z) + B(z)) = [z n ]A(z) + [z n ]B(z) M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013 MATH 343: A PPLIED D ISCRETE M ATHEMATICS PAGE 4/6 MATH 895-4 Fall 2010 Course Schedule L ECTURE 2 f ac ulty of sc ience depar tment of mathem atics Week Date Sections from FS2009 Product rule 1 Sept 7 I.1, I.2, I.3 2 14 I.4, I.5, I.6 3 21 II.1, II.2, II.3 Binomial theorem 4 28 II.4, II.5, II.6 5 Oct 5 III.1, III.2 6 12 IV.1, IV.2 Part/ References n Combinatorial[z Structures FS: Part A.1, A.2 Comtet74 Let n and k Handout #1 (self study) Combinatorial parameters FS A.III (self-study) Topic/Sections n X methods ]A(z)Symbolic × B(z) = Generating functions Notes/Speaker [z k ]A(z) × [z n−k ]B(z) k=0 Unlabelled structures Labelled structures I be positive integers. Labelled structures II r r! Combinatorial . [z n ](1 + z)r = Asst #1 =Due (r − n)!n! n Parameters Multivariable GFs Extended binomial theorem Let k be a positive integer, and r be a real number. Then define 7 19 IV.3, IV.4 Complex Analysis Analytic Methods FS: Part B: IV, V, VI r r(r − 1)(r − 2) . . . (r − k + 1) 8 26 Singularity Analysis Appendix B4 . := IV.5 V.1 Stanley 99: Ch. 6 k 9 Nov 2 Asst k! #2 Due 10 11 A 9 Then 12 A.3/ C 18 IX.1 20 Useful 12 VI.1 23 25 Asymptotic methods Handout #1 (self-study) Sophie r [z ](1 + z) = . k Limit Laws and Comb Marni k Prob. Introduction to r Mariolys Random Structures IX.2 Discrete Limit Laws Sophie Binomial Formula and Limit Laws FS: Part C Combinatorial IX.3 −r (−r)(−r − 1) Mariolys . . . (−r − k + 1) (rotating instances of discrete = presentations) k k! IX.4 Continuous Limit Laws Marni r+k−1 k r+k−1 k and Quasi-Powers . = (−1) IX.5 Sophie = (−1) Gaussian limit lawsr − 1 k 13 30 14 Dec 10 Presentations Asst #3 Due Example (Catalan numbers). √ The generating function 1− 2z1−4z is a “famous” generating function. The coefficients are called Catalan numbers, and we will revisit them shortly as a fundamental counting sequence. √ 1 − 4z 1 n 1− [z ] = − (−4)n [z n ](1 + z)1/2 2z 2 1 n 1/2 = − (−4) 2 n n −(−4) 1/2(1/2 − 1)(1/2 − 2) . . . (1/2 − n + 1) Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITY = Version of: 11-Dec-09 2 n! −(−4)n n n−1 1 · 1 · 3 · 5 . . . (2n − 3) = (1/2) (−1) 2 n! n−1 1 · 1 · 3 · 5 . . . (2n − 3) (n − 1)! =2 · n! (n − 1)! | {z } =1 2n−1 (n−1)! z }| { 1 · 1 · 3 · 5 · · · (2n − 3) · (2 · n) · (2 · (n − 1)) · (2 · 1) = n!(n − 1)! (2n − 2)! = (n − 1)!(n − 1)!n 2n − 1 1 = n−1 n We will encounter this generating function more than once in this class. This generating function, as we shall see, is ubiquitous in combinatorics. Exercise. Go to the web page: http://oeis.org/ This is the Online Encyclopedia of Integer sequences. The first few terms of this sequence are 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862. Enter them into the search engine and find some combinatorial interpretations of these numbers. M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013 MATH 343: A PPLIED D ISCRETE M ATHEMATICS PAGE 5/6 f ac ulty of sc ience depar tment of mathem atics Week 4 Date Sections Topic/Sections Generating functions Notes/Speaker from FS2009 A sampling of counting sequences and generating functions 1 Sept 7 I.1, I.2, I.3 2 14 I.4, I.5, I.6 3 21 II.1, II.2, II.3 4 28 II.4, II.5, II.6 5 Oct 5 III.1, III.2 6 12 IV.1, IV.2 4.1 7 Part/ References MATH 895-4 Fall 2010 Course Schedule L ECTURE 2 Symbolic methods Combinatorial A Structures Unlabelled structures FS: PartPermutations A.1, A.2 Comtet74 Labelled structures I HandoutAll #1 simple, labelled graphs (self study) Labelled structures II Binary words Combinatorial Combinatorial Balanced parentheses parameters Parameters An n! n 2( 2 ) 2n 2n 1 Asst #1nDue n+1 FS A.III (self-study) Multivariable GFs Analytic Methods Complex Analysis Random Structures and Limit Laws FS: Part C (rotating presentations) Discrete Limit Laws Sophie Combinatorial instances of discrete Mariolys Continuous Limit Laws Marni Quasi-Powers and Gaussian limit laws Sophie Advanced Ideas 19 IV.3, IV.4 A(z) P n!z n P (n) n 2 2 z 1 1−2z √ 1− 1−4x 2 FS: Part B: IV,The V, VI values for which A(x) is not defined can give us much information Analysis. 8 • Asymptotic 26 Singularity Analysis P n n Appendix B4 1 IV.5 V.1 about the asymptotic growth of the coefficient. Consider A(x) = 1−2x = 2 x . The coefficient Stanley 99: Ch. 6 9 Nov 2 Asst #2 Due Asymptotic methods #1 an grows like 2n .Handout Remark that A(x) is not defined at x = 1/2. In fact, very often we can formalize (self-study) 9 VI.1 Sophie a connection between the smallest singularity of the formal power series ρ (roughly, the smallest 10 12 A.3/ C Introduction Prob.growth Mariolys value for which A(x) is not defined) and tothe of an : an ≈ 1/ρn . Again, complex analysis is fundamental in this remarkable Limit theory. 18 IX.1 Laws and Comb Marni 11 12 20 IX.2 23 IX.3 25 IX.4 13 30 14 Dec 10 IX.5 Presentations Asst #3 Due Dr. Marni MISHNA, Department of Mathematics, SIMON FRASER UNIVERSITY Version of: 11-Dec-09 M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013 MATH 343: A PPLIED D ISCRETE M ATHEMATICS PAGE 6/6