3 combinatorial parameters and mgfs
play

3. Combinatorial Parameters and MGFs http://ac.cs.princeton.edu - PowerPoint PPT Presentation

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 3. Combinatorial Parameters and MGFs http://ac.cs.princeton.edu Analytic combinatorics overview specification A. SYMBOLIC METHOD 1. OGFs 2. EGFs GF equation 3. MGFs SYMBOLIC


  1. 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 3. Combinatorial Parameters and MGFs http://ac.cs.princeton.edu

  2. ⬅ 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 2

  3. 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 3. Combinatorial parameters and MGFs Analytic •Basics Combinatorics •Moment calculations •OBGF examples Philippe Flajolet and Robert Sedgewick OF •Labelled classes CAMBRIDGE http://ac.cs.princeton.edu II.3a.MGFs.Basics

  4. Natural questions about combinatorial parameters What is the average number of parts in a random What is the average number composition ? of subsets in a random set partition ? What is the average number of parts in a random partition ? What is the average number of cycles in a random permutation ? What is the average root degree of a random tree ? What is the average number of times each letter appears What is the average number in a random M -word ? of leaves in a random tree ? 4

  5. Natural questions about combinatorial parameters Problem: Average-case results are sometime easy to derive but unsatisfying. Example. Separate chaining hashing randomly assigns N keys to M lists. Q. Average length of a list ? A trivial result that is not very useful because it says nothing about the length of a particular list. A. N / M . Ex: All the keys could be on one list. Avg. length = ( N + 0 + 0 + ... + 0)/ M = N / M Section 3.4 Solution: Find distribution (probability parameter value is k for all k ) Practical compromises: Ex: Bound probability that list length deviates significantly from average. • compute average and variance • compute average extremal values Ex: Compute average length of the longest list. Goals for this lecture: Learn enough about parameters to be able to • compute full distribution (in principle) • compute moments and extremal values (in practice) 5

  6. Natural questions about combinatorial parameters How many compositions (sequences of positive integers How many ways to partition that sum to N ) have k parts? a set of N objects into k subsets? How many partitions (sets of positive integers that sum to N ) have k parts? How many permutations of size N have k cycles? How many trees with N nodes have root degree k ? How many letters appear k times in an How many trees with N M -word of length N ? nodes have k leaves ? 6

  7. Basic definitions (combinatorial parameters for unlabelled classes) Def. A combinatorial class is a set of combinatorial objects and an associated size function that may have an associated parameter. size function Def. The ordinary bivariate generating function (OBGF) � | � | � ���� ( � ) � ( � , � ) = � associated with a class is the formal power series parameter value � ∈ � class name object name Fundamental (elementary) identity Terminology. � | � | � ���� ( � ) = The variable z marks size � �� � � � � � ( � ) ≡ � � � The variable u marks the parameter � ∈ � � ≥ � � ≥ � Terminology. Q. How many objects of size N with value k ? BGF: bivariate GF . might add arbitrary � �� = [ � � ][ � � ] � ( � , � ) MGF: multivariate GF A. number of markers With the symbolic method, we specify the class and at the same time characterize the OBGF 7

  8. Combinatorial enumeration: classic example Q. How many binary strings with N bits? 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 1 1 B 1 = 2 1 0 1 0 1 1 0 B 2 = 4 1 1 1 1 0 1 1 1 1 0 0 B 3 = 8 1 1 0 1 1 1 1 0 1 1 1 1 B 4 = 16 A. B N = 2 N 8

  9. Combinatorial parameters: classic example Q. How many N -bit binary strings have k 0 bits? 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 B 10 = 1 1 1 1 0 1 0 1 1 0 B 11 = 1 B 20 = 1 1 1 1 1 0 1 1 B 21 = 2 1 1 0 0 B 30 = 1 1 1 0 1 B 22 = 1 B 31 = 3 1 1 1 0 B 32 = 3 1 1 1 1 B 33 = 1 B 40 = 1 B 41 = 4 B 42 = 6 ( ) N B 43 = 4 A. B Nk = k B 43 = 1 9

  10. (horizontal OGF) OBGF of binomial coefficients � � � � � � � � � � � ≥ � � ≥ � k ( � + � ) � � � � N = 0 1 2 3 4 5 6 7 8 9 ( horizontal OGF) 0 1 � ≥ � � � 1 1 1 ( � − � ) � + � � � � = ( vertical OGF) vertical OGF 2 1 2 1 coefficients � ≥ � 3 1 3 3 1 � � � 4 1 4 6 4 1 � [ � � ][ � � ] = = (OBGF) � � − � ( � + � ) 5 1 5 10 10 5 1 6 1 6 15 20 15 6 1 � � � [ � � ]( � + � ) � = horizontal OGF 7 1 7 21 35 35 21 7 1 � coefficients 8 1 8 28 56 70 56 28 8 1 9 1 9 36 84 126 126 84 36 9 1 � � � � � [ � � ] ( � − � ) � = � 10

  11. The symbolic method for OBGFs (basic constructs) Suppose that A and B are classes of unlabelled objects with OBGFs A ( z,u ) and B ( z,u ) where z marks size and u marks a parameter value. Then operation notation semantics OGF � ( � , � ) + � ( � , � ) A + B disjoint union disjoint copies of objects from A and B ordered pairs of copies of objects, � ( � , � ) � ( � , � ) A × B Cartesian product one from A and one from B � sequence SEQ ( A ) sequences of objects from A � − � ( � , � ) Construction immediately gives OBGF equation, as for enumeration. Extends immediately to mark multiple parameters simultaneously with MGFs. 11

  12. Proofs of correspondences A + B � | � | � ���� ( � ) = � | � | � ���� ( � ) + � | � | � ���� ( � ) = � ( � , � ) + � ( � , � ) � � � � ∈ � + � � ∈ � � ∈ � A × B �� � | � | � ���� ( � ) ��� � | � | � ���� ( � ) � � | � | � ���� ( � ) = � | � | + | � | � ���� ( � )+ ���� ( � ) = � � � � ∈ � × � � ∈ � � ∈ � � ∈ � � ∈ � = � ( � , � ) � ( � , � ) SEQ ( A ) construction OGF � ( � , � ) � ��� � ( � ) ≡ � � ��� � ( � ) ≡ � � � + � � � + � � � + . . . � ( � , � ) � � + � ( � , � ) � � + � ( � , � ) � � + . . . ����� � ≡ � � , � � , � � , . . . ��������������������������� � � + � ( � , � ) + � ( � , � ) � + . . . = ��� ( � ) ≡ � + � + � � + � � + . . . � − � ( � , � ) 12

  13. Combinatorial parameter example: 0 bits in bitstrings Class B , the class of all binary strings Size | b |, the number of bits in b Parameter zeros ( b ), the number of 0 bits in b � | � | � ����� ( � ) = � �� � � � � � ( � , � ) = � � � OBGF � ≥ � � ∈ � � ≥ � variable u “marks” the parameter B = SEQ ( uZ 0 + Z 1 ) Construction � � ( � , � ) = OBGF equation � − � ( � + � ) � � � � � � �� ≡ [ � � ][ � � ] � ( � , � ) = [ � � ]( � + � ) � = [ � � ] ✓ ( � − � ) � + � = Expansion � 13

  14. 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 3. Combinatorial parameters and MGFs Analytic •Basics Combinatorics •Moment calculations •OBGF examples Philippe Flajolet and Robert Sedgewick OF •Labelled classes CAMBRIDGE http://ac.cs.princeton.edu II.3a.MGFs.Basics

  15. 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 3. Combinatorial parameters and MGFs Analytic •Basics Combinatorics •Moment calculations •OBGF examples Philippe Flajolet and Robert Sedgewick OF •Labelled classes CAMBRIDGE http://ac.cs.princeton.edu II.3b.MGFs.Moments

  16. OBGF moment calculations size function � | � | � ���� ( � ) � ( � , � ) = � � �� � � � � � ( � , � ) = � � OBGF parameter value � ∈ � � ≥ � � ≥ � class name object name Enumeration number of objects of size N � �� � � � | � | � � ≡ � � �� � � � � = � � � ( � , � ) = � � ( � , � ) = � � � ≡ [ � � ] � ( � , � ) � ≥ � � ≥ � � ∈ P � ≥ � � ≥ � total cost in objects Cumulated cost of size N ���� ( � ) � | � | � � ≡ [ � � ] � � ( � , � ) � � ( � , � ) = � �� �� � � � � � � = � � � � ( � , � ) = � � � = � �� �� � ∈ P � ≥ � � ≥ � � ≥ � � ≥ � ∂ � ( � , � ) � � ∂ � � � = � � �� µ � = [ � � ] � � ( � , � ) [ � � ] � ( � , � ) = � � � � µ � = � � Mean cost of objects of size N � � � ≥ � � �� � = [ � � ] � �� ( � , � ) σ � ( � − µ � ) � � σ � [ � � ] � ( � , � ) + µ � − µ � � = Variance � � � � ≥ � 16

Recommend


More recommend