A N A L Y T I C C O M B I N A T O R I C S P A R T T W O 1. Combinatorial structures and OGFs http://ac.cs.princeton.edu
Attention : Much of this lecture is a quick review of material in Analytic Combinatorics, Part I One consequence: it is a bit longer than usual To: Students who took Analytic Combinatorics, Part I Bored because you understand it all? GREAT! Skip to the section on labelled trees and do the exercises. To: Students starting with Analytic Combinatorics, Part II Moving too fast? Want to see details and motivating applications? No problem, watch Lectures 5, 6, and 8 in Part I.
A N A L Y T I C C O M B I N A T O R I C S P A R T T W O 1. Combinatorial structures and OGFs Analytic •Symbolic method Combinatorics •Trees and strings •Powersets and multisets Philippe Flajolet and Robert Sedgewick OF •Compositions and partitions •Substitution CAMBRIDGE http://ac.cs.princeton.edu II.1a.OGFs.Symbolic
Analytic combinatorics overview To analyze properties of a large combinatorial structure: 1. Use the symbolic method • Define a class of combinatorial objects • Define a notion of size (and associated generating function) • Use standard operations to develop a specification of the structure Result: A direct derivation of a GF equation (implicit or explicit) Classic next steps: • Extract coefficients • Use classic asymptotics to estimate coefficients Result: Asymptotic estimates that quantify the desired properties http://aofa.cs.princeton.edu See An Introduction to the Analysis of Algorithms for a gentle introduction 4
Analytic combinatorics overview To analyze properties of a large combinatorial structure: 1. Use the symbolic method • Define a class of combinatorial objects. • Define a notion of size (and associated generating function) • Use standard operations to develop a specification of the structure. Result: A direct derivation of a GF equation (implicit or explicit). 2. Use complex asymptotics to estimate growth of coefficients. • [no need for explicit solution] • [stay tuned for details] Result: Asymptotic estimates that quantify the desired properties http://ac.cs.princeton.edu See Analytic Combinatorics for a rigorous treatment 5
⬅ Analytic combinatorics overview specification A. SYMBOLIC METHOD 1. OGFs 2. EGFs GF equation 3. MGFs SYMBOLIC METHOD B. COMPLEX ASYMPTOTICS asymptotic 4. Rational & Meromorphic estimate 5. Applications of R&M COMPLEX ASYMPTOTICS 6. Singularity Analysis desired 7. Applications of SA result ! 8. Saddle point 6
The symbolic method An approach for directly deriving GF equations. • Define a class of combinatorial objects. • Define a notion of size (and associated generating function) • Define operations suitable for constructive definitions of objects. • Prove correspondences between operations and GFs. Result: A GF equation (implicit or explicit). See An Introduction to the Analysis of Algorithms for a gentle introduction See Analytic Combinatorics for a rigorous treatment This lecture : An overview that assumes some familiarity. Ex: Part I of this course 7
Basic definitions Def. A combinatorial class is a set of combinatorial objects and an associated size function. Def. The ordinary generating function (OGF) associated � | � | with a class is the formal power series � ( � ) = � size function � ∈ � class name object name Fundamental (elementary) identity Usual conventions class name roman A � | � | = � � � � � ( � ) ≡ � � Fantasy : roman Different letter for each class OGF name A ( z ) � ∈ � � ≥ � with arg Reality : object variable lowercase a Only 26 letters! Q. How many objects of size N ? coefficient subscripted A N � � = [ � � ] � ( � ) A. size N or n or n With the symbolic method, we specify the class and at the same time characterize the OGF 8
Unlabeled classes: cast of characters TREES STRINGS Recursive structures Sequences of characters T N = [ Catalan #s ] S N = N M COMPOSITIONS INTEGERS Positive integers sum to N N objects C N = 2 N − 1 I N = 1 LANGUAGES Sets of strings PARTITIONS [REs and CFGs] Unordered compositions [enumeration not elementary] 9
The symbolic method (basic constructs) Suppose that A and B are classes of unlabeled objects with enumerating OGFs A ( z ) and B ( z ). operation notation semantics OGF disjoint � ( � ) + � ( � ) A + B disjoint copies of objects from A and B union ordered pairs of copies of objects, Cartesian � ( � ) � ( � ) A × B product one from A and one from B � sequence SEQ ( A ) sequences of objects from A � − � ( � ) Stay tuned for other constructs 10
Proofs of correspondences A + B � | � | = � | � | + � | � | = � ( � ) + � ( � ) � � � � ∈ � + � � ∈ � � ∈ � A × B � | � | = � | � | + | � | = �� � | � | ��� � | � | � � � � = � ( � ) � ( � ) � ∈ � × � � ∈ � � ∈ � � ∈ � � ∈ � Text SEQ ( A ) construction OGF ��� � ( � ) ≡ � � � ( � ) � ��� � ( � ) ≡ � � � + � � � + � � � + . . . � ( � ) � � + � ( � ) � � + � ( � ) � � + . . . ����� � ≡ � � , � � , � � , . . . ��������������������������� � � + � ( � ) + � ( � ) � + � ( � ) � + . . . = ��� ( � ) ≡ � + � + � � + � � + . . . � − � ( � ) 11
A N A L Y T I C C O M B I N A T O R I C S P A R T T W O 1. Combinatorial structures and OGFs Analytic •Symbolic method Combinatorics •Trees and strings •Powersets and multisets Philippe Flajolet and Robert Sedgewick OF •Compositions and partitions •Substitution CAMBRIDGE http://ac.cs.princeton.edu II.1a.OGFs.Symbolic
A N A L Y T I C C O M B I N A T O R I C S P A R T T W O 1. Combinatorial structures and OGFs Analytic •Symbolic method Combinatorics •Trees and strings •Powersets and multisets Philippe Flajolet and Robert Sedgewick OF •Compositions and partitions •Substitution CAMBRIDGE http://ac.cs.princeton.edu II.1b.OGFs.Trees
Classic example of the symbolic method Q. How many trees with N nodes? G 1 = 1 G 2 = 1 G 3 = 2 G 4 = 5 G 5 =14 14
Analytic combinatorics: How many trees with N nodes? Symbolic method G , the class of all trees Combinatorial class "a tree is a node and G = ● × SEQ ( G ) Construction a sequence of trees" � � ( � ) = � ( � + � ( � ) + � ( � ) � + � ( � ) � + . . . ) = OGF equation � − � ( � ) � ( � ) − � ( � ) � = � √ � ( � ) = � + � − � � Quadratic equation � Classic next steps � � � ( � ) = − � � ( − � � ) � � � Binomial theorem � � � ≥ � � � � � = − � ( − � ) � = � � � � − � � � � � � � � Extract coefficients � = � � � � − � � � − � � detailed calculations ∼ � √ √ � � ln( � � ) − � � + ln � �� − � ( � ln( � ) − � + ln � �� ) Stirling’s approximation � � � � exp omitted � � ∼ � � − � √ Simplify �� � 15
Analytic combinatorics: How many trees with N nodes? Symbolic method G , the class of all trees Combinatorial class "a tree is a node and G = ● × SEQ ( G ) Construction a sequence of trees" � � ( � ) = � ( � + � ( � ) + � ( � ) � + � ( � ) � + . . . ) = OGF equation � − � ( � ) � ( � ) − � ( � ) � = � Complex asymptotics � � � � GF equation directly � � = [ � � ] � ( � ) ∼ Singularity analysis = √ √ implies asymptotics Γ ( � / � ) � �� This lecture : Focus on symbolic method for deriving OGF equations (stay tuned for asymptotics). 16
A standard paradigm for the symbolic method Fundamental constructs • elementary or trivial • confirm intuition Compound constructs • many possibilities • classical combinatorial objects • expose underlying structure • one of many paths to known results Variations • unlimited possibilities • not easily analyzed otherwise 17
Variations on a theme 1: Trees Fundamental construct G , the class of all trees Combinatorial class "a tree is a node and a sequence of trees" G = ● × SEQ ( G ) Construction � � ( � ) = � ( � + � ( � ) + � ( � ) � + � ( � ) � + . . . ) = OGF equation � − � ( � ) � ( � ) − � ( � ) � = � Variation on the theme: restrict each node to 0 or 2 children T , the class of binary trees Combinatorial class "a binary tree is a node and a sequence T = ● × SEQ 0,2 ( T ) Construction of 0 or 2 binary trees" � ( � ) = � ( � + � ( � ) � ) OGF equation 18
Variations on a theme 1: Trees (continued) Variation on the theme: multiple node types T ● , binary trees, enumerated by internal nodes Combinatorial class type class size GF Atoms ☐ external node 0 1 ● 1 z internal node T = ☐ + T × ● × T Construction � • ( � ) = � + �� • ( � ) � OGF equation T ● , binary trees, enumerated by external nodes Combinatorial class � � ( � ) = � + � � ( � ) � OGF equation More variations: unary-binary trees, ternary trees, ... Still more variations: gambler’s ruin sequences, context-free languages, triangulations, ... 19
Recommend
More recommend