On (Effective) Analytic Combinatorics

Size: px
Start display at page:

Download "On (Effective) Analytic Combinatorics"

Transcription

1 On (Effective) Analytic Combinatorics Bruno Salvy Inria & ENS de Lyon Séminaire Algorithmes Dec. 2017

2 Combinatorics, Randomness and Analysis From simple local rules, a global structure arises. A quest for universality in random discrete structures: probabilistic complexity of structures and algorithms. Quantitative results using complex analysis. 1/20

3 Combinatorics, Randomness and Analysis Typical questions From simple local rules, a global structure arises. A quest for universality in random discrete structures: probabilistic complexity of structures and algorithms. Quantitative results using complex analysis. 1/20

4 Combinatorics, Randomness and Analysis From simple local rules, a global structure arises. A quest for universality in random discrete structures: probabilistic complexity of structures and algorithms. Typical questions For a tree of size n,. probability that a leaf is a child of the root? Quantitative results using complex analysis. 1/20

5 Combinatorics, Randomness and Analysis From simple local rules, a global structure arises. A quest for universality in random discrete structures: probabilistic complexity of structures and algorithms. Quantitative results using complex analysis. Typical questions For a tree of size n,. probability that a leaf is a child of the root?. expected pathlength (sum of distances from nodes to the root)? 1/20

6 Combinatorics, Randomness and Analysis From simple local rules, a global structure arises. A quest for universality in random discrete structures: probabilistic complexity of structures and algorithms. Quantitative results using complex analysis. Typical questions For a tree of size n,. probability that a leaf is a child of the root?. expected pathlength (sum of distances from nodes to the root)?. limiting distribution of it? 1/20

7 Philippe Flajolet, the Father of Analytic Combinatorics Planned complete works span 7 volumes of approx 600 pp. each Combinatorial specification Generating functions counting; random generation; asymptotic analysis. If you can specify, you can analyze. 2/20

8 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. 3/20

9 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. Binary trees: B=1+ZxBxB 3/20

10 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. Binary trees: B=1+ZxBxB Permutations: Perm=SET(CYC(Z)); 3/20

11 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. Binary trees: B=1+ZxBxB Permutations: Perm=SET(CYC(Z)); Trees: T=ZxSET(T); 3/20

12 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. Binary trees: B=1+ZxBxB Permutations: Perm=SET(CYC(Z)); Trees: T=ZxSET(T); Functional graphs: F=SET(CYC(T)); 3/20

13 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. Binary trees: B=1+ZxBxB Permutations: Perm=SET(CYC(Z)); Trees: T=ZxSET(T); Functional graphs: F=SET(CYC(T)); Series-parallel graphs: G=Z+S+P, S=SEQ >0 (Z+P),P=SET >0 (Z+S); 3/20

14 Constructible Structures Language: 1,Z, +,, SEQ, SET, CYC and recursion. Binary trees: B=1+ZxBxB Permutations: Perm=SET(CYC(Z)); Trees: T=ZxSET(T); Functional graphs: F=SET(CYC(T)); Series-parallel graphs: G=Z+S+P, S=SEQ >0 (Z+P),P=SET >0 (Z+S);...hundreds of examples in the purple book. 3/20

15 I. Enumeration and Generating Functions

16 I. Enumeration and Generating Functions 1X F (z) = f n z n n=0

17 Example: Binary Trees B=1+ZxBxB B(z) = 1X n=0 B n z n B 0 = B 1 =1 B 2 =2 B 3 =5 number of binary trees with n nodes (Catalan) 4/20

18 Example: Binary Trees B=1+ZxBxB B(z) = 1X n=0 B n z n B 0 = B 1 =1 B 2 =2 B 3 =5 number of binary trees with n nodes (Catalan) For n 1, B n = nx 1 k=0 B k B n k 1 4/20

19 Example: Binary Trees B=1+ZxBxB B(z) = 1X n=0 B n z n B 0 = B 1 =1 B 2 =2 B 3 =5 number of binary trees with n nodes (Catalan) For n 1, B n = nx 1 B k B n k 1 ) B n z n = nx 1 z(b k z k )(B n k 1 z n k 1 ) k=0 k=0 4/20

20 Example: Binary Trees B=1+ZxBxB B(z) = 1X n=0 B n z n B 0 = B 1 =1 B 2 =2 B 3 =5 number of binary trees with n nodes (Catalan) For n 1, B n = nx 1 B k B n k 1 ) B n z n = nx 1 z(b k z k )(B n k 1 z n k 1 ) k=0 k=0 B(z) =1+zB(z) 2 4/20

21 Example: Binary Trees B=1+ZxBxB B(z) = 1X n=0 B n z n B 0 = B 1 =1 B 2 =2 B 3 =5 number of binary trees with n nodes (Catalan) For n 1, B n = nx 1 B k B n k 1 ) B n z n = nx 1 z(b k z k )(B n k 1 z n k 1 ) k=0 k=0 B(z) =1+zB(z) 2 =1+z +2z 2 +5z 3 + 4/20

22 Example: Binary Trees B=1+ZxBxB B(z) = 1X n=0 B n z n B 0 = B 1 =1 B 2 =2 B 3 =5 number of binary trees with n nodes (Catalan) For n 1, B n = nx 1 B k B n k 1 ) B n z n = nx 1 z(b k z k )(B n k 1 z n k 1 ) k=0 k=0 B(z) =1+zB(z) 2 =1+z +2z 2 +5z 3 + 4/20

23 What do we count? Inv[{1, 2, 3}] = { } ,,, involutions; 3 of them permuted by S 3 2 unlabelled structures. F (z) = F (z) = Exponential generating series (EGF): 1X n=0 f n z n n!, f n = nb. labelled structs of size n. Ordinary generating series (OGF): 1X n=0 f n z n, fn = nb. unlabelled structs of size n. Inv 3 (z) = 2 3 z3 Inv f 3 (z) =2z 3 5/20

24 A Dictionary for Generating Series Language: 1,Z, +,, SEQ, SET, CYC and recursion. describes constructible structures 6/20

25 A Dictionary for Generating Series Language: 1,Z, +,, SEQ, SET, CYC and recursion. describes constructible structures Structure EGF OGF A+B A(z)+B(z) Ã(z)+ B(z) AxB A(z) B(z) Ã(z) B(z) 6/20

26 A Dictionary for Generating Series Language: 1,Z, +,, SEQ, SET, CYC and recursion. describes constructible structures Structure EGF OGF A+B A(z)+B(z) Ã(z)+ B(z) AxB A(z) B(z) Ã(z) B(z) SEQ(A) 1 1 A(z) 1 1 Ã(z) 6/20

27 A Dictionary for Generating Series Language: 1,Z, +,, SEQ, SET, CYC and recursion. describes constructible structures Structure EGF OGF A+B A(z)+B(z) Ã(z)+ B(z) AxB A(z) B(z) Ã(z) B(z) SEQ(A) 1 1 A(z) 1 1 Ã(z) SET(A) exp(a(z)) exp( X Ã(z i )/i) 6/20

28 A Dictionary for Generating Series Language: 1,Z, +,, SEQ, SET, CYC and recursion. describes constructible structures Structure EGF OGF A+B A(z)+B(z) Ã(z)+ B(z) AxB A(z) B(z) Ã(z) B(z) SEQ(A) 1 1 A(z) 1 1 Ã(z) SET(A) exp(a(z)) exp( X Ã(z i )/i) CYC(A) log 1 1 A(z) X (i) i log 1 1 Ã(z i ) 6/20

29 Examples 7/20

30 Examples Binary trees: B=1+ZxBxB! B(z) =1+zB(z) 2 = B(z) 7/20

31 Examples Binary trees: B=1+ZxBxB! B(z) =1+zB(z) 2 = B(z) Cayley trees: T=ZxSET(T)! T (z) =z exp(t (z));! T (z) =z exp T (z)+ 1 T (z 2 )+ 1 T (z 3 ) /20

32 Examples Binary trees: B=1+ZxBxB! B(z) =1+zB(z) 2 = B(z) Cayley trees: T=ZxSET(T)! T (z) =z exp(t (z));! T (z) =z exp T (z)+ 1 T (z 2 )+ 1 T (z 3 )+ 2 3 Series-parallel graphs:! G = Z + S + P, S = Seq >0 (Z + P), P = Set >0 (Z + S) G(z) =z + S(z)+P (z),s(z) = 1 1 z P (z) 1,P(z) =e z+s(z) 1 7/20

33 II. Newton Iteration and Fast Enumeration 1671

34 Numerical Newton Iteration To solve (y) =0, iterate (y) =1+zy 2 y with y [n+1] = y [n] + u [n], (y [n] )+ 0 (y [n] )u [n] =0. z =0.23 8/20

35 Numerical Newton Iteration To solve (y) =0, iterate (y) =1+zy 2 y with y [n+1] = y [n] + u [n], (y [n] )+ 0 (y [n] )u [n] =0. y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] z =0.23 8/20

36 Numerical Newton Iteration To solve (y) =0, iterate (y) =1+zy 2 y with y [n+1] = y [n] + u [n], (y [n] )+ 0 (y [n] )u [n] =0. y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] z =0.23 y [0] =0, Quadratic convergence y [1] = , y [2] ' , y [3] ' , y [4] ' , y [5] ' , y [6] ' /20

37 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] 9/20

38 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + 9/20

39 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + 9/20

40 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 Proving numerical convergence requires control over the tails y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + 9/20

41 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 Proving numerical convergence requires control over the tails y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + On power series: y y [1] = O(z m )=) N (y) y [1] = O(z 2m(+1) ) 9/20

42 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 Proving numerical convergence requires control over the tails y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + On power series: y y [1] = O(z m )=) N (y) y [1] = O(z 2m(+1) ) 9/20

43 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 Proving numerical convergence requires control over the tails y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + On power series: y y [1] = O(z m )=) N (y) y [1] = O(z 2m(+1) ) Expand(N) = { res=expand(n/2); a=ɸ(res); b=ɸ (res); u=solve(a+bx,x); return res+u; } 9/20

44 Newton Iteration for Power Series Same Newton Iteration y [n+1] = N (y [n] )=y [n] + 1+zy[n]2 1 2zy [n] y [n] y [0] =0 y [1] =1 Proving numerical convergence requires control over the tails y [2] =1+z +2z 2 +4z 3 +8z z z z 7 + y [3] =1+z +2z 2 +5z z z z z 7 + On power series: y y [1] = O(z m )=) N (y) y [1] = O(z 2m(+1) ) Expand(N) = { res=expand(n/2); a=ɸ(res); b=ɸ (res); u=solve(a+bx,x); return res+u; } Cost(N) ct Cost(last step) 9/20

45 Fast Enumeration Thm. First N coefficients of GFs of all constructible structures: 1. arithmetic complexity O(N log N) (both ogf & egf); 2. bit complexity O(N 2 log 2 NloglogN) (ogf); O(N 2 log 3 NloglogN) (egf). Ingredients: Newton iteration & FFT. [Pivoteau-S-Soria 2012] 10/20

46 Fast Enumeration Thm. First N coefficients of GFs of all constructible structures: 1. arithmetic complexity O(N log N) (both ogf & egf); 2. bit complexity O(N 2 log 2 NloglogN) (ogf); O(N 2 log 3 NloglogN) (egf). Ingredients: Newton iteration & FFT. [Pivoteau-S-Soria 2012] Demo NewtonGF 10/20

47 Derivative of Combinatorial Structures (origin: species theory) F F 11/20

48 Derivative of Combinatorial Structures (origin: species theory) F F (F+G) =F +G ;(FXG) =F XG+FXG ; 11/20

49 Derivative of Combinatorial Structures (origin: species theory) F F (F+G) =F +G ;(FXG) =F XG+FXG ; F(G) =F (G)XG ; 11/20

50 Derivative of Combinatorial Structures (origin: species theory) F F (F+G) =F +G ;(FXG) =F XG+FXG ; F(G) =F (G)XG ; 0 =1 =0; Z =1; SET =SET; CYC =SEQ; SEQ =SEQXSEQ. 11/20

51 Combinatorial Newton Iteration Y =1+Z Y Y =: H(Z, Y) [Décoste, Labelle, Leroux 1982] 12/20

52 Combinatorial Newton Iteration Y =1+Z Y Y =: H(Z, Y) Y [n+1] = Y [n] + Seq(Z Y [n]? + Z? Y [n] ) ((1 + Z Y [n] Y [n] ) \Y [n] ). [Décoste, Labelle, Leroux 1982] 12/20

53 Combinatorial Newton Iteration Y =1+Z Y Y =: H(Z, Y) Y [n+1] = Y [n] + Seq(Z Y [n]? + Z? Y [n] ) ((1 + Z Y [n] Y [n] ) \Y [n] ). (Z, Y[n] ) [Décoste, Labelle, Leroux 1982] 12/20

54 Combinatorial Newton Iteration Y =1+Z Y Y =: H(Z, Y) Y [n+1] = Y [n] + Seq(Z Y [n]? + Z? Y [n] ) ((1 + Z Y [n] Y [n] ) \Y [n] ). (Z, Y[n] ) [Décoste, Labelle, Leroux 1982] Ccl: numerical convergence of the Newton iteration starting from 0. 12/20

55 III. Random Generation

56 Why Random Generation? Simulation in the discrete world; helps evaluate parameters; compare/refine models; test software. 13/20

57 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X n T n x n x is a parameter of the algorithm 14/20

58 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) 14/20

59 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

60 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

61 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

62 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

63 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

64 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

65 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

66 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

67 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

68 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

69 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

70 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

71 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

72 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

73 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

74 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

75 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

76 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

77 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

78 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

79 Boltzmann Sampling Proba(t)= x t T (x) with T (x) = X t2t x t = X T n x n n x is a parameter of the algorithm Expected size: xt 0 (x) T (x) Generate(h H) = { if H=1 return 1; if H=Z return Z; if H=FxG { Generate(f F); Generate(g G); return (f,g); } if H=F+G { b:=bernoulli(f(x)/h(x)); if b=1 return Generate(f F); else return Generate(g G); if H=Set(F) { Example: binary trees B=1+ZxBxB with 1/B(.23) 1/ Coin: 0,0,1,0,1,1,1,1,0,1, Exp. size 1 2 p 1 4x F(x),H(x) by Newton iteration [Duchon, Flajolet, Louchard, Schaeffer ] 14/20

80 Example: XML-trees Grammar File size #eq. Newton rss 9.5k s. Relax NG 124k s. XSLT 168k s. XHTML Basic 284k s. SVG 6.3M s. OpenDocument 2.8M s. DocBook 11M s. Time for x s.t. E(size)=10,000 [Darrasse2010] 15/20

81 IV. Asymptotic Analysis 1X F (z) = f n z n f n, n!1 n=0

82 IV. Asymptotic Analysis 1X F (z) = f n z n f n, n!1 n=0

83 Singularity Analysis counts the number of objects of size n (a n ) 7! A(z) := X n 0 a n z n captures some structure A 3-Step Method: a n = 1 2 i I A(z) dz zn+1 16/20

84 Singularity Analysis counts the number of objects of size n (a n ) 7! A(z) := X n 0 a n z n captures some structure A 3-Step Method: 1. Locate dominant singularities 2. Compute local behaviour 3. Translate into asymptotics a n = 1 2 i I A(z) dz zn+1 16/20

85 Singularity Analysis counts the number of objects of size n (a n ) 7! A(z) := X n 0 a n z n captures some structure A 3-Step Method: 1. Locate dominant singularities 2. Compute local behaviour 3. Translate into asymptotics a n = 1 2 i I A(z) dz zn+1 A(z) z! c 1 z log m 1 1 z a n c n n 1 n!1 ( ) logm n ( 62 N) 16/20

86 Singularity Analysis counts the number of objects of size n (a n ) 7! A(z) := X n 0 a n z n captures some structure A 3-Step Method: 1. Locate dominant singularities 2. Compute local behaviour 3. Translate into asymptotics a n = 1 2 i I A(z) dz zn+1 A(z) z! c 1 z log m 1 1 z a n full asymptotic expansion available c n n 1 n!1 ( ) logm n ( 62 N) 16/20

87 Example: Binary Trees (Again!) B(z) =1+zB(z) 2 =1+z +2z 2 +5z 3 + = 1 p 1 4z 2z A 3-Step Method: 1. Locate dominant singularities; 2. Compute local behaviour; 3. Translate into asymptotics. 1. sing. en z =1/4 2. local behaviour: B(z) = z!1/4 2 2(1 4z)1/ translation: B n 4n n 3/2 p 1 9 8n + 17/20

88 Example: Binary Trees (Again!) B(z) =1+zB(z) 2 =1+z +2z 2 +5z 3 + = 1 p 1 4z 2z 1. sing. en z =1/4 2. local behaviour: B(z) = z!1/4 2 2(1 4z)1/ translation: B n 4n n 3/2 p 1 9 8n + A 3-Step Method: 1. Locate dominant singularities; 2. Compute local behaviour; 3. Translate into asymptotics. Probability that a leaf is a child of the root? [z n ]2zB(z) B n = n + O n 2 17/20

89 Example: Binary Trees (Again!) B(z) =1+zB(z) 2 =1+z +2z 2 +5z 3 + = 1 p 1 4z 2z 1. sing. en z =1/4 2. local behaviour: B(z) = z!1/4 2 2(1 4z)1/ translation: B n 4n n 3/2 p 1 9 8n + A 3-Step Method: 1. Locate dominant singularities; 2. Compute local behaviour; 3. Translate into asymptotics. Probability that a leaf is a child of the root? [z n ]2zB(z) B n = n + O n 2 Demo. 17/20

90 Parameters 18/20

91 Parameters Equations over combinatorial structures + parameters Ex.: path length in binary trees 18/20

92 Parameters Equations over combinatorial structures + parameters Ex.: path length in binary trees Multivariate generating series F (z,u) = X n,k f n,k u k z n 18/20

93 Parameters Equations over combinatorial structures + parameters Ex.: path length in binary trees Multivariate generating series F (z,u) = X n,k f n,k u k z n B(z,u) = X b2b u pl(b) z b 18/20

94 Parameters Equations over combinatorial structures + parameters Multivariate generating series X F (z,u) = f n,k u k z n n,k Ex.: path length in binary trees B(z,u) = X b2b u pl(b) z b P u=1 18/20

95 Parameters Equations over combinatorial structures + parameters Multivariate generating series X F (z,u) = f n,k u k z n n,k Complex analysis f n,k,n!1 Ex.: path length in binary trees B(z,u) = X b2b u pl(b) z b P u=1 18/20

96 Parameters Equations over combinatorial structures + parameters Multivariate generating series X F (z,u) = f n,k u k z n n,k Complex analysis f n,k,n!1 Ex.: path length in binary trees B(z,u) = X b2b u pl(b) z b P u=1 P n nb n p n 18/20

97 Parameters Equations over combinatorial structures + parameters Multivariate generating series X F (z,u) = f n,k u k z n n,k Complex analysis f n,k,n!1 Ex.: path length in binary trees B(z,u) = X b2b u pl(b) z b P u=1 P n nb n p n Limiting distribution 18/20

98 Parameters Equations over combinatorial structures + parameters Multivariate generating series X F (z,u) = f n,k u k z n n,k Complex analysis f n,k,n!1 Ex.: path length in binary trees B(z,u) = X b2b u pl(b) z b P u=1 P n nb n p n Limiting distribution Demo. 18/20

99 If you can specify it, you can analyze it! Permutations Mappings Words Strings Urns Trees Languages Integers Compositions Partitions + parameters Universality phenomena: Ex.: # trees of various types K n n 3/2 pathlength in n 1/2 19/20

100 Summary & Conclusion 20/20

101 Summary & Conclusion What we have: Combinatorial specification counting; random generation; asymptotic analysis. Automated? (not fully) 20/20

102 Summary & Conclusion What we have: Combinatorial specification Ultimate (dream) goal: counting; random generation; asymptotic analysis. Automated? (not fully) Combinatorial specification + Algorithm Automatic complexity analysis 20/20

103 Summary & Conclusion What we have: Combinatorial specification Ultimate (dream) goal: counting; random generation; asymptotic analysis. Automated? (not fully) Combinatorial specification + Algorithm Automatic complexity analysis Where to learn more: On-line course by R. Sedgewick at 20/20

104 Summary & Conclusion What we have: Combinatorial specification counting; random generation; asymptotic analysis. Automated? (not fully) Ultimate (dream) goal: Combinatorial specification + Algorithm Where to learn more: The End On-line course by R. Sedgewick at Automatic complexity analysis 20/20

De part en retraite de Pierre

De part en retraite de Pierre Introduction Combinatorics Generating Series Oracle Conclusion De part en retraite de Pierre Villetaneuse, fe vrier 2013 1 / 41 De part en retraite de Pierre Introduction Combinatorics Generating Series

More information

Algorithms for Combinatorial Systems: Between Analytic Combinatorics and Species Theory.

Algorithms for Combinatorial Systems: Between Analytic Combinatorics and Species Theory. Algorithms for Combinatorial Systems: Between Analytic Combinatorics and Species Theory. Carine Pivoteau - LIGM - december 2011 joint work with Bruno Salvy and Michèle Soria Algorithms for Combinatorial

More information

Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements.

Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements. Lecture: Hélène Barcelo Analytic Combinatorics ECCO 202, Bogotá Notes by Zvi Rosen. Thanks to Alyssa Palfreyman for supplements.. Tuesday, June 2, 202 Combinatorics is the study of finite structures that

More information

5. Analytic Combinatorics

5. Analytic Combinatorics ANALYTIC COMBINATORICS P A R T O N E 5. Analytic Combinatorics http://aofa.cs.princeton.edu Analytic combinatorics is a calculus for the quantitative study of large combinatorial structures. Features:

More information

DISCRETE AND ALGEBRAIC STRUCTURES

DISCRETE AND ALGEBRAIC STRUCTURES DISCRETE AND ALGEBRAIC STRUCTURES Master Study Mathematics MAT40 Winter Semester 015/16 (Due to organisational reasons register for the course at TU and KFU) Edited by Mihyun Kang TU Graz Contents I Lectures

More information

Boltzmann Sampling and Simulation

Boltzmann Sampling and Simulation Boltzmann Sampling and Simulation Michèle Soria LIP6 UPMC CONFERENCE IN MEMORY OF PHILIPPE FLAJOLET Paris Jussieu, December 15, 2011 1 / 18 Michèle Soria Boltzmann Sampling and Simulation 1/18 Random Sampling

More information

Boltzmann Sampling and Random Generation of Combinatorial Structures

Boltzmann Sampling and Random Generation of Combinatorial Structures Boltzmann Sampling and Random Generation of Combinatorial Structures Philippe Flajolet Based on joint work with Philippe Duchon, Éric Fusy, Guy Louchard, Carine Pivoteau, Gilles Schaeffer GASCOM 06, Dijon,

More information

DISCRETE AND ALGEBRAIC STRUCTURES

DISCRETE AND ALGEBRAIC STRUCTURES DISCRETE AND ALGEBRAIC STRUCTURES Master Study Mathematics MAT.40 Winter Semester 015/016 & 016/17 (Due to organisational reasons register for the course at TU and KFU) Parts I & II Contents I Combinatorics

More information

Unlabelled Structures: Restricted Constructions

Unlabelled Structures: Restricted Constructions Gao & Šana, Combinatorial Enumeration Notes 5 Unlabelled Structures: Restricted Constructions Let SEQ k (B denote the set of sequences of exactly k elements from B, and SEQ k (B denote the set of sequences

More information

Analytic Combinatorics: A Primer

Analytic Combinatorics: A Primer Analytic Combinatorics: A Primer Conrado Martínez Univ. Politècnica de Catalunya, Spain April 2011 What is this course about? Analytic Combinatorics seeks to develop mathematical techniques that help us

More information

Philippe Duchon. LaBRI, INRIA/Université de Bordeaux 351, cours de la Libération Talence cedex, FRANCE

Philippe Duchon. LaBRI, INRIA/Université de Bordeaux 351, cours de la Libération Talence cedex, FRANCE Proceedings of the 2011 Winter Simulation Conference S. Jain, R. R. Creasey, J. Himmelspach, K. P. White, and M. Fu, eds. RANDOM GENERATION OF COMBINATORIAL STRUCTURES: BOLTZMANN SAMPLERS AND BEYOND Philippe

More information

Algorithmic Tools for the Asymptotics of Linear Recurrences

Algorithmic Tools for the Asymptotics of Linear Recurrences Algorithmic Tools for the Asymptotics of Linear Recurrences Bruno Salvy Inria & ENS de Lyon Computer Algebra in Combinatorics, Schrödinger Institute, Vienna, Nov. 2017 Motivation p 0 (n)a n+k + + p k (n)a

More information

3. Generating Functions

3. Generating Functions ANALYTIC COMBINATORICS P A R T O N E 3. Generating Functions http://aofa.cs.princeton.edu ANALYTIC COMBINATORICS P A R T O N E 3. Generating Functions OF OGFs Solving recurrences Catalan numbers EGFs Counting

More information

LECTURE Questions 1

LECTURE Questions 1 Contents 1 Questions 1 2 Reality 1 2.1 Implementing a distribution generator.............................. 1 2.2 Evaluating the generating function from the series expression................ 2 2.3 Finding

More information

Diagonals: Combinatorics, Asymptotics and Computer Algebra

Diagonals: Combinatorics, Asymptotics and Computer Algebra Diagonals: Combinatorics, Asymptotics and Computer Algebra Bruno Salvy Inria & ENS de Lyon Families of Generating Functions (a n ) 7! A(z) := X n 0 a n z n counts the number of objects of size n captures

More information

Pointed versus Singular Boltzmann Samplers

Pointed versus Singular Boltzmann Samplers Pointed versus Singular Boltzmann Samplers Olivier Bodini, Antoine Genitrini and Nicolas Rolin { Olivier Bodini; Nicolas Rolin}@ lipn univ-paris13 fr and Antoine Genitrini@ lip6 fr May 21, 2014 For the

More information

Combinatorial Enumeration. Jason Z. Gao Carleton University, Ottawa, Canada

Combinatorial Enumeration. Jason Z. Gao Carleton University, Ottawa, Canada Combinatorial Enumeration Jason Z. Gao Carleton University, Ottawa, Canada Counting Combinatorial Structures We are interested in counting combinatorial (discrete) structures of a given size. For example,

More information

Algorithmic Tools for the Asymptotics of Diagonals

Algorithmic Tools for the Asymptotics of Diagonals Algorithmic Tools for the Asymptotics of Diagonals Bruno Salvy Inria & ENS de Lyon Lattice walks at the Interface of Algebra, Analysis and Combinatorics September 19, 2017 Asymptotics & Univariate Generating

More information

Symbolic-Numeric Tools for Multivariate Asymptotics

Symbolic-Numeric Tools for Multivariate Asymptotics Symbolic-Numeric Tools for Multivariate Asymptotics Bruno Salvy Joint work with Stephen Melczer to appear in Proc. ISSAC 2016 FastRelax meeting May 25, 2016 Combinatorics, Randomness and Analysis From

More information

Algorithmic Tools for the Asymptotics of Linear Recurrences

Algorithmic Tools for the Asymptotics of Linear Recurrences Algorithmic Tools for the Asymptotics of Linear Recurrences Bruno Salvy Inria & ENS de Lyon aaacuxicbvhlbtraejw1r2beg+aghxhrsgitvjycahkhcc7cskqsibs2vunxez3jpjyznsli+rf4bq7wbfwknz6f8torzenli5wqutvtxvklhcmo+juirl2/cfpwxu3wzt179x8mnx9+cqa2hkbcsgmpm+zacg1tfcjhsllavcbhidt+3+khn8e6yfq+litifvtouqjo0fpz4epelmacmfmvbkzgpnfwes2hw9ekwhw9cujzslxz9ofeb0li7nxz8dxjda8vaossotelowrthlkuxeibjhih/m96gwwtijzhqcixbjtxevdtmnqoksap2qjmhmqmwkxn2cpds0eeymlhrh8a6yr9d6rhyrmlynynyli6da0j/6fnaixep43qvy2geb+oqcvfq7tt0vxy4cixhjbuhbdcecks4+gpgiywnjxyoxtt+yveftkurjby1kzq19wcksgxfx1/m/3sef2o/q5rucybdln2pk1pxjyvctd9lapqmhbugrxfjtf7cdp0g52v0ccyr+d1fuxftt5m4j2f5dvs1wz5qp6r5yqm22shfcc7zeo4+uk+ke/kr/a2yiiyoopbg8h5zcnyqql3bxdu3c8=

More information

COUNTING WITH AB-BA=1

COUNTING WITH AB-BA=1 COUNTING WITH AB-BA=1 PHILIPPE FLAJOLET, ROCQUENCOURT & PAWEL BLASIAK, KRAKÓW COMBINATORIAL MODELS OF ANNIHILATION-CREATION ; IN PREP. (2010) 1 A. = + + B. = 2 Annihilation and Creation A = Annihilate

More information

BT Research at Martlesham, Suffolk

BT Research at Martlesham, Suffolk Connectivity of random graphs Keith Briggs Keith.Briggs@bt.com research.btexact.com/teralab/keithbriggs.html Alan Turing Institute 2004 November 19 1330 typeset 2004 November 17 10:55 in pdflatex on a

More information

Boltzmann sampling of ordered structures

Boltzmann sampling of ordered structures Boltzmann sampling of ordered structures Olivier Roussel, Michèle Soria To cite this version: Olivier Roussel, Michèle Soria. Boltzmann sampling of ordered structures. LAGOS 29-5th Latin-American Algorithms,

More information

ADDITIONAL NOTES. 3 Surjections 6

ADDITIONAL NOTES. 3 Surjections 6 Contents Labelling Atoms. Well-labelling............................................. The Exponential Generating Function egf............................3 Examples................................................

More information

Generating Functions

Generating Functions Semester 1, 2004 Generating functions Another means of organising enumeration. Two examples we have seen already. Example 1. Binomial coefficients. Let X = {1, 2,..., n} c k = # k-element subsets of X

More information

Enumerating connected labelled graphs

Enumerating connected labelled graphs Enumerating connected labelled graphs Keith Briggs Keith.Briggs@bt.com more.btexact.com/people/briggsk2/ 2004 August 17 conn-lab-graphs.tex typeset 2004 August 17 10:40 in pdflatex on a linux system Enumerating

More information

From the Discrete to the Continuous, and Back... Philippe Flajolet INRIA, France

From the Discrete to the Continuous, and Back... Philippe Flajolet INRIA, France From the Discrete to the Continuous, and Back... Philippe Flajolet INRIA, France 1 Discrete structures in... Combinatorial mathematics Computer science: data structures & algorithms Information and communication

More information

An Introduction to Combinatorial Species

An Introduction to Combinatorial Species An Introduction to Combinatorial Species Ira M. Gessel Department of Mathematics Brandeis University Summer School on Algebraic Combinatorics Korea Institute for Advanced Study Seoul, Korea June 14, 2016

More information

Lattice paths with catastrophes

Lattice paths with catastrophes Lattice paths with catastrophes Lattice paths with catastrophes SLC 77, Strobl 12.09.2016 Cyril Banderier and Michael Wallner Laboratoire d Informatique de Paris Nord, Université Paris Nord, France Institute

More information

GENERATING FUNCTIONS AND CENTRAL LIMIT THEOREMS

GENERATING FUNCTIONS AND CENTRAL LIMIT THEOREMS GENERATING FUNCTIONS AND CENTRAL LIMIT THEOREMS Michael Drmota Institute of Discrete Mathematics and Geometry Vienna University of Technology A 1040 Wien, Austria michael.drmota@tuwien.ac.at http://www.dmg.tuwien.ac.at/drmota/

More information

Random Boolean expressions

Random Boolean expressions Random Boolean expressions Danièle Gardy PRiSM, Univ. Versailles-Saint Quentin and CNRS UMR 8144. Daniele.Gardy@prism.uvsq.fr We examine how we can define several probability distributions on the set of

More information

4. Complex Analysis, Rational and Meromorphic Asymptotics

4. Complex Analysis, Rational and Meromorphic Asymptotics ANALYTIC COMBINATORICS P A R T T W O 4. Complex Analysis, Rational and Meromorphic Asymptotics http://ac.cs.princeton.edu ANALYTIC COMBINATORICS P A R T T W O Analytic Combinatorics Philippe Flajolet and

More information

A BIJECTION BETWEEN WELL-LABELLED POSITIVE PATHS AND MATCHINGS

A BIJECTION BETWEEN WELL-LABELLED POSITIVE PATHS AND MATCHINGS Séminaire Lotharingien de Combinatoire 63 (0), Article B63e A BJECTON BETWEEN WELL-LABELLED POSTVE PATHS AND MATCHNGS OLVER BERNARD, BERTRAND DUPLANTER, AND PHLPPE NADEAU Abstract. A well-labelled positive

More information

A new dichotomic algorithm for the uniform random generation of words in regular languages

A new dichotomic algorithm for the uniform random generation of words in regular languages A new dichotomic algorithm for the uniform random generation of words in regular languages Johan Oudinet 1,2, Alain Denise 1,2,3, and Marie-Claude Gaudel 1,2 1 Univ Paris-Sud, Laboratoire LRI, UMR8623,

More information

LECTURE 7. 2 Simple trees and Lagrange Inversion Restricting the out-degree Lagrange Inversion... 4

LECTURE 7. 2 Simple trees and Lagrange Inversion Restricting the out-degree Lagrange Inversion... 4 Contents 1 Recursive specifications 1 1.1 Binary Trees B............................................ 1 1.1.1 A recursive structure.................................... 1.1. Decomposition........................................

More information

Random Boolean expressions

Random Boolean expressions Computational Logic and Applications, CLA 05 DMTCS proc. AF, 2006, 1 36 Random Boolean expressions Danièle Gardy PRiSM, Univ. Versailles-Saint Quentin and CNRS UMR 8144. Daniele.Gardy@prism.uvsq.fr We

More information

Fighting Fish: enumerative properties. Enrica Duchi. Veronica Guerrini & Simone Rinaldi DIISM, Università di Siena.

Fighting Fish: enumerative properties. Enrica Duchi. Veronica Guerrini & Simone Rinaldi DIISM, Università di Siena. Fighting Fish: enumerative properties Enrica Duchi IRIF, Université Paris Diderot Veronica Guerrini & Simone Rinaldi DIISM, Università di Siena Gilles Schaeffer LIX, CNRS and École Polytechnique Séminaire

More information

Philippe Flajolet and Symbolic Computation

Philippe Flajolet and Symbolic Computation Philippe Flajolet and Symbolic Computation Bruno Salvy 1. Combinatorics and Analysis of Algorithms 4 2. Complex Analysis 5 3. Symbolic Computation 7 While Philippe Flajolet did not publish many articles

More information

Growing and Destroying Catalan Stanley Trees

Growing and Destroying Catalan Stanley Trees Discrete Mathematics and Theoretical Computer Science DMTCS vol. 20:1, 2018, #11 Growing and Destroying Catalan Stanley Trees Benjamin Hackl 1 Helmut Prodinger 2 arxiv:1704.03734v3 [math.co] 26 Feb 2018

More information

Notes on combinatorial graph theory

Notes on combinatorial graph theory Notes on combinatorial graph theory Keith Briggs Keith.Briggs@bt.com more.btexact.com/people/briggsk2/cgt.html CRG meeting 2004 Jan 19 Monday 15:00 comb-graph-th.tex typeset 2004 January 27 11:16 in pdflatex

More information

LIMITING DISTRIBUTIONS FOR THE NUMBER OF INVERSIONS IN LABELLED TREE FAMILIES

LIMITING DISTRIBUTIONS FOR THE NUMBER OF INVERSIONS IN LABELLED TREE FAMILIES LIMITING DISTRIBUTIONS FOR THE NUMBER OF INVERSIONS IN LABELLED TREE FAMILIES ALOIS PANHOLZER AND GEORG SEITZ Abstract. We consider so-called simple families of labelled trees, which contain, e.g., ordered,

More information

GAUSSIAN LAWS MICHÈLE SORIA. 8 october 2015 IHP Séminaire Flajolet IN ANALYTIC COMBINATORICS

GAUSSIAN LAWS MICHÈLE SORIA. 8 october 2015 IHP Séminaire Flajolet IN ANALYTIC COMBINATORICS GAUSSIAN LAWS IN ANALYTIC COMBINATORICS MICHÈLE SORIA 8 october 205 IHP Séminaire Flajolet / 43 Michèle Soria Gaussian Laws in Analytic Combinatorics Analytic Combinatorics Estimate properties of large

More information

A LINEAR APPROXIMATE-SIZE RANDOM SAMPLER FOR LABELLED PLANAR GRAPHS

A LINEAR APPROXIMATE-SIZE RANDOM SAMPLER FOR LABELLED PLANAR GRAPHS A LINEAR APPROXIMATE-SIZE RANDOM SAMPLER FOR LABELLED PLANAR GRAPHS ÉRIC FUSY Abstract. This article introduces a new algorithm for the random generation of labelled planar graphs. Its principles rely

More information

50 years of Linear Probing Hashing

50 years of Linear Probing Hashing 50 years of Linear Probing Hashing Alfredo Viola Universidad de la República, Uruguay AofA 2013 Dedicated to Philippe Flajolet The problem. The table has m places to hash (park) from 0 to m 1, and n elements

More information

k-protected VERTICES IN BINARY SEARCH TREES

k-protected VERTICES IN BINARY SEARCH TREES k-protected VERTICES IN BINARY SEARCH TREES MIKLÓS BÓNA Abstract. We show that for every k, the probability that a randomly selected vertex of a random binary search tree on n nodes is at distance k from

More information

Asymptotic Enumeration of Compacted Binary Trees

Asymptotic Enumeration of Compacted Binary Trees Asymptotic Enumeration of Compacted Binary Trees Antoine Genitrini Bernhard Gittenberger Manuel Kauers Michael Wallner March 30, 207 Abstract A compacted tree is a graph created from a binary tree such

More information

The Subtree Size Profile of Bucket Recursive Trees

The Subtree Size Profile of Bucket Recursive Trees Iranian Journal of Mathematical Sciences and Informatics Vol., No. (206, pp - DOI: 0.7508/ijmsi.206.0.00 The Subtree Size Profile of Bucket Recursive Trees Ramin Kazemi Department of Statistics, Imam Khomeini

More information

Asymptotic properties of some minor-closed classes of graphs

Asymptotic properties of some minor-closed classes of graphs FPSAC 2013 Paris, France DMTCS proc AS, 2013, 599 610 Asymptotic properties of some minor-closed classes of graphs Mireille Bousquet-Mélou 1 and Kerstin Weller 2 1 CNRS, LaBRI, UMR 5800, Université de

More information

Boltzmann Samplers for the Random Generation of Combinatorial Structures

Boltzmann Samplers for the Random Generation of Combinatorial Structures Combinatorics, Probability and Computing (2004) 13, 577 625. c 2004 Cambridge University Press DOI: 10.1017/S0963548304006315 Printed in the United Kingdom Boltzmann Samplers for the Random Generation

More information

Combinatorial/probabilistic analysis of a class of search-tree functionals

Combinatorial/probabilistic analysis of a class of search-tree functionals Combinatorial/probabilistic analysis of a class of search-tree functionals Jim Fill jimfill@jhu.edu http://www.mts.jhu.edu/ fill/ Mathematical Sciences The Johns Hopkins University Joint Statistical Meetings;

More information

A Generic Approach for the Unranking of Labeled Combinatorial Classes

A Generic Approach for the Unranking of Labeled Combinatorial Classes A Generic Approach for the Unranking of Labeled Combinatorial Classes Conrado Martínez, Xavier Molinero Departament de Llenguatges i Sistemes Informàtics, Universitat Politècnica de Catalunya, E-08034

More information

Limit Theorems in Probability and Number

Limit Theorems in Probability and Number Limit Theorems in Probability and Number Theory Paderborn, January 14-15, 2011 Limit Theorems in Probability and Number Theory V. V. Buldygin K.-H. Indlekofer O. I. Klesov J. G. Steinebach Limit theorems

More information

A REFINED ENUMERATION OF p-ary LABELED TREES

A REFINED ENUMERATION OF p-ary LABELED TREES Korean J. Math. 21 (2013), No. 4, pp. 495 502 http://dx.doi.org/10.11568/kjm.2013.21.4.495 A REFINED ENUMERATION OF p-ary LABELED TREES Seunghyun Seo and Heesung Shin Abstract. Let T n (p) be the set of

More information

INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET AUTOMATIQUE. The Average Case Analysis of. Multivariate Asymptotics and N 3162.

INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET AUTOMATIQUE. The Average Case Analysis of. Multivariate Asymptotics and N 3162. INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET AUTOMATIQUE The Average Case Analysis of Algorithms: Multivariate Asymptotics and Limit Distributions Philippe FLAJOLET, Robert SEDGEWICK 023456789 N 362

More information

Introduction to Automatic Analysis

Introduction to Automatic Analysis Introduction to Automatic Analysis Paul Zimmermann This chapter contains the following papers from Philippe Flajolet: [FS81] A complexity calculus for classes of recursive search programs over tree structures,

More information

Forty years of tree enumeration

Forty years of tree enumeration October 24, 206 Canada John Moon (Alberta) Counting labelled trees Canadian mathematical monographs What is our subject? Asymptotic enumeration or Probabilistic combinatorics? What is our subject? Asymptotic

More information

Counting Palindromes According to r-runs of Ones Using Generating Functions

Counting Palindromes According to r-runs of Ones Using Generating Functions Counting Palindromes According to r-runs of Ones Using Generating Functions Helmut Prodinger Department of Mathematics Stellenbosch University 7602 Stellenbosch South Africa hproding@sun.ac.za Abstract

More information

Uniform random posets

Uniform random posets Uniform random posets Patryk Kozieª Maªgorzata Sulkowska January 6, 2018 Abstract. We propose a simple algorithm generating labelled posets of given size according to the almost uniform distribution. By

More information

A method for determining the mod-2 k behaviour of (certain) recursive sequences

A method for determining the mod-2 k behaviour of (certain) recursive sequences A method for determining the mod-2 k behaviour of (certain) recursive sequences Universität Linz; Universität Wien; Queen Mary, University of London Let (a n ) n 0 be a sequence of integers, where a n

More information

LEVEL GENERATING TREES AND PROPER RIORDAN ARRAYS

LEVEL GENERATING TREES AND PROPER RIORDAN ARRAYS Applicable Analysis and Discrete Mathematics, (008), 69 9 Available electronically at http://pefmathetfbgacyu LEVEL GENERATING TREES AND PROPER RIORDAN ARRAYS D Baccherini, D Merlini, R Sprugnoli We introduce

More information

BOLTZMANN SAMPLING OF UNLABELLED STRUCTURES

BOLTZMANN SAMPLING OF UNLABELLED STRUCTURES Extended abstract submitted to ICALP 06. BOLTZMANN SAMPLING OF UNLABELLED STRUCTURES PHILIPPE FLAJOLET, ÉRIC FUSY, AND CARINE PIVOTEAU Abstract. Boltzmann models from statistical physics combined with

More information

Extremal Statistics on Non-Crossing Configurations

Extremal Statistics on Non-Crossing Configurations Extremal Statistics on Non-Crossing Configurations Michael Drmota Anna de Mier Marc Noy Abstract We analye extremal statistics in non-crossing configurations on the n vertices of a convex polygon. We prove

More information

Counting Markov Types

Counting Markov Types Counting Markov Types Philippe Jacquet, Charles Knessl, Wojciech Szpankowski To cite this version: Philippe Jacquet, Charles Knessl, Wojciech Szpankowski. Counting Markov Types. Drmota, Michael and Gittenberger,

More information

Expectation Maximization (EM)

Expectation Maximization (EM) Expectation Maximization (EM) The EM algorithm is used to train models involving latent variables using training data in which the latent variables are not observed (unlabeled data). This is to be contrasted

More information

1 Solving Linear Recurrences

1 Solving Linear Recurrences Solving Linear Recurrences Suppose we have a sequence a n defined by the formula The first couple terms of the sequence are a n = 3a n +, a 0 =, 4, 3, 40, 2,... Can you find a general closed for expression

More information

Counting Palindromes According to r-runs of Ones Using Generating Functions

Counting Palindromes According to r-runs of Ones Using Generating Functions 3 47 6 3 Journal of Integer Sequences, Vol. 7 (04), Article 4.6. Counting Palindromes According to r-runs of Ones Using Generating Functions Helmut Prodinger Department of Mathematics Stellenbosch University

More information

Lecture 21: Counting and Sampling Problems

Lecture 21: Counting and Sampling Problems princeton univ. F 14 cos 521: Advanced Algorithm Design Lecture 21: Counting and Sampling Problems Lecturer: Sanjeev Arora Scribe: Today s topic of counting and sampling problems is motivated by computational

More information

Mapping the Discrete Logarithm: Talk 2

Mapping the Discrete Logarithm: Talk 2 Mapping the Discrete Logarithm: Talk 2 Joshua Holden Joint work with Daniel Cloutier, Nathan Lindle (Senior Theses), Max Brugger, Christina Frederick, Andrew Hoffman, and Marcus Mace (RHIT REU) Rose-Hulman

More information

arxiv: v1 [math.co] 12 Oct 2018

arxiv: v1 [math.co] 12 Oct 2018 Uniform random posets Patryk Kozieł Małgorzata Sulkowska arxiv:1810.05446v1 [math.co] 12 Oct 2018 October 15, 2018 Abstract We propose a simple algorithm generating labelled posets of given size according

More information

On the number of F -matchings in a tree

On the number of F -matchings in a tree On the number of F -matchings in a tree Hiu-Fai Law Mathematical Institute Oxford University hiufai.law@gmail.com Submitted: Jul 18, 2011; Accepted: Feb 4, 2012; Published: Feb 23, 2012 Mathematics Subject

More information

THE DEGREE DISTRIBUTION OF RANDOM PLANAR GRAPHS

THE DEGREE DISTRIBUTION OF RANDOM PLANAR GRAPHS THE DEGREE DISTRIBUTION OF RANDOM PLANAR GRAPHS Michael Drmota joint work with Omer Giménez and Marc Noy Institut für Diskrete Mathematik und Geometrie TU Wien michael.drmota@tuwien.ac.at http://www.dmg.tuwien.ac.at/drmota/

More information

ASYMPTOTIC ENUMERATION OF PERMUTATIONS AVOIDING GENERALIZED PATTERNS

ASYMPTOTIC ENUMERATION OF PERMUTATIONS AVOIDING GENERALIZED PATTERNS ASYMPTOTIC ENUMERATION OF PERMUTATIONS AVOIDING GENERALIZED PATTERNS SERGI ELIZALDE Abstract. Motivated by the recent proof of the Stanley-Wilf conjecture, we study the asymptotic behavior of the number

More information

Polynomials over finite fields. Algorithms and Randomness

Polynomials over finite fields. Algorithms and Randomness Polynomials over Finite Fields: Algorithms and Randomness School of Mathematics and Statistics Carleton University daniel@math.carleton.ca AofA 10, July 2010 Introduction Let q be a prime power. In this

More information

Asymptotics of the Eulerian numbers revisited: a large deviation analysis

Asymptotics of the Eulerian numbers revisited: a large deviation analysis Asymptotics of the Eulerian numbers revisited: a large deviation analysis Guy Louchard November 204 Abstract Using the Saddle point method and multiseries expansions we obtain from the generating function

More information

Woon s Tree and Sums over Compositions

Woon s Tree and Sums over Compositions 2 3 47 6 23 Journal of Integer Sequences, Vol. 2 208, Article 8.3.4 Woon s Tree and Sums over Compositions Christophe Vignat L.S.S., CentraleSupelec Université Paris Sud Orsay, 992 France and Department

More information

Randomized Sorting Algorithms Quick sort can be converted to a randomized algorithm by picking the pivot element randomly. In this case we can show th

Randomized Sorting Algorithms Quick sort can be converted to a randomized algorithm by picking the pivot element randomly. In this case we can show th CSE 3500 Algorithms and Complexity Fall 2016 Lecture 10: September 29, 2016 Quick sort: Average Run Time In the last lecture we started analyzing the expected run time of quick sort. Let X = k 1, k 2,...,

More information

ANALYSIS OF SOME TREE STATISTICS

ANALYSIS OF SOME TREE STATISTICS ANALYSIS OF SOME TREE STATISTICS ALOIS PANHOLZER Abstract. In this survey we present results and the used proof techniques concerning the analysis of several parameters in frequently used tree families.

More information

Approximate Counting via the Poisson-Laplace-Mellin Method (joint with Chung-Kuei Lee and Helmut Prodinger)

Approximate Counting via the Poisson-Laplace-Mellin Method (joint with Chung-Kuei Lee and Helmut Prodinger) Approximate Counting via the Poisson-Laplace-Mellin Method (joint with Chung-Kuei Lee and Helmut Prodinger) Michael Fuchs Department of Applied Mathematics National Chiao Tung University Hsinchu, Taiwan

More information

ANALYTIC COMBINATORICS COMPLEX ASYMPTOTICS

ANALYTIC COMBINATORICS COMPLEX ASYMPTOTICS ANALYTIC COMBINATORICS COMPLEX ASYMPTOTICS (Chapters IV, V, VI, VII) PHILIPPE FLAJOLET & ROBERT SEDGEWICK Algorithms Project Department of Computer Science INRIA Rocquencourt Princeton University 7853

More information

Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages

Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages Philippe Flajolet & Analytic Combinatorics: Inherent Ambiguity of Context-Free Languages Frédérique Bassino and Cyril Nicaud LIGM, Université Paris-Est & CNRS December 16, 2011 I first met Philippe in

More information

What you learned in Math 28. Rosa C. Orellana

What you learned in Math 28. Rosa C. Orellana What you learned in Math 28 Rosa C. Orellana Chapter 1 - Basic Counting Techniques Sum Principle If we have a partition of a finite set S, then the size of S is the sum of the sizes of the blocks of the

More information

arxiv: v1 [math.co] 12 Sep 2018

arxiv: v1 [math.co] 12 Sep 2018 ON THE NUMBER OF INCREASING TREES WITH LABEL REPETITIONS arxiv:809.0434v [math.co] Sep 08 OLIVIER BODINI, ANTOINE GENITRINI, AND BERNHARD GITTENBERGER Abstract. In this paper we study a special subclass

More information

On Universal Types. Gadiel Seroussi Hewlett-Packard Laboratories Palo Alto, California, USA. University of Minnesota, September 14, 2004

On Universal Types. Gadiel Seroussi Hewlett-Packard Laboratories Palo Alto, California, USA. University of Minnesota, September 14, 2004 On Universal Types Gadiel Seroussi Hewlett-Packard Laboratories Palo Alto, California, USA University of Minnesota, September 14, 2004 Types for Parametric Probability Distributions A = finite alphabet,

More information

Everything You Always Wanted to Know about Quicksort, but Were Afraid to Ask. Marianne Durand

Everything You Always Wanted to Know about Quicksort, but Were Afraid to Ask. Marianne Durand Algorithms Seminar 200 2002, F. Chyzak (ed., INRIA, (2003, pp. 57 62. Available online at the URL http://algo.inria.fr/seminars/. Everything You Always Wanted to Know about Quicksort, but Were Afraid to

More information

A BIJECTIVE STUDY OF BASKETBALL WALKS

A BIJECTIVE STUDY OF BASKETBALL WALKS Séminaire Lotharingien de Combinatoire 77 (2016), Article B77a A BIJECTIVE STUDY OF BASKETBALL WALKS JÉRÉMIE BETTINELLI, ÉRIC FUSY, CÉCILE MAILLER, AND LUCAS RANDAZZO ABSTRACT. The Catalan numbers count

More information

A unied approach to linear probing hashing

A unied approach to linear probing hashing A unied approach to linear probing hashing Svante Janson Uppsala University Alfredo Viola Universidad de la República AofA 2014 Dedicated to Philippe Flajolet A discrete parking problem Limiting distribution

More information

Efficient Experimental Mathematics for Lattice Path Combinatorics

Efficient Experimental Mathematics for Lattice Path Combinatorics 1/45 Efficient Experimental Mathematics for Lattice Path Combinatorics Alin Bostan based on joint works with M. Bousquet-Mélou, F. Chyzak, M. van Hoeij, M. Kauers, S. Melczer, L. Pech, K. Raschel, B. Salvy

More information

Grand Dyck consecutive patterns avoiding binary words

Grand Dyck consecutive patterns avoiding binary words Grand Dyck consecutive patterns avoiding binary words A.Bernini S.Bilotta E.Pergola R.Pinzani UNIVERSITA DEGLI STUDI DI FIRENZE Dipartimento di Matematica e Informatica Permutation Patterns 203 A.Bernini

More information

The Number of Inversions in Permutations: A Saddle Point Approach

The Number of Inversions in Permutations: A Saddle Point Approach 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 6 (23), Article 3.2.8 The Number of Inversions in Permutations: A Saddle Point Approach Guy Louchard Département d Informatique CP 212, Boulevard du

More information

The number of inversions in permutations: A saddle point approach

The number of inversions in permutations: A saddle point approach The number of inversions in permutations: A saddle point approach Guy Louchard and Helmut Prodinger November 4, 22 Abstract Using the saddle point method, we obtain from the generating function of the

More information

Lambda terms of bounded unary height

Lambda terms of bounded unary height Lambda terms of bounded unary height Olivier Bodini Danièle Gardy Bernhard Gittenberger Abstract We aim at the asymptotic enumeration of lambda-terms of a given size where the order of nesting of abstractions

More information

On the parity of the Wiener index

On the parity of the Wiener index On the parity of the Wiener index Stephan Wagner Department of Mathematical Sciences, Stellenbosch University, Stellenbosch 7602, South Africa Hua Wang Department of Mathematics, University of Florida,

More information

Properties of Random Graphs via Boltzmann Samplers

Properties of Random Graphs via Boltzmann Samplers Discrete Mathematics and Theoretical Computer Science (subm.), by the authors, 1 rev Properties of Random Graphs via Boltzmann Samplers Konstantinos Panagiotou and Andreas Weißl Institute of Theoretical

More information

ROSENA R.X. DU AND HELMUT PRODINGER. Dedicated to Philippe Flajolet ( )

ROSENA R.X. DU AND HELMUT PRODINGER. Dedicated to Philippe Flajolet ( ) ON PROTECTED NODES IN DIGITAL SEARCH TREES ROSENA R.X. DU AND HELMUT PRODINGER Dedicated to Philippe Flajolet (98 2) Abstract. Recently, 2-protected nodes were studied in the context of ordered trees and

More information

Application of Logic to Generating Functions. Holonomic (P-recursive) Sequences

Application of Logic to Generating Functions. Holonomic (P-recursive) Sequences Application of Logic to Generating Functions Holonomic (P-recursive) Sequences Johann A. Makowsky Faculty of Computer Science, Technion - Israel Institute of Technology, Haifa, Israel http://www.cs.technion.ac.il/

More information

Additive tree functionals with small toll functions and subtrees of random trees

Additive tree functionals with small toll functions and subtrees of random trees Additive tree functionals with small toll functions and subtrees of random trees Stephan Wagner To cite this version: Stephan Wagner. Additive tree functionals with small toll functions and subtrees of

More information

Quantum Field theories, Quivers and Word combinatorics

Quantum Field theories, Quivers and Word combinatorics Quantum Field theories, Quivers and Word combinatorics Sanjaye Ramgoolam Queen Mary, University of London 21 October 2015, QMUL-EECS Quivers as Calculators : Counting, correlators and Riemann surfaces,

More information

Exercises with solutions (Set B)

Exercises with solutions (Set B) Exercises with solutions (Set B) 3. A fair coin is tossed an infinite number of times. Let Y n be a random variable, with n Z, that describes the outcome of the n-th coin toss. If the outcome of the n-th

More information

2 GRAPH AND NETWORK OPTIMIZATION. E. Amaldi Introduction to Operations Research Politecnico Milano 1

2 GRAPH AND NETWORK OPTIMIZATION. E. Amaldi Introduction to Operations Research Politecnico Milano 1 2 GRAPH AND NETWORK OPTIMIZATION E. Amaldi Introduction to Operations Research Politecnico Milano 1 A variety of decision-making problems can be formulated in terms of graphs and networks Examples: - transportation

More information

A An Overview of Complexity Theory for the Algorithm Designer

A An Overview of Complexity Theory for the Algorithm Designer A An Overview of Complexity Theory for the Algorithm Designer A.1 Certificates and the class NP A decision problem is one whose answer is either yes or no. Two examples are: SAT: Given a Boolean formula

More information