Patterns in Trees Thomas Klausner TU Wien Joint work with Michael Drmota INRIA Rocquencourt, December 9, 2002 Supported by the Austrian Science Fund, Project S8302-MAT.
Outline • Present assumptions and basic techniques. • Define patterns. • Find representations as combinatorial objects. • Convert to corresponding generating functions. • Compute asymptotics. 1
1. Basics Labelled universe Counting of combinatorical structures by exponential generating functions z n � p ( z ) = p n n ! First model: All trees of size n have equal probability. 2
Rooted Trees Construction (rooted): . . . r r r r r r r r r r Tree function: � � 1 + p ( z ) + p ( z ) 2 + p ( z ) 3 = ze p ( z ) p ( z ) = z + . . . 2! 3! Explicit number of rooted trees of size n via e.g. Lagrange in- version formula p n = n n − 1 3
Planted Rooted Trees Sometimes helpful: planted rooted trees. Node degree does not change during construction. . . . p p p p p p p p p p Results in same function p ( z ). First order asymptotics √ √ p ( z ) = 1 − 2 1 − ez + O ( z ) 4
Bivariate Generating Functions Mark special properties with a second variable u E.g.: Nodes with particular degree k + 1 ze p − p k k ! + up k k ! = ze p + ( u − 1) p k p = k ! Possible to find limit distribution and compute parameters. In this case [Drmota and Gittenberger 1997]: asymptotically Gaus- 1 σ 2 sian with mean µ k n and variance k n , where m k = ek ! und σ k = − 1+( k − 2) 2 1 e 2 ( k − 1)! 2 + e ( k − 1)! 5
2. Patterns What is a pattern? In our case, connected sub-tree M . Easy example: 6
How to Mark a Pattern? More difficult than with single nodes. Split in parts: t 1 t 3 t 4 t 2 Aim: Describe patterns by generating functions for each part → system of functional equations. 7
Proposition (Planted Rooted Trees) Let M be a pattern. Then there exist L auxiliary functions a j ( x, u ) (1 ≤ j ≤ L ) with L � p ( x, u ) = a j ( x, u ) j =1 and polynomials P j ( y 1 , . . . , y L , u ) (1 ≤ j ≤ L − 1) with non- negative coefficients such that a 1 ( x, u ) = x · P 1 ( a 1 ( x, u ) , . . . , a L ( x, u ) , u ) . . . a L − 1 ( x, u ) = x · P L − 1 ( a 1 ( x, u ) , . . . , a L ( x, u ) , u ) (1) L − 1 a L ( x, u ) = xe a 1 ( x,u )+ ··· + a L ( x,u ) − x � P j ( a 1 ( x, u ) , . . . , a L ( x, u ) , 1) . j =1 8
Notation to Describe Patterns ◦ is a (planted) root node, × the Cartesian product, ∩ the inter- . section, ∪ the union, and ∪ the disjunct union. . × binds stronger than either of ∩ , ∪ , and ∪ . Note: no immediate one-to-one correspondance to the generat- ing functions (relative probabilities, u ). 9
t 2 t 1 t 3 t 4 p p p p p p p p t 2 t 1 p t 1 = {◦} × p × p × p × p, t 2 = {◦} × p × p × p, t 3 = {◦} × t 2 × p, = t 4 {◦} × t 1 × p. 10
3. Convert to Functions • Standardise: no duplicate descriptions of the same structure • Find coefficients • Sprinkle with u 11
Standard Form Each tree a j represented as disjoint union of trees of the kind {◦} × a l 1 × · · · × a l d , (2) ( d = degree of the root of a j ). 12
Standardising the Functions Build intersections (symbolically): = x 1 {◦} × x 1 , 1 × · · · × x 1 ,l x 2 = {◦} × x 2 , 1 × · · · × x 2 ,l � x 1 ∩ x 2 = {◦} × ( x 1 ,m 1 ∩ x 2 ,n 1 ) × · · · × ( x 1 ,m l ∩ x 2 ,n l ) { m 1 ,...,m l } = { 1 ,...,l } { n 1 ,...,n l } = { 1 ,...,l } . x 1 ∪ x 2 = x 1 ∪ x 2 \ ( x 1 ∩ x 2 ) 13
Intersection Example t 1 = {◦} × p × p × p × p, t 2 = {◦} × p × p × p, t 3 = {◦} × t 2 × p, t 4 = {◦} × t 1 × p. Only one non-empty intersection: t 3 ∩ t 4 = {◦} × ( t 1 ∩ t 2 ) × p ∪ {◦} × t 1 × t 2 = = {◦} × t 1 × t 2 . 14
Example in Standardised Form a 1 = t 3 \ ( t 3 ∩ t 4 ) = {◦} × a 5 × ( a 1 ∪ a 2 ∪ a 3 ∪ a 5 ∪ a 6 ) , a 2 = t 4 \ ( t 3 ∩ t 4 ) = {◦} × a 4 × ( a 1 ∪ a 2 ∪ a 3 ∪ a 4 ∪ a 6 ) , = t 3 ∩ t 4 = {◦} × a 4 × a 5 , a 3 6 6 6 6 � � � � = t 1 = {◦} × a 4 a i × a i × a i × a i , i =1 i =1 i =1 i =1 6 6 6 � � � = t 2 = {◦} × a 5 a i × a i × a i , i =1 i =1 i =1 a 6 = p \ ( a 1 ∪ · · · ∪ a 5 ) = 6 � = {◦} ∪ {◦} × a i ∪ {◦} × ( a 1 ∪ a 2 ∪ a 3 ∪ a 6 ) × ( a 1 ∪ a 2 ∪ a 3 ∪ a 6 ) ∪ i =1 ∞ 6 6 6 � � � � ∪ {◦} × a i × a i × · · · × a i . n =5 i =1 i =1 i =1 � �� � n 15
Coefficients A j,l 1 ,...,l L ,k := number of possible configurations of type (2) ( l i sub-trees of type a i , k new occurrences of M ) Coefficients are computed by simple combinatorics ( k is implicitly given by l i ). 16
Resulting Functions A j,l 1 ,...,l L ,k � l 1 ! · · · l L ! y l 1 1 · · · y l L L u k , P j ( y 1 , . . . , y L , u ) = 1 ≤ j ≤ L − 1 l 1 ,...,l L ≥ 0 L − 1 � P L ( y 1 , . . . , y L ) = e y 1 + ··· + y L − P j ( y 1 , . . . , y L , 1) . j =1 a j ( x, u ) = x · P j ( a 1 ( x, u ) , . . . , a L ( x, u ) , u ) . → proposed structure of the system of functional equations (1). 17
How to Find k = k ( l 1 , . . . , l L ) New patterns occur when all necessary sub-trees are attached to a node of proper degree. In example, three cases: 1. Node of degree three with a t 1 and t 2 . 2. Node of degree four with a t 4 attached. Each t 4 produces another pattern. 3. Node of degree five with a t 3 attached. Each t 3 produces another pattern. 18
Coefficients in Example P 1 = y 5 ( y 1 + y 2 + y 3 + y 6 ) + 1 2! y 2 5 , P 2 = y 4 ( y 1 + y 2 + y 3 + y 6 ) + 1 2! y 2 4 , P 3 = uy 4 y 5 , P 4 = ( uy 1 + y 2 + uy 3 + y 4 + y 5 + y 6 ) 4 , 4! P 5 = ( y 1 + uy 2 + uy 3 + y 4 + y 5 + y 6 ) 3 3! 19
Coefficients in Example (cont’d) xa 5 ( a 1 + a 2 + a 3 + a 6 ) + x 1 2! a 2 a 1 ( x, u ) = a 1 = 5 , xa 4 ( a 1 + a 2 + a 3 + a 6 ) + x 1 2! a 2 a 2 ( x, u ) = a 2 = 4 , a 3 ( x, u ) = a 3 = xua 4 a 5 , x ( ua 1 + a 2 + ua 3 + a 4 + a 5 + a 6 ) 4 a 4 ( x, u ) = a 4 = , 4! x ( a 1 + ua 2 + ua 3 + a 4 + a 5 + a 6 ) 3 a 5 ( x, u ) = a 5 = , 3! 6 a i + x ( a 1 + a 2 + a 3 + a 6 ) 2 � a 6 ( x, u ) = a 6 = x + x + 2! i =1 n 6 ∞ 1 � � + x a i . n ! n =5 i =1 20
Strong Connectivity a 6 depends on itself and all others (last term). Each a i depends on a 6 either directly, or through a chain to a leaf (see pattern). 21
Proposition (Rooted Trees) There exists an analytic function G ( x, u, a 1 , . . . , a L ) with non-negative Taylor coefficients such that r ( x, u ) = G ( x, u, a 1 ( x, u ) , . . . , a L ( x, u )) . where the a i were defined earlier. 22
Counting Patterns in Rooted Trees For the example: r 0 := xe p − xp 5 5! − xp 4 4! − xp 3 3! . (“uninteresting” sub-trees) Marks in sub-trees already counted correctly, only have to dis- tribute marks for newly appearing patterns. 23
Newly Appearing Patterns j =1 a e j � 6 � j u e 1 + e 3 r = r ( x, u ) = r 0 + x + � e i ! � e i =5 e i ≥ 0 j =1 a e j j =1 a e j � 6 � 6 � j � j u e 2 + e 3 u e 4 e 5 + x + x � e i ! � e i ! � e i =3 � e i =4 e i ≥ 0 e i ≥ 0 24
a c b
Unrooted Trees t n,m = r n,m /n 25
4. Asymptotics Use Drmota’s Theorem on systems of functional equations. ∗ Paraphrased: Under certain conditions for the system of equa- tions, the coefficients asymptotically follow a Gaussian distribu- tion with mean and variance asymptotically proportional to n . Often the difficult part: Finding the singularity ∗ M. Drmota, Systems of Functional Equations . Random Structures and Algorithms 10, 103-124, 1997. 26
For Our Case Singularity known: 1 e To find: left eigenvector (for the eigenvalue one) of the derivative of the functional matrix with respect to the functions Application of theorem then gives expectation for examples as 384 e − 19 12 e (576 e 3 + 24 e 2 − 25) = 0 . 0026803 . . . 27
Possible Future Extensions • Different kind of trees or tree distributions • Logical terms using ∨ , ∧ , ¬ , ∀ and ∃ describing more general patterns. • Does a 0-1-law hold? 28
Recommend
More recommend