some applications of the method of moments in the
play

Some applications of the method of moments in the analysis of - PowerPoint PPT Presentation

The Method of Moments Example I Example II Example III Counterexample Some applications of the method of moments in the analysis of algorithms Alois Panholzer Institute of Discrete Mathematics and Geometry Vienna University of Technology


  1. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 A D . . . h ( D ) = 3 10 3 B 9 4 C D 8 5 7 6 13 / 64

  2. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 A D . . . h ( D ) = 3 10 3 B 9 4 C 8 5 7 6 D 13 / 64

  3. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C 8 5 7 6 D E 13 / 64

  4. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 F B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C F . . . h ( F ) = 12 8 5 7 6 D E 13 / 64

  5. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 F B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C G F . . . h ( F ) = 12 8 5 G . . . h ( G ) = 9 7 6 D E 13 / 64

  6. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 F B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 G A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C F . . . h ( F ) = 12 8 5 G . . . h ( G ) = 9 7 6 D E 13 / 64

  7. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 F B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 G A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C F . . . h ( F ) = 12 H 8 5 G . . . h ( G ) = 9 7 6 D H . . . h ( H ) = 4 E 13 / 64

  8. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 F B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 G A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C F . . . h ( F ) = 12 8 5 G . . . h ( G ) = 9 7 6 D H . . . h ( H ) = 4 E H 13 / 64

  9. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Example of constructing a hash table: A . . . h ( A ) = 3 F B . . . h ( B ) = 9 1112 1 2 C . . . h ( C ) = 4 G A D . . . h ( D ) = 3 10 3 E . . . h ( E ) = 7 B 9 4 C F . . . h ( F ) = 12 8 5 G . . . h ( G ) = 9 7 6 D H . . . h ( H ) = 4 E H 13 / 64

  10. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Displacement d ( x ) of element x placed at location y : circular distance between h ( x ) and y : � y − h ( x ) , if h ( x ) ≤ y , d ( x ) := m + h ( x ) − y , otherwise ⇒ Costs of inserting x and searching x in table Total displacement of sequence of n hashed values: sum of the individual displacements ⇒ Construction costs of the table 14 / 64

  11. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Problem description Assumption: all m n hash sequences are equally likely D m , n : Random variable counting the total displacement of a table of length m with n keys hashed ◮ Full table: n = m ◮ Almost full table: n = m − 1 ◮ Sparse tables: n = α m , load factor 0 < α < 1 15 / 64

  12. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Results Theorem [Flajolet, Poblete and Viola, 1998]: Result for almost full tables: the scaled random variable � 2 � 3 2 D n , n − 1 converges in distribution to an Airy distributed n random variable: � 2 � 3 ( d ) 2 D n , n − 1 − − → D , n where D is determined by its moments: 2 √ π E ( D r ) = Γ((3 r − 1) / 2) C r , and the constants C r satisfy the following recurrence: r − 1 � r � � 2 C r = (3 r − 4) rC r − 1 + C j C r − j , for r ≥ 1 , C 0 = − 1 . j j =1 16 / 64

  13. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Proof idea Basic decomposition of almost full tables: ◮ Table length n + 1 with n elements inserted ◮ Before last element is inserted: Two empty cells at position k + 1 and n + 1 ◮ Assumption (circular symmetry): free cell remains at n + 1 ⇒ last element to be inserted has any address in [1 . . . k + 1] ⇒ displacement is any value ∈ { 0 , 1 , . . . , k } . n+1 k+1 17 / 64

  14. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Proof idea Decomposition leads to recursive description: F n , k : number of ways of creating an almost full table with n elements and total displacement k Generating function: F n ( q ) := � k ≥ 0 F n , k q k Recurrence: n − 1 � n − 1 � � F k ( q )(1 + q + · · · + q k ) F n − 1 − k ( q ) F n ( q ) = k k =0 Bivariate generating function: F ( z , q ) := � n ≥ 0 F n ( q ) z n n ! Functional equation: ∂ z F ( z , q ) = F ( z , q ) · F ( z , q ) − qF ( qz , q ) ∂ 1 − q 18 / 64

  15. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Proof idea Pumping out all moments: Generating function of r -th factorial moments: � f r ( z ) := ∂ r � ∂ q r F ( z , q ) � � q =1 f r ( z ) satisfy following linear differential equation: r ( z )(1 − T ( z )) − f r ( z ) T ( z )(2 − T ( z )) f ′ = R r ( z ) , z (1 − T ( z )) where the inhomogeneous part R r ( z ) contains the functions f 0 ( z ) , f 1 ( z ) , . . . , f r − 1 ( z ) and T ( z ) is the tree function: T ( z ) = ze T ( z ) 19 / 64

  16. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Proof idea General solution: � z e T ( z ) R r ( u ) e − T ( u ) du f r ( z ) = 1 − T ( z ) 0 Asymptotic behaviour around dominant singularity z = e − 1 : C r zf r ( z ) ∼ (2(1 − ez )) 3 r / 2 − 1 / 2 , where constants C r satisfy the following recurrence: r − 1 � r � � 2 C r = (3 r − 4) rC r − 1 + C j C r − j , for r ≥ 1 , C 0 = − 1 . j j =1 20 / 64

  17. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Proof idea Singularity analysis of generating functions [Flajolet and Odlyzko, 1990]: ⇒ asymptotic equivalent of the r -th factorial and ordinary moments: 2 √ π � 2 � 3 2 E ( D r n , n − 1 ) → Γ((3 r − 1) / 2) C r n 21 / 64

  18. The Method of Moments Example I Example II Example III Counterexample Total displacement in linear probing hashing Airy distribution Airy distribution appears in various contexts: ◮ Number of inversions in trees ◮ Path length in trees ◮ Area under directed lattice paths ◮ Counting problems for polygon models ◮ Number of connected graphs with n vertices and k edges ◮ Additive parameters in context-free grammars “Similar” functional equations are occurring 22 / 64

  19. The Method of Moments Example I Example II Example III Counterexample Example II: Subtree varieties in recursive trees 23 / 64

  20. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Subtree varieties in rooted trees: ◮ Given: family T of rooted trees ◮ Consider: random rooted tree T of size n of family T ◮ Question: how many subtrees of T have size k = k ( n ) ? 24 / 64

  21. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Typical situation for random tree of size n 25 / 64

  22. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Typical situation for random tree of size n many subtrees of fixed size: size 1 (= leaves) 25 / 64

  23. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Typical situation for random tree of size n many subtrees of fixed size: size 2 25 / 64

  24. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Typical situation for random tree of size n many subtrees of fixed size: size 3 25 / 64

  25. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Typical situation for random tree of size n few subtrees of “large” size: size n / 3 25 / 64

  26. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Problem description Typical situation for random tree of size n few subtrees of “large” size: size n / 2 25 / 64

  27. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Recursive trees: important tree family with many applications ◮ models spread of epidemics ◮ model for pyramid schemes ◮ model for the family trees of preserved copies of ancient texts ◮ related to the Bolthausen-Sznitman coalescence model 26 / 64

  28. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Combinatorial description of a recursive tree: ◮ non-plane labelled rooted tree ◮ size- n tree labelled with labels 1 , 2 , . . . , n ◮ labels along path from root to arbitrary node v are increasing sequence Random recursive trees: all ( n − 1)! recursive trees of size n appear with equal probability 1 2 3 5 4 8 7 6 10 9 11 27 / 64

  29. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 28 / 64

  30. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 2 28 / 64

  31. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 2 p=1/2 1 2 3 28 / 64

  32. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 3 28 / 64

  33. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 p=1/3 3 1 2 4 3 28 / 64

  34. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 p=1/3 p=1/3 3 1 1 2 4 2 3 3 4 28 / 64

  35. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 p=1/3 p=1/3 3 p=1/3 1 1 1 2 4 2 2 3 3 4 3 4 28 / 64

  36. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 p=1/3 p=1/3 3 p=1/3 p=1/3 1 1 1 1 2 4 2 2 2 3 3 3 4 3 4 4 28 / 64

  37. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 p=1/3 p=1/3 3 p=1/3 p=1/3 p=1/3 1 1 1 1 1 2 4 2 2 2 3 2 3 4 3 3 4 3 4 4 28 / 64

  38. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Recursive trees Simple growth rule for generating random recursive trees: ◮ Step 1 : start with root labelled by 1 ◮ Step j : node with label j is attached to any previous node with equal probability 1 / ( j − 1) 1 p=1 1 p=1/2 2 p=1/2 1 1 2 2 3 p=1/3 p=1/3 p=1/3 3 p=1/3 p=1/3 p=1/3 1 1 1 1 1 1 2 4 2 2 2 3 2 3 4 2 3 3 3 4 3 4 4 4 28 / 64

  39. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Results X n , k : number of subtrees of size k in random recursive tree of size n Theorem [Feng, Mahmoud and Pan, 2006+]: there are three phases for behaviour of X n , k depending on the growth of k = k ( n ) ◮ subcritical case: k / √ n → 0 ◮ critical case: k / √ n → c > 0 ◮ supercritical case: k / √ n → ∞ 29 / 64

  40. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Results ◮ subcritical case: k / √ n → 0: normalized r. v. asympt. Gaussian distributed n X n , k − ( d ) k ( k +1) − − → N (0 , 1) � (2 k 2 − 1) n k ( k +1) 2 (2 k +1) ◮ critical case: k / √ n → c > 0: X n , k asymp. Poisson-distributed ( d ) → Poisson( 1 − − c 2 ) X n , k ◮ supercritical case: k / √ n → ∞ : X n , k asymp. denenerate ( d ) X n , k − − → X , with P { X = 0 } = 1 30 / 64

  41. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Proof idea Decomposition of recursive trees according root degree: � � { ǫ } ˙ ∪ T ˙ ∪ 1 / 2! · T ∗ T ˙ ∪ 1 / 3! · T ∗ T ∗ T ˙ T = � 1 × ∪ · · · = � 1 × exp( T ) Generating functions: M k ( z , v ) := � � m ≥ 0 P { X n , k = m } z n n ! v m n ≥ 1 Differential equation: ∂ � � + ( v − 1) z k − 1 ∂ z M k ( z , v ) = exp M k ( z , v ) 31 / 64

  42. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Proof idea Explicit solution of generating function:   M k ( z , v ) = ( v − 1) z k 1   + log   z k   ( v − 1) tk � 1 − e dt k 0 Exact solution for factorial moments: � n − kr − 1 � r [ n ≥ kr + 1] = [ ] n ℓ − 1 � � � X r × E n , k k r ℓ ℓ =1 � � r 1 � × � ℓ j 1 , . . . , j ℓ i =1 ( j i k + 1) j 1+ ··· + j ℓ = r jq ≥ 1 , 1 ≤ q ≤ ℓ 32 / 64

  43. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Proof idea Critical case: ⇒ Asymptotically Poisson distribed n / k 2 → λ � � X r → λ r → E n , k Subcritical case: ⇒ Dealing with cancellations X n , k := X n , k − E ( X n , k ) Normalized r.v. ˜ V ( X n , k ) ⇒ Asymptotically Gaussian distributed �� � ˜ X n , k � 2 d → (2 d )! d ! 2 d , for d ≥ 0 , E � ν ( k ) n �� � ˜ � 2 d +1 X n , k → 0 , for d ≥ 0 E � ν ( k ) n 33 / 64

  44. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Remarks Application of method of moments to asympt. Gaussian r.v.: ◮ heavy cancellations ⇒ high computational effort ◮ method usually only “last weapon” 34 / 64

  45. The Method of Moments Example I Example II Example III Counterexample Subtree varieties in recursive trees Remarks Application of method of moments to asympt. Gaussian r.v.: ◮ heavy cancellations ⇒ high computational effort ◮ method usually only “last weapon” One might try first: ◮ analytic methods (saddle point method, continuity theorem of Levy, quasi-power theorem) ◮ central limit theorems for sums of independent or weakly dependent r.v. ◮ Stein’s method ◮ contraction method ◮ martingale description 34 / 64

  46. The Method of Moments Example I Example II Example III Counterexample Example III: Total costs of Union-Find-algorithms 35 / 64

  47. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Union-Find -problem ◮ Maintaining representation of equivalence classes (= partitions of a finite set) ◮ Two basic operations: ◮ Union : merge two different equivalence classes s and t into a single equivalence class ◮ Find : find equivalence class that contains a given element x Problem arises naturally in applications in computer science (e.g., minimum-cost spanning tree algorithms) 36 / 64

  48. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Data structure for Union-Find problem, Aho et al [1974]: ◮ consider partition P ( S ) of finite set S ◮ for every element x ∈ S : store in R [ x ] name of the equivalence class containing x ◮ for every equivalence class s ∈ P ( S ): ◮ store in N [ s ] the number of elements of s ◮ store in L [ s ] the elements of s in a linked list 37 / 64

  49. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Basic algorithm for operation Union , Yao [1976]: “Quick Find Weighted” (QFW): if we merge different equivalence classes s and t then we update the class with less elements: ◮ if N [ s ] ≤ N [ t ]: ◮ otherwise set R [ x ] := t for all x in L [ s ] set R [ x ] := s for all x in L [ t ] append L [ s ] to L [ t ], append L [ t ] to L [ s ] set N [ t ] := N [ t ] + N [ s ] set N [ s ] := N [ s ] + N [ t ] call new equivalence class t call new equivalence class s 38 / 64

  50. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Cost of Union -operation: ◮ Costs when merging equivalence classes s and t : measured by number of updated elements, i.e., the number of allocations R [ x ] := s or R [ x ] := t ◮ QFW: cost of merging step is given by minimum of the class sizes min( N [ s ] , N [ t ]) 39 / 64

  51. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Basic model for sequences of Union -operations, Yao [1976]: Random spanning tree model: ◮ deal with set S of size n ◮ at the beginning all elements x ∈ S are forming equivalence class { x } ◮ n equivalence classes will be merged into larger and larger classes by carrying out Union -operations according following Merging rule 40 / 64

  52. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Merging rule: ◮ choose at random a spanning tree of complete graph with vertex set S ◮ choose a random ordering of the edges of this spanning tree by enumerating it from 1 to n − 1 ◮ leads to sequence of edges e 1 = ( x 1 , y 1 ), e 2 = ( x 2 , y 2 ), . . . , e n − 1 = ( x n − 1 , y n − 1 ), with x i , y i ∈ S ◮ gives then sequence of Union -operations Union ( R [ x 1 ] , R [ y 1 ]), Union ( R [ x 2 ] , R [ y 2 ]), . . . , Union ( R [ x n − 1 ] , R [ y n − 1 ]) ◮ ⇒ all n n − 2 ( n − 1)! possible sequence of Union -operations of that kind are equally likely 41 / 64

  53. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Total cost of algorithm QFW: Average performance of QFW described by total costs: ◮ sum of cost of every merging step when merging the elements of a set S of size n ◮ at beginning all elements are in different equivalence classes ◮ merge all elements into one equivalence class (containing all elements of S ) ◮ carrying out sequence of n − 1 Union -operations according to merging rules under random spanning tree model ◮ ⇒ X n : random variable depending only on size n of set S 42 / 64

  54. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Example of algorithm QFW: a b 2 4 5 f c 1 3 e d Union ( { c } , { e } ) ⇒ Cost = 1 a b f c e d 43 / 64

  55. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Example of algorithm QFW: a b 2 4 5 f c 1 3 e d Union ( { c } , { e } ) ⇒ Cost = 1 a b Union ( { a } , { b } ) ⇒ Cost = 1 f c e d 43 / 64

  56. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Example of algorithm QFW: a b 2 4 5 f c 1 3 e d Union ( { c } , { e } ) ⇒ Cost = 1 a b Union ( { a } , { b } ) ⇒ Cost = 1 Union ( { c } , { d } ) ⇒ Cost = 1 f c e d 43 / 64

  57. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Example of algorithm QFW: a b 2 4 5 f c 1 3 e d Union ( { c } , { e } ) ⇒ Cost = 1 a b Union ( { a } , { b } ) ⇒ Cost = 1 Union ( { c } , { d } ) ⇒ Cost = 1 f c Union ( { b } , { c } ) ⇒ Cost = 2 e d 43 / 64

  58. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Example of algorithm QFW: a b 2 4 5 f c 1 3 e d Union ( { c } , { e } ) ⇒ Cost = 1 a b Union ( { a } , { b } ) ⇒ Cost = 1 Union ( { c } , { d } ) ⇒ Cost = 1 f c Union ( { b } , { c } ) ⇒ Cost = 2 Union ( { b } , { b } ) ⇒ Cost = 1 e d 43 / 64

  59. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Problem description Example of algorithm QFW: a b 2 4 5 f c 1 3 e d Union ( { c } , { e } ) ⇒ Cost = 1 a b Union ( { a } , { b } ) ⇒ Cost = 1 Union ( { c } , { d } ) ⇒ Cost = 1 f c Union ( { b } , { c } ) ⇒ Cost = 2 Union ( { b } , { b } ) ⇒ Cost = 1 e d Total costs = 6 43 / 64

  60. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Results � � Theorem [Kuba and Pan, 2007]: The expectation E X n of the total costs of the Union-Find -algorithm under the random spanning tree model has for n → ∞ the following asymptotic expansion: E ( X n ) = 1 3 4 ) , π n log n + Cn + O ( n where the constant C ≈ 0 . 6315is given as follows: n ( k + 1) k +1 C = γ + 2 log 2 1 � e − ( n +1) � � − 1 � � � + R n +2 − R n +1 − , ( k + 2)! R n − k π n + 1 π n ≥ 0 k =0 with n − 1 k k ( n − k ) n − k − 1 � R n = min( k , n − k ) . k !( n − k )! k =1 44 / 64

  61. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Results Theorem [Kuba and Pan, 2007]: The suitably shifted and scaled r.v. X n converges in distribution to a r.v. X , which can be characterized by its r -th integer moments: X n − 1 π n log n − Cn ( d ) E ( X r ) = m r , − − → X , with n where m r is given recursively as follows: � � Γ( r − 1) r � for r ≥ 2 , m r = 2 √ π Γ( r − 1 m r 2 m r 3 I r 1 , r 2 , r 3 , r 1 , r 2 , r 3 2 ) r 1 + r 2 + r 3 = r , r 2 , r 3 < r with initial values m 0 = 1 and m 1 = 0 and � 1 � 1 � r 1 � � x r 2 − 1 2 (1 − x ) r 3 − 3 2 dx . I r 1 , r 2 , r 3 = x log x +(1 − x ) log(1 − x ) +min( x , 1 − x ) π 0 45 / 64

  62. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea The reverse process: destroying a tree ◮ Start with a random spanning tree of size n ◮ Remove successively edges at random from remaining edges ◮ In every step split a connected component into two parts ◮ Cost of a cut is the size of the smaller part after the splitting step ◮ Stop when all nodes are isolated 46 / 64

  63. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Example of destroying a tree: a b f c e d 47 / 64

  64. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Example of destroying a tree: a b Cost = 1 f c e d 47 / 64

  65. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Example of destroying a tree: a b Cost = 1 Cost = 2 f c e d 47 / 64

  66. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Example of destroying a tree: a b Cost = 1 Cost = 2 Cost = 1 f c e d 47 / 64

  67. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Example of destroying a tree: a b Cost = 1 Cost = 2 Cost = 1 f c Cost = 1 e d 47 / 64

  68. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Example of destroying a tree: a b Cost = 1 Cost = 2 Cost = 1 f c Cost = 1 Cost = 1 Total costs = 6 e d 47 / 64

  69. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Recursive description of total costs X n : Distributional recurrence for rooted trees: ( d ) = X S n + X ∗ n − S n + t n , S n X n S n : size of subtree containing root after removing random edge of randomly chosen labeled rooted tree of size n Toll function: t n , k = min( k , n − k ) S n is distributed as follows: P { S n = k } = kT k T n − k , ( n − 1) T n with T n := n n − 1 n ! 48 / 64

  70. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Recurrence for r -th moments of X n Linear recurrence for µ [ r ] n := E ( X r n ) : n − 1 � ( n − 1) T n µ [ r ] kT k T n − k ( µ [ r ] k + µ [ r ] n − k ) + R [ r ] n = n , k =1 where the inhomogeneous part R [ r ] depends on the lower order n moments µ [1] n , . . . , µ [ r − 1] n 49 / 64

  71. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Proof idea Generating functions treatment Linear differential equation: z (1 − T ( z )) C ′ r ( z ) − (1 + zT ′ ( z )) C r ( z ) = R r ( z ) , where the inhomogeneous part depends on the g.f. C 1 ( z ) , . . . , C r ( z ) for lower moments Solution: � z T ( z ) R r ( t ) C r ( z ) = tT ( t ) dt 1 − T ( z ) 0 Asymptotic equivalents of r -th moments: “pumped out” inductively 50 / 64

  72. The Method of Moments Example I Example II Example III Counterexample Total costs in Union-Find -algorithms Remark Problems of similar “nature”: ◮ Quicksort: number of comparisons ◮ Pathlengths in search tree models ◮ Wiener-index of certain tree models Limiting distribution characterized by “complicated” moment’s sequence 51 / 64

  73. The Method of Moments Example I Example II Example III Counterexample Counterexample 52 / 64

  74. The Method of Moments Example I Example II Example III Counterexample Counterexample Cutting down recursive trees Cutting down procedure for rooted trees: INPUT: tree T steps ← 0 while | T | > 1 do cut off an edge e of T T ← subtree containing the root steps ← steps +1 OUTPUT: steps Remove edges until root is isolated 53 / 64

  75. The Method of Moments Example I Example II Example III Counterexample Counterexample Cutting down recursive trees An example of cutting a tree: Size-11 tree destroyed in 5 steps. 54 / 64

  76. The Method of Moments Example I Example II Example III Counterexample Counterexample Cutting down recursive trees How many steps are done, until root is isolated? Probability model: ◮ Randomized cutting down procedure: Edges in tree chosen at random in each step. ◮ Random tree model for certain tree families. R. v. X n counts steps done to destroy size- n tree. 55 / 64

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend