a symbolic methods
play

A . Symbolic Methods Philippe Flajolet, INRIA, Rocquencourt - PowerPoint PPT Presentation

Santiago de Chile DEC 2006 SINGULAR COMBINATORICS A . Symbolic Methods Philippe Flajolet, INRIA, Rocquencourt http://algo.inria.fr/flajolet ., 2007 + . Based on Analytic Combinatorics , Flajolet & Sedgewick, C.U.P 1 ANALYTIC COMBINATORICS


  1. Santiago de Chile DEC 2006 SINGULAR COMBINATORICS A . Symbolic Methods Philippe Flajolet, INRIA, Rocquencourt http://algo.inria.fr/flajolet ., 2007 + . Based on Analytic Combinatorics , Flajolet & Sedgewick, C.U.P 1

  2. ANALYTIC COMBINATORICS • Find quantitative properties of large discrete structures = ran- dom combinatorial structures. • Identify the fundamental analytic structures � = probabilistic approaches. Via complex analysis establish relationship Combinatorics ❀ Analysis ❀ Asymptotics • Organization into major schemas where chain can be worked out: “combinatorial processes” // stochastic processes. Example: “bag” process (Set); “row” process” (Seq). 2

  3. Universality: E.g. take a random tree of size n (large): — Height is with high probabiliy (w.h.p.) O ( √ n ) ; — Any designated pattern ̟ occurs on average C ̟ · n , and distribution is asymptotically normal. • Such properties hold for a very wide range of local construc- tion rules (also Galton-Watson trees conditioned on size). • Similar properties hold for “molecule trees”, random map- pings, etc. But labelled trees based on order properties be- long to a different universality class, with e.g., logarithmic height. 3

  4. “ √ n –trees” “log–trees” 4

  5. Analytic combinatorics ❀ A. Counting Generating Function B. Analytic properties of GF Singularities + transfer to coefficients C. Perturbation for distributions . SYMBOLIC METHODS + COMPLEX ASYMPTOTICS + PERTURBA- TION. 5

  6. Duality: Combinatorics versus probability Brownian motion, continuum random tree, etc. 6

  7. PART A. SYMBOLIC METHODS Goal: develop generic tools to determine generating func- tions ≡ GFs. Approach: Formulate a programming language to specify combinatorial structures such that translation into GFs is au- tomatic . Parallels Joyal’s theory of species (BLL’s book). Similar in spirit to Jackson & Goulden’s book. Cf Rota/Stanley. Formalizes recipes known to earlier combi- natorialists. 7

  8. Abstraction: Embed a fragment of elementary set theory into a language of constructions . Map to algebra(s) of special functions. 8

  9. 1 UNLABELLED STRUCTURES AND OGFS Ordinary Generating Function (OGF) ∞ � f n z n . ( f n ) − → f ( z ) := n =0 ( f n ) is number sequence, e.g., counting sequence. ∞ X z n Later: Exponential Generating function (EGF): ( f n ) − → f ( z ) := f n n ! . n =0 9

  10. C = a combinatorial class: at most denumerable set with size function. C n = subclass of objects of size n . C n = # objects of size n = card( C n ) . C n z n = � � z | γ | . C ( z ) = OGF := n ≥ 0 γ ∈C Count up to combinatorial isomorphism: C ∼ = D iff ∃ size-preserving bijection. Atom: Z �→ z ; neutral element: E �→ 1 . 10

  11. How many binary trees B n with n external nodes? B = ✷ + • , ( B × B ) . Euler-Segner (1743): Recurrence n − 1 X B k B n − k . B n = k =1 Form OGF: B ( z ) = z + ( B ( z ) × B ( z )) . Solve equation (quadratic): 2 (1 −√ 1 − 4 z ) = 1 B ( z ) = 1 2 − 1 2 (1 − 4 z ) 1 / 2 . Expand: ! B n = 1 2 n − 2 [Catalan numbers] n n − 1 Analogy: B = ✷ + ( •B × B ) ❀ B ( z ) = z + ( B ( z ) × B ( z )) 11

  12. Outline Define a collection of constructions union, product, sequence, set, cycle, . . . allowing for recursive definitions . meta-THM1: OGFs are automatically computable (equations!) meta-THM2: Counting sequences are automatically computable in time O ( n 2 ) , and even O ( n 1+ ǫ ) . meta-THM3: Random generation is fast in O ( n log n ) arithmetic op’ns. 12

  13. Theorem. There exists a dictionary: Construction OGF C = A + B C ( z ) = A ( z ) + B ( z ) C = A × B C ( z ) = A ( z ) · B ( z ) 1 C = S EQ ( A ) C ( z ) = 1 − A ( z ) C = MS ET ( A ) C ( z ) = Exp( A ( z )) C ( z ) = d C = PS ET ( A ) Exp( A ( z )) 1 C = C YC ( A ) C ( z ) = Log 1 − A ( z ) E or 1 : “neutral class” formed with element of size 0 �→ E ( z ) = 1 . Z : “atomic class” formed with element of size 1 �→ E ( z ) = 1 . 0 1 0 1 @X @X ( − 1) k 1 A ; d k g ( z k ) g ( z k ) A ; Exp( g ( z )) = exp Exp( g ( z )) = exp k k ≥ 1 k ≥ 1 X ϕ ( k ) g ( z k ) with ϕ ( k ) = Euler totient. Log( g ( z )) = k k ≥ 1 13

  14. Proofs. A �→ A ( z ) = � A n z n = � α z | α | . — Union: C = A + B ; P γ = P α + P β . C ( z ) = A ( z ) + B ( z ) — Product: C = A × B ; P γ = P α · P β . C ( z ) = A ( z ) · B ( z ) 1 — Sequence: C = S EQ ( A ) means C = 1 + A +( A×A )+ · · · . C ( z ) = 1 − A ( z ) Q — Multiset: C = MS ET ( A ) means C ∼ α ( 1 + { α } ) , so that = Y Y 1 1 C ( z ) = 1 − z | α | = (1 − z n ) A n , α n ≥ 1 and conclude by C ( z ) = exp(log C ( z )) . . . C ( z ) = Exp( A ( z )) . — Cycle: [omitted] ϕ ( k ) is Euler’s totient function. 14

  15. Example 1. Binary words 1 W = S EQ ( { a, b } ) = ⇒ W ( z ) = 1 − 2 z . Get W n = 2 n (!?). Words starting with b and < 4 consecutive a ’s: 1 W • ∼ W • ( z ) = = S EQ ( b × (1+ a + aa + aaa )) = ⇒ 1 − ( z + z 2 + z 3 + z 4 ) . Longest run statistics lead to rational functions [Feller]. Example 2. Plane trees (“general” = all degrees allowed) 15

  16. Example 3. Nonplane trees (all degrees allowed) U = Z × MS ET ( U ) . U 1 = 1 , U 2 = 1 , U 3 = 2 , U 4 = 5 . � 1 � 1 U ( z ) + 1 2 U ( z 2 ) + 1 3 U ( z 3 ) + · · · U ( z ) = z exp . Cayley: recurrences; P´ olya: asymptotics of this infinite func- tional equation. Exercise: computable in polynomial time ( O ( n 2 ) ). 16

  17. Example 4. Words containing a pattern ( abb ) L j := language accepted from state j . {L 0 = a L 1 + b L 0 , L 1 = a L 1 + b L 2 , L 2 = a L 1 + b L 3 , . . . } Theorem. Regular language (finite automaton) has rational GF . Reg �→ Q ( z ) . Patterns of all sorts in words. Applications in pattern matching algorithms and computational biology. Borges’ Theorem: Large enough text contains any finite set of patterns w.h.p. 17

  18. Example 5. Walks and excursions. 18

  19. Exercise A. Integer compositions. Argue that C n = 2 n − 1 since 1 = 1 − z C = S EQ ( N ) , N = Z × S EQ ( Z ) = ⇒ C ( z ) = 1 − 2 z . z 1 − 1 − z Exercise B. Denumerants. In how many ways can one give change for n cents, given coins of 1 , 2 , 5 , 10 c? 1 D ( z ) = (1 − z )(1 − z 2 )(1 − z 5 )(1 − z 10 ) . Exact form of coefficients? Asymptotics? Exercise C. Unary binary trees. U = z (1 + U + U 2 ) . Exercise D. Binary trees, general plane trees, excursions, and polygonal triangulations are all enumerated by Catalan num- � 2 n 1 � bers C n = . Why? n +1 n 19

  20. Simple families of plane trees. Let Ω ⊆ Z ≥ 0 be the set of allowed (out)degrees. Define � y ω . φ ( y ) := w ∈ Ω Then the simple family Y has OGF: Y ( z ) = zφ ( Y ( z )) . If φ is finite, get an algebraic function. Lagrange Inversion Theorem. [ z n ] Y ( z ) = 1 n coeff[ w n ] φ ( w ) n . If φ is finite, get multinomial sums. 20

  21. 2 LABELLED STRUCTURES AND EGFS EGF = exponential generating function z n � − → f ( z ) = ( f n ) f n n ! . n ≥ 0 A labelled object has atoms that bear distinct integer labels (canonically numbered on [1 . . n ] ). Unlabelled: “anonymous atoms”. Labelled: distinguished atoms or colours. Example. How many (undirected) graphs on n (distinguish- able) vertices? G n = 2 n ( n − 1) / 2 . Graphs: unlabelled problem is harder (P´ olya theory). In general, can get unlabelled by identification of labelled. 21

  22. 0 1 @ 1 2 · · · n A PERMUTATIONS = typical labelled objects: write σ = σ 1 σ 2 · · · σ n as σ 1 σ 2 · · · σ n and view as linear digraph that is labelled: n ! z n 1 � EGF is 1 − z since P ( z ) = n ! . n 22

  23. DISCONNECTED GRAPHS (labelled) = no edges aka “Urns”. EGF is U ( z ) = exp( z ) = e z . CYCLIC GRAPHS (directed) 1 EGF K ( z ) = log 1 − z . 23

  24. ROOTED TREES (graphs) nonplane and labelled T n =?? ≫ Unlabelled: 24

  25. Labelled product. Let A and B be labelled classes. Then the carte- sian product A × B is not well-labelled [why?]. Given ( β, γ ) form all possible relabellings that preserve the order struc- ture within β, γ , while giving rise to well-labelled objects. • Labelled product of two objects. ˛ ˘ ¯ ˛ γ = ( α ′ , β ′ ) ( α ⋆ β ) := γ , where γ is well-labelled and α ′ ≡ order α and β ′ ≡ order β . • Labelled product of two classes. [ C := ( α ⋆ β ) . α ∈A ,β ∈B 25

  26. GFs; Stirling numbers. 26

  27. Sequences, Sets, Cycles • E (or 1 ): neutral class. • Z : atomic class ≡ 1 . • Define S EQ ( A ) , S ET ( A ) , C YC ( A ) by relabellings: S EQ ( A ) = 1 + A + ( A ⋆ A ) + · · · . Sets: quotient up to perms. Cyc: up to cyclic perms. — Perms P ∼ = S EQ ( Z ) — Urn U ∼ = S ET ( Z ) — Circulars graphs K ∼ = C YC ( Z ) m times z }| { — m –functions: F [ m ] ∼ U ⋆ · · · ⋆ U ≡ S EQ m ( U ) = — m –surjections: S EQ ( V ) , V = S ET ≥ 1 ( Z ) — Set partitions: S ET ( S ET ≥ 1 ( Z )) — Lab. trees: T = Z ⋆ S ET ( T ) . 27

  28. Theorem. There exists a dictionary: Construction EGF C = A + B C ( z ) = A ( z ) + B ( z ) C = A ⋆ B C ( z ) = A ( z ) · B ( z ) 1 C = S EQ ( A ) C ( z ) = 1 − A ( z ) C = S ET ( A ) C ( z ) = exp( A ( z )) 1 C = C YC ( A ) C ( z ) = log 1 − A ( z ) E or 1 : “neutral class” formed with element of size 0 �→ E ( z ) = 1 . Z : “atomic class” formed with element of size 1 �→ E ( z ) = 1 . 28

Recommend


More recommend