Go & Šjn, Comintoril Enumertion Notes 4 Symolic enumertion methods for unlelled structures Definition A comintoril clss is finite or denumerle set on which size function is defined, stisfying the following conditions: (i) the size of n element is non-negtive integer; (ii) the numer of elements of ny given size is finite Nottion Let A e comintoril clss the size of n element α A is denoted y α A n denotes the set of elements in A of size n A n = A n is the numer of elements in A of size n (A n ) n 0 is clled the counting sequence of A ɛ denotes n element of size 0, clled neutrl element Z denotes the set of elements of size, clled singletons Definition Let (A n ) n 0 e the counting sequence of comintoril clss A The ordinry generting function (OGF) of A is A(z) = α A z α = n 0 A n z n Exmple Let W := {ɛ, 0,, 00, 0, 0,, 000, 00, } e the set of inry words, where ɛ denotes the empty word For inry word w W, let its size w e the length of w (the numer of symols in w) Then W n is the set of ll inry words of length n nd W n = 2 n The OGF of W is W (z) = n 0 2 n z n = 2z More generlly, if W is the clss of words over r letters, then W n = r n nd the OGF of W is W (z) = rz Exmple Let P e the set of monic polynomils over F q Let the size of polynomil e its degree Then P n is the set of monic polynomils of degree n over F q Exmple Let B e the set of prenthesis systems Let the size of prenthesis system to e the numer of left (nd hence lso right) prentheses Then B n is the set of prenthesis systems with n left prentheses nd n right prentheses It will e shown lter tht the B is enumerted y Ctln numers, tht is, B n = 2n nd B(z) = B n z n = 4z n + n 2z n 0
Go & Šjn, Comintoril Enumertion Notes 4 2 A comintoril clss my e otined from simpler comintoril clss using one of the few sic constructions If this is the cse, then the generting functions of the two clsses re relted in simple wy Bsic constructions of comintoril clsses: Disjoint union Let A = B + C e the disjoint union of comintoril clsses B nd C Then we hve A n = B n + C n nd A(z) = B(z) + C(z) Crtesin product Let A = B C = {(β, γ) : β B, γ C} e the crtesin product of B nd C Define (β, γ) = β + γ Then A(z) = (β,γ) A nd A n = n =0 B C n z (β,γ) = β B,γ C z β + γ = β B z β γ C z γ = B(z)C(z) We note tht disjoint union nd crtesin product extend nturlly to more thn two clsses Sequence nd cycle construction Let B e comintoril clss with no neutrl element, nd B(z) its OGF Sequence construction The sequence clss SEQ(B) is defined s the infinite disjoint union of crtesin products Hence the OGF of SEQ(B) is SEQ(B) = {ɛ} + B + B B + B B B + + B(z) + B(z) 2 + = B(z) Cycle construction The cycle clss CY C(B) is defined s the set of cyclic sequences (β 0, β,, β ), with β j B for ll j Z, for ll Two cyclic sequences (β 0, β,, β ) nd (β 0, β,, β ) re considered the sme if there is d Z such tht β j = β j+d for ll j Z (with suscripts evluted in Z ) In other words, CY C(B) is the set of equivlence clsses on the crtesin product B, with the equivlence reltion eing cyclic shifting For exmple, (,, ), (,, ), nd (,, ) re the sme cyclic sequence of length 3 Theorem If B(z) is the OGF of comintoril clss B without neutrl element, then the OGF of CY C(B) is ϕ() ln B(z )
Go & Šjn, Comintoril Enumertion Notes 4 3 Here, ϕ is the Euler totient function The proof uses ivrite generting functions; we my see it lter Exmple Let B = {, } e clss of two singletons Then CY C(B) is the clss of cyclic rrngements of s nd s Eg -cycles: (), () 2-cycles: (, ), (, ), (, ) 3-cycles nd 4-cycles: We hve B(z) = 2z, nd the OGF of CY C(B) is ϕ() ln B(z ) = ln 2z + 2 ln 2z + 2 2 3 ln 2z + 2 3 4 ln 2z + 4 = 2z + 3z 2 + 4z 3 + 6z 4 + Integer compositions A composition is sequence of positive integers Define the size of composition (c, c 2,, c ) to e the sum c + c 2 + + c Let B e the clss of ll positive integers, nd A e the clss of ll compositions Then A = SEQ(B), B(z) = n zn = z, nd z A(z) = Hence there re 2 n compositions of n B(z) = z 2z = + 2 n z n n Cyclic compositions: A = CY C(B), where B is the clss of positive integers Eg cyclic compositions of 4: (4), (3, ), (2, 2), (2,, ), (,,, ) Then OGF of the clss of cyclic compositions is ϕ() ) ( ln z = z + 2z 2 + 3z 3 + 5z 4 + z
Go & Šjn, Comintoril Enumertion Notes 4 4 Words Let A e the clss of words over [m] The size of word is its length We note tht the OGF of B = [m] is B(z) = mz, nd A = SEQ(B) Hence A(z) = B(z) = mz We use A = B to men tht there is size-preserving ijection etween comintoril clsses A nd B It is cler tht A = B implies A(z) = B(z) Prenthesis systems nd Dyc pths Ech left prenthesis corresponds to step, nd ech right prenthesis corresponds to step This gives ijection etween the clss of prenthesis systems nd the clss of Dyc pths ()() O 0 Dyc pth: lwys on or ove the x-xis, ending t the x-xis Let D denote the clss of Dyc pths, where the size of Dyc pth is the numer of up steps We note D = {ɛ} + { } D D Hence D(z) = + z(d(z)) 2 nd consequently (ting the negtive squre root) D(z) = 4z 2z = n 0 2n z n n + n Thus D n = 2n n + n Asymptotic expression: Using Stirling s formul n! 2πn(n/e) n s n, we otin D n 2π(2n)(2n/e) 2n n 3/2 4 n s n n + 2πn(n/e) 2n π Tringultions Let T n e the clss of tringultions of n (n + 2)-gon with vertices lelled 0,,, n + in nticlocwise order We tret the single edge s the neutrl tringultion in T The root of tringultion of size t lest is the unique tringle contining vertices 0 nd
Go & Šjn, Comintoril Enumertion Notes 4 5 We note tht ech tringultion in T {ɛ} decomposes into n ordered pir of tringultions Tht is, T = {ɛ} + { } T T Hence T (z) = + z(t (z)) 2 nd T (z) = 4z 2z 0 5 2 4 3 Set nd multiset construction Assume B is comintoril clss without neutrl element, nd with OGF B(z) = n B nz n Set construction A set (lso clled powerset) is n unordered list of ojects without repetitions Let SET (B) (lso denoted y P SET (B)) e clss consisting of sets of structures from B We note SET (B) = Π β B ({ɛ} + {β}) Hence the OGF of SET (B) is ( + z n ) Bn β B ( + z β ) = n Multiset construction A multiset is n unordered list of ojects, llowing repetitions Let MSET (B) e clss consisting of multisets of structures from B We note MSET (B) = Π β B SEQ({β}) Hence the OGF of MSET (B) is β B z β = n ( z n ) Bn OGF of MSET (B) lterntive form Using ln( z) = the OGF of MSET (B) s ( z n ) Bn = exp ln( z n ) Bn n n z n = exp B n n B(z ) = exp z, we cn rewrite
Go & Šjn, Comintoril Enumertion Notes 4 6 OGF of SET (B) lterntive form Similrly, the OGF of SET (B) is ( + z n ) Bn = exp ln( + z n ) Bn n n ( = exp n ) n ( B ) ( ) zn = exp ( ) B(z ) Polynomils over finite field Let P denote the clss of monic polynomils over the finite field F q (with q elements), nd I e the clss of monic irreducile polynomils over F q Let the size of polynomil e the degree Since ech monic polynomil is fctored uniquely into multiset of monic irreducile polynomils, we hve P = MSET (I) Hence I(z ) exp = P (z) = I(z ) nd = ln qz qz Compring the coefficients of z n on oth sides, we otin d,d n d n I d = n qn nd It follows from the Möius inversion formul tht ni n = µ()q n We lso note Exmple fctors I n = n, n I(z) = n =, n n µ() µ()q n µ() n q n z n m d,d n di d = q n m qm z m = µ() ln qz I n = n qn + O n q n 2 Let D denote the set of monic polynomils over F q tht hve no repeted Then D = SET (I), nd hence D(z) = exp ( ( ) I(z ) )
Go & Šjn, Comintoril Enumertion Notes 4 7 Integer prtitions An integer prtition is multiset of positive integers Tht is, the order of the prts is not importnt The size of n integer prtition is the sum of its elements (with mutiplicity) Let B e the clss of ll positive integers, nd P the clss of integer prtitions Then P = MSET (B), nd the OGF of P is P (z) = n ( z n ) z = exp z Lgrnge inversion formul Let φ(u) = n 0 φ nu n e forml power series in the vrile u, nd u = u(z) forml power series in the vrile z such tht u(z) = zφ(u(z)) Then [z n ]u(z) = n [un ]φ(u) n Furthermore, if F (u) is ny forml power series in the vrile u, then [z n ]F (u(z)) = ) n [un ] (F (u)φ(u) n Exmple Recll tht the OGF of Dyc pths stisfies D(z) = + zd(z) 2 To pply the Lgrnge inversion formul, we let u = D(z) Then u = z( + u) 2 Thus we hve, for n, D n = [z n ]u(z) = n [un ]( + u) 2n = 2n = 2n n n n + n