Hsien-Kuei Hwang Academia Sinica, Taiwan (joint with M. Drmota, M. - - PowerPoint PPT Presentation

hsien kuei hwang academia sinica taiwan joint with m
SMART_READER_LITE
LIVE PREVIEW

Hsien-Kuei Hwang Academia Sinica, Taiwan (joint with M. Drmota, M. - - PowerPoint PPT Presentation

PROFILE OF RANDOM RECURSIVE TREES AND RANDOM BINARY SEARCH TREES Hsien-Kuei Hwang Academia Sinica, Taiwan (joint with M. Drmota, M. Fuchs, R. Neininger) April 26, 2004 Profile of random recursive trees and random binary search trees, INRIA,


slide-1
SLIDE 1

PROFILE OF RANDOM RECURSIVE TREES AND RANDOM BINARY SEARCH TREES

Hsien-Kuei Hwang Academia Sinica, Taiwan (joint with M. Drmota, M. Fuchs, R. Neininger) April 26, 2004

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.1/64

slide-2
SLIDE 2

PROFILE OF TREES

Figure 1: Profile = {1,4,5,3,3,2}

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.2/64

slide-3
SLIDE 3

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-4
SLIDE 4

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic ✏ descendants by generation in branching process

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-5
SLIDE 5

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic ✏ descendants by generation in branching process ✏ related to path length, depth, height, width, etc.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-6
SLIDE 6

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic ✏ descendants by generation in branching process ✏ related to path length, depth, height, width, etc. ✏ breadth-first search

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-7
SLIDE 7

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic ✏ descendants by generation in branching process ✏ related to path length, depth, height, width, etc. ✏ breadth-first search ✏ compression algorithms (Jacquet, Szpankowski)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-8
SLIDE 8

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic ✏ descendants by generation in branching process ✏ related to path length, depth, height, width, etc. ✏ breadth-first search ✏ compression algorithms (Jacquet, Szpankowski) ✏ generation of random trees (Devroye, Robson)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-9
SLIDE 9

PROFILE: MOTIVATIONS

✏ fine, informative shape characteristic ✏ descendants by generation in branching process ✏ related to path length, depth, height, width, etc. ✏ breadth-first search ✏ compression algorithms (Jacquet, Szpankowski) ✏ generation of random trees (Devroye, Robson) ✏ level-wise analysis of quicksort (Chern, H.)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.3/64

slide-10
SLIDE 10

PROFILE OF RANDOM TREES: A RICH SOURCE OF INTRIGUING PHENOMENA

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.4/64

slide-11
SLIDE 11

RANDOM RECURSIVE TREES

1

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-12
SLIDE 12

RANDOM RECURSIVE TREES

1 2

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-13
SLIDE 13

RANDOM RECURSIVE TREES

1 2 3

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-14
SLIDE 14

RANDOM RECURSIVE TREES

1 2 3 4

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-15
SLIDE 15

RANDOM RECURSIVE TREES

1 2 3 4 5

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-16
SLIDE 16

RANDOM RECURSIVE TREES

1 2 3 4 5 6

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-17
SLIDE 17

RANDOM RECURSIVE TREES

1 2 3 4 5 6 7

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-18
SLIDE 18

RANDOM RECURSIVE TREES

1 2 3 4 5 6 7 8

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-19
SLIDE 19

RANDOM RECURSIVE TREES

1 2 3 4 5 6 7 8 9

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-20
SLIDE 20

RANDOM RECURSIVE TREES

1 2 3 4 5 6 7 8 9 10

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.5/64

slide-21
SLIDE 21

USEFULNESS OF RANDOM RECURSIVE TREES Simple probability models for

system generation (Na, Rapoport, 1970)

spread of contamination of organisms (Meir, Moon, 1974)

pyramid scheme (Bhattacharya, Gastwirth, 1984)

stemma construction of philology (Najock, Heyde, 1982)

Internet interface map (Janic et al., 2002)

stochastic growth of networks (Chan et al., 2003).

Internet (van Mieghem et al., 2001; Devroye, McDiarmid, Reed, 2002)

statistical physics (Tetzlaff, 2002)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.6/64

slide-22
SLIDE 22

USEFULNESS OF RANDOM RECURSIVE TREES Simple probability models for

system generation (Na, Rapoport, 1970)

spread of contamination of organisms (Meir, Moon, 1974)

pyramid scheme (Bhattacharya, Gastwirth, 1984)

stemma construction of philology (Najock, Heyde, 1982)

Internet interface map (Janic et al., 2002)

stochastic growth of networks (Chan et al., 2003).

Internet (van Mieghem et al., 2001; Devroye, McDiarmid, Reed, 2002)

statistical physics (Tetzlaff, 2002)

They also appeared in Hopf algebra under the name of “heap-ordered trees”; see Grossman, Larsen (1989).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.6/64

slide-23
SLIDE 23

PROFILE OF RANDOM RECURSIVE TREES

Xn,k : = # of nodes at distance k from the root in a

random recursive tree of n keys.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.7/64

slide-24
SLIDE 24

PROFILE OF RANDOM RECURSIVE TREES

Xn,k : = # of nodes at distance k from the root in a

random recursive tree of n keys. Main questions: mean, variance, limit distribution of Xn,k for all possible values of k?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.7/64

slide-25
SLIDE 25

PROFILE OF RANDOM RECURSIVE TREES

Xn,k : = # of nodes at distance k from the root in a

random recursive tree of n keys. Main questions: mean, variance, limit distribution of Xn,k for all possible values of k? Main range: k ≤ K log n

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.7/64

slide-26
SLIDE 26

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-27
SLIDE 27

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-28
SLIDE 28

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 4

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-29
SLIDE 29

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 4 8

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-30
SLIDE 30

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 4 8 7

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-31
SLIDE 31

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 1 4 8 7

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-32
SLIDE 32

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 1 4 5 8 7

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-33
SLIDE 33

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 1 4 3 5 8 7

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-34
SLIDE 34

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 1 4 3 5 8 7 10

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-35
SLIDE 35

THE BINARY SEARCH TREE CONSTRUCTED FROM

{6,2,4,8,7,1,5,3,10,9}

6 2 1 4 3 5 8 7 10 9

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.8/64

slide-36
SLIDE 36

INTERNAL NODES AND EXTERNAL NODES

4 3 1 2 6 5

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.9/64

slide-37
SLIDE 37

PROFILE OF RANDOM BINARY SEARCH TREES The model: Assume that all permutations of n elements are equally likely. Construct the BST from a random permutation.

  • Yn,k

:= the number of external nodes at level k Zn,k := the number of internal nodes at level k

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.10/64

slide-38
SLIDE 38

PROFILE OF RANDOM BINARY SEARCH TREES The model: Assume that all permutations of n elements are equally likely. Construct the BST from a random permutation.

  • Yn,k

:= the number of external nodes at level k Zn,k := the number of internal nodes at level k

Main question: probabilistic properties of Yn,k and Zn,k?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.10/64

slide-39
SLIDE 39

A CONNECTION

Xn,k

d

= # of nodes at k left branches away from the root in

random BSTs of n − 1 keys

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.11/64

slide-40
SLIDE 40

A CONNECTION

Xn,k

d

= # of nodes at k left branches away from the root in

random BSTs of n − 1 keys by (i) the usual transformation from a multiway tree to a binary tree (first branch → left, sibling → right)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.11/64

slide-41
SLIDE 41

A CONNECTION

Xn,k

d

= # of nodes at k left branches away from the root in

random BSTs of n − 1 keys by (i) the usual transformation from a multiway tree to a binary tree (first branch → left, sibling → right) and (ii) the bijection between binary increasing trees and binary search trees.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.11/64

slide-42
SLIDE 42

A CONNECTION

Xn,k

d

= # of nodes at k left branches away from the root in

random BSTs of n − 1 keys by (i) the usual transformation from a multiway tree to a binary tree (first branch → left, sibling → right) and (ii) the bijection between binary increasing trees and binary search trees. It suffices to look at BSTs.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.11/64

slide-43
SLIDE 43

A CONNECTION

Xn,k

d

= # of nodes at k left branches away from the root in

random BSTs of n − 1 keys by (i) the usual transformation from a multiway tree to a binary tree (first branch → left, sibling → right) and (ii) the bijection between binary increasing trees and binary search trees. It suffices to look at BSTs. But (i) it’s much simpler to start from the better structured recursive trees; (ii) behaviors not identical in all ranges.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.11/64

slide-44
SLIDE 44

SUMMARY OF MAIN PHENOMENA Write throughout αn,k =

k log n

and limn αn,k = α.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.12/64

slide-45
SLIDE 45

SUMMARY OF MAIN PHENOMENA Write throughout αn,k =

k log n

and limn αn,k = α.

➠ E(Xn,k) unimodal, but V(Xn,k) bimodal

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.12/64

slide-46
SLIDE 46

SUMMARY OF MAIN PHENOMENA Write throughout αn,k =

k log n

and limn αn,k = α.

➠ E(Xn,k) unimodal, but V(Xn,k) bimodal ➠ If 0 ≤ α < e, then

Xn,k E(Xn,k)

d

− → Xα.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.12/64

slide-47
SLIDE 47

SUMMARY OF MAIN PHENOMENA Write throughout αn,k =

k log n

and limn αn,k = α.

➠ E(Xn,k) unimodal, but V(Xn,k) bimodal ➠ If 0 ≤ α < e, then

Xn,k E(Xn,k)

d

− → Xα.

➠ If 0 ≤ α ≤ 1, then

Xn,k E(Xn,k)

m

− → Xα.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.12/64

slide-48
SLIDE 48

SUMMARY OF MAIN PHENOMENA

➠ For k = o(log n), Xn,k − E(Xn,k)

  • V(Xn,k)

m

− → N(0, 1).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.13/64

slide-49
SLIDE 49

SUMMARY OF MAIN PHENOMENA

➠ For k = o(log n), Xn,k − E(Xn,k)

  • V(Xn,k)

m

− → N(0, 1).

➠ If k = log n + o(log n) and |k − log n| → ∞, then

Xn,k − E(Xn,k)

  • V(Xn,k)

m

− → X′

1.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.13/64

slide-50
SLIDE 50

SUMMARY OF MAIN PHENOMENA

➠ For k = o(log n), Xn,k − E(Xn,k)

  • V(Xn,k)

m

− → N(0, 1).

➠ If k = log n + o(log n) and |k − log n| → ∞, then

Xn,k − E(Xn,k)

  • V(Xn,k)

m

− → X′

1.

➠ For k = log n + O(1), the limit law of

Xn,k − E(Xn,k)

  • V(Xn,k)

does not exist.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.13/64

slide-51
SLIDE 51

RECURRENCE OF Xn,k Y

Xn,k

d

= Xuniform[1,n−1],k−1 + X∗

n−uniform[1,n−1],k

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.14/64

slide-52
SLIDE 52

RECURRENCE OF Xn,k Y

Xn,k

d

= Xuniform[1,n−1],k−1 + X∗

n−uniform[1,n−1],k

Three proofs: (i) bijection conditioned on the size of the subtree rooted at 2; (ii) above-mentioned transformation;

(iii) algebraic

Xn,k

d

=

  • s≥1

1 s!

  • j1+···+js=n−1

n − 1 j1, . . . , js (j − 1)! · · · (js − 1)! (n − 1)!

  • P(s subtrees have sizes j1,...,js)

× (Xj1,k−1 + · · · + Xjs,k−1) .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.14/64

slide-53
SLIDE 53

EXPECTED VALUE OF Xn,k Meir, Moon (1978) (implicit): for 0 ≤ k < n

µn,k := E(Xn,k) =

Stirling1(n, k + 1)

(n − 1)! ;

also in Moon (1974) and Dondajewski, Szyma´ nski (1982).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.15/64

slide-54
SLIDE 54

EXPECTED VALUE OF Xn,k Meir, Moon (1978) (implicit): for 0 ≤ k < n

µn,k := E(Xn,k) =

Stirling1(n, k + 1)

(n − 1)! ;

also in Moon (1974) and Dondajewski, Szyma´ nski (1982). By known estimates for Stirling first numbers (H. 1995)

µn,k = (log n)k Γ(1 +

k log n)k!

  • 1 + O
  • 1

log n

  • ,

uniformly for 0 ≤ k ≤ K log n.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.15/64

slide-55
SLIDE 55

A ROUGH DESCRIPTION OF SHAPE The root has about log n subtrees,

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.16/64

slide-56
SLIDE 56

A ROUGH DESCRIPTION OF SHAPE The root has about log n subtrees, each of them “attracting” about the same number of new keys.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.16/64

slide-57
SLIDE 57

A ROUGH DESCRIPTION OF SHAPE The root has about log n subtrees, each of them “attracting” about the same number of new keys. Also log µn,k

log n → α(1 − log α) for 0 ≤ α ≤ K,

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.16/64

slide-58
SLIDE 58

A ROUGH DESCRIPTION OF SHAPE The root has about log n subtrees, each of them “attracting” about the same number of new keys. Also log µn,k

log n → α(1 − log α) for 0 ≤ α ≤ K, and µn,k → ∞ when 1 ≤ k ≤ e log n − 1 2 log log n + O(1).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.16/64

slide-59
SLIDE 59

TWO COROLLARIES The estimate for µn,k also implies

☞ an LLT for the depth; see Devroye (1988), Szyma´

nski (1990), Mahmoud (1991) for CLT, and Dobrow, Smythe (1996) for Poisson approximation;

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.17/64

slide-60
SLIDE 60

TWO COROLLARIES The estimate for µn,k also implies

☞ an LLT for the depth; see Devroye (1988), Szyma´

nski (1990), Mahmoud (1991) for CLT, and Dobrow, Smythe (1996) for Poisson approximation;

☞ that the expected height is bounded above by

E(Hn) ≤ e log n − 1 2 log log n + O(1).

(Roughly, the range when µn,k → ∞.)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.17/64

slide-61
SLIDE 61

SECOND MOMENT OF Xn,k Meir, Moon (1978) (implicit)

E(X2

n,k) =

  • 0≤j≤k

2j j

  • Stirling1(n, k + j + 1)

(n − 1)! ;

see also van der Hofstad et al. (2002);

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.18/64

slide-62
SLIDE 62

SECOND MOMENT OF Xn,k Meir, Moon (1978) (implicit)

E(X2

n,k) =

  • 0≤j≤k

2j j

  • Stirling1(n, k + j + 1)

(n − 1)! ;

see also van der Hofstad et al. (2002); and for k = O(1)

V(Xn,k) ∼ (log n)2k−1 (2k − 1)(k − 1)!2.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.18/64

slide-63
SLIDE 63

VARIANCE OF Xn,k: MIDDLE RANGE Uniformly for 1 ≤ k ≤ 2 log n − K√log n

V(Xn,k) ∼ φ(αn,k)µ2

n,k,

where

φ(x) := Γ(x + 1)2 (1 − x

2)Γ(2x + 1) − 1.

A full asymptotic expansion can be derived.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.19/64

slide-64
SLIDE 64

φ(0) = φ(1) = φ′(1) = 0

0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.4 0.6 0.8 1 1.2 1.4

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.20/64

slide-65
SLIDE 65

MORE PRECISE ESTIMATES

V(Xn,k) ∼            (log n)2k−1 (2k − 1)(k − 1)!2,

if k = o(log n),

p(tn) (log n)k−1 k! 2 ,

if tn

:= k − log n = o(log n),

where

p(tn) :=

  • 2 − π2

6

  • t2

n −

  • 2ζ(3) + 4γ + π2

3 (1 − γ) − 6

  • tn +

2γ2 − 6γ + 8 − 2ζ(3)(1 − γ) − π2

6

  • γ2 − 2γ + 3
  • − π4

360.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.21/64

slide-66
SLIDE 66

MORE PRECISE ESTIMATES

V(Xn,k) ∼            (log n)2k−1 (2k − 1)(k − 1)!2,

if k = o(log n),

p(tn) (log n)k−1 k! 2 ,

if tn

:= k − log n = o(log n),

where

p(tn) :=

  • 2 − π2

6

  • t2

n −

  • 2ζ(3) + 4γ + π2

3 (1 − γ) − 6

  • tn +

2γ2 − 6γ + 8 − 2ζ(3)(1 − γ) − π2

6

  • γ2 − 2γ + 3
  • − π4

360. φ′′(1) 2

= 2 − π2

6

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.21/64

slide-67
SLIDE 67

BIMODALITY OF VARIANCE WHEN α = 1

min

k=log n+O(√log n) V(Xn,k)≍

n2 (log n)3,

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.22/64

slide-68
SLIDE 68

BIMODALITY OF VARIANCE WHEN α = 1

min

k=log n+O(√log n) V(Xn,k)≍

n2 (log n)3, max

1≤k<n V(Xn,k)∼ 12 − π2

12πe · n2 (log n)2.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.22/64

slide-69
SLIDE 69

BIMODALITY OF VARIANCE WHEN α = 1

min

k=log n+O(√log n) V(Xn,k)≍

n2 (log n)3, max

1≤k<n V(Xn,k)∼ 12 − π2

12πe · n2 (log n)2.

Note that V(Xn,k) ∼

p(tn) (log n)2 · µ2

n,k.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.22/64

slide-70
SLIDE 70

BIMODALITY OF VARIANCE WHEN α = 1

min

k=log n+O(√log n) V(Xn,k)≍

n2 (log n)3, max

1≤k<n V(Xn,k)∼ 12 − π2

12πe · n2 (log n)2.

Note that V(Xn,k) ∼

p(tn) (log n)2 · µ2

n,k.

More precise estimates can be derived.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.22/64

slide-71
SLIDE 71

E(X500,k) AND V(X500,k)

200 400 600 800 1000 2 4 6 8 10 12 14

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.23/64

slide-72
SLIDE 72

A GLOBAL DESCRIPTION OF V(Xn,k)

log V(Xn,k) log n →      2α(1 − log α),

if 0 ≤ α ≤ 2;

4 − α log 4,

if 2 ≤ α ≤ 4;

α(1 − log α),

if 4 ≤ α ≤ K.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.24/64

slide-73
SLIDE 73

A GLOBAL DESCRIPTION OF V(Xn,k)

log V(Xn,k) log n →      2α(1 − log α),

if 0 ≤ α ≤ 2;

4 − α log 4,

if 2 ≤ α ≤ 4;

α(1 − log α),

if 4 ≤ α ≤ K. Thus V(Xn,k)

     ≍ µ2

n,k,

if 0 ≤ α < 2;

≫ µ2

n,k, µn,k,

if 2 ≤ α ≤ 4;

≍ µn,k,

if 4 < α ≤ K.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.24/64

slide-74
SLIDE 74

LIMIT DISTRIBUTION: GENESIS Let ¯

Xn,k := Xn,k/µn,k and In := uniform[1, n − 1].

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.25/64

slide-75
SLIDE 75

LIMIT DISTRIBUTION: GENESIS Let ¯

Xn,k := Xn,k/µn,k and In := uniform[1, n − 1].

Then from

Xn,k

d

= XIn,k−1 + X∗

n−In,k,

it follows that

¯ Xn,k

d

= µIn,k−1 µn,k ¯ XIn,k−1 + µn−In,k µn,k ¯ X∗

n−In,k.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.25/64

slide-76
SLIDE 76

LIMIT DISTRIBUTION: GENESIS Since µn,k ≈ (log n)k/k! and In = ⌈(n − 1)U⌉, we expect that

µIn,k−1 µn,k ≈ k log n log n + log U log n k−1

d

− → αUα,

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.26/64

slide-77
SLIDE 77

LIMIT DISTRIBUTION: GENESIS Since µn,k ≈ (log n)k/k! and In = ⌈(n − 1)U⌉, we expect that

µIn,k−1 µn,k ≈ k log n log n + log U log n k−1

d

− → αUα,

and similarly µn−In,k

µn,k

d

− → (1 − U)α.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.26/64

slide-78
SLIDE 78

LIMIT DISTRIBUTION: GENESIS Since µn,k ≈ (log n)k/k! and In = ⌈(n − 1)U⌉, we expect that

µIn,k−1 µn,k ≈ k log n log n + log U log n k−1

d

− → αUα,

and similarly µn−In,k

µn,k

d

− → (1 − U)α. Thus if ¯ Xn,k

d

− → Xα, then Xα

d

= αUαXα + (1 − U)αX∗

α.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.26/64

slide-79
SLIDE 79

LIMIT DISTRIBUTIONS: NEW RESULTS For 0 ≤ α < e

Xn,k µn,k

d

− → Xα,

with convergence of the first m moments for

0 ≤ α < m1/(m−1).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.27/64

slide-80
SLIDE 80

LIMIT DISTRIBUTIONS: NEW RESULTS For 0 ≤ α < e

Xn,k µn,k

d

− → Xα,

with convergence of the first m moments for

0 ≤ α < m1/(m−1).

In particular, convergence of all moments holds only for

α ∈ [0, 1].

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.27/64

slide-81
SLIDE 81

LIMIT DISTRIBUTIONS: NEW RESULTS For 0 ≤ α < e

Xn,k µn,k

d

− → Xα,

with convergence of the first m moments for

0 ≤ α < m1/(m−1).

In particular, convergence of all moments holds only for

α ∈ [0, 1]. X0 = X1 ≡ 1

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.27/64

slide-82
SLIDE 82

RECURRENCE OF MOMENTS Let νm := E(Xm

α ). Then ν0 = ν1 = 1 and

νm = 1 m − αm−1

  • 1≤j<m

m j

  • νjνm−jαj−1

× Γ(jα + 1)Γ((m − j)α + 1) Γ(mα + 1) (m ≥ 2),

for 0 ≤ α < m1/(m−1) .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.28/64

slide-83
SLIDE 83

ASYMPTOTIC NORMALITY WHEN α = 0 If 1 ≤ k = o(log n), then

sup

x

  • P

   Xn,k − (log n)k

k!

  • (log n)2k−1

(k−1)!2(2k−1)

< x    − Φ(x)

  • = O
  • k

log n

  • ,

where Φ(x) denotes the standard normal distribution.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.29/64

slide-84
SLIDE 84

ASYMPTOTIC NORMALITY WHEN α = 0 If 1 ≤ k = o(log n), then

sup

x

  • P

   Xn,k − (log n)k

k!

  • (log n)2k−1

(k−1)!2(2k−1)

< x    − Φ(x)

  • = O
  • k

log n

  • ,

where Φ(x) denotes the standard normal distribution. In particular,

  • Xn,1 ∼ N(log n, log n)

Xn,2 ∼ N(1

2(log n)2, 1 3(log n)3)

. . .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.29/64

slide-85
SLIDE 85

A QUICKSORT-TYPE LIMIT LAW WHEN α = 1 If tn := k − log n = o(log n) and tn → ∞, then

Xn,k − µn,k tn

(log n)k−1 k! m

− → X′

1,

where X′

1 = (dXα/dα)|α=1 or

X′

1 d

= UX′

1 + (1 − U)X′ 1 ∗ + U + U log U + (1 − U) log(1 − U).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.30/64

slide-86
SLIDE 86

A QUICKSORT-TYPE LIMIT LAW WHEN α = 1 If tn := k − log n = o(log n) and tn → ∞, then

Xn,k − µn,k tn

(log n)k−1 k! m

− → X′

1,

where X′

1 = (dXα/dα)|α=1 or

X′

1 d

= UX′

1 + (1 − U)X′ 1 ∗ + U + U log U + (1 − U) log(1 − U).

Same law as total path length (or left path length in BST; Dobrow, Fill, 1999) and cost of an in-situ permutation algorithm.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.30/64

slide-87
SLIDE 87

NONEXISTENCE OF LIMIT LAW WHEN k = log n + O(1) If k = log n + O(1), then the limit distribution of

(Xn,k − µn,k)/

  • V(Xn,k) does not exist.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.31/64

slide-88
SLIDE 88

NONEXISTENCE OF LIMIT LAW WHEN k = log n + O(1) If k = log n + O(1), then the limit distribution of

(Xn,k − µn,k)/

  • V(Xn,k) does not exist.

Main step of the proof:

E(Xn,k − µn,k)m ∼ Polynomial

  • degree=m

(tn) (log n)k−1 k! m ;

the remaining proof is similar to that used for the space requirement of random m-ary search trees when m ≥ 27.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.31/64

slide-89
SLIDE 89

APPROACHES USED Convergence in distribution: contraction method

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.32/64

slide-90
SLIDE 90

APPROACHES USED Convergence in distribution: contraction method Convergence of moments: method of moments

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.32/64

slide-91
SLIDE 91

APPROACHES USED Convergence in distribution: contraction method Convergence of moments: method of moments Common to both approaches is the resolution of the double-indexed recurrence

an,k = bn,k + 1 n − 1

  • 1≤j<n

(aj,k−1 + aj,k).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.32/64

slide-92
SLIDE 92

APPROACHES USED Convergence in distribution: contraction method Convergence of moments: method of moments Common to both approaches is the resolution of the double-indexed recurrence

an,k = bn,k + 1 n − 1

  • 1≤j<n

(aj,k−1 + aj,k).

(Martingale arguments also apply to recursive trees.)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.32/64

slide-93
SLIDE 93

SOLUTION OF THE RECURRENCE If

an,k = 1 n − 1

  • 1≤j<n

(aj,k + aj,k−1) + bn,k, (n ≥ 2; k ≥ 1),

with an,k = bn,k for n = 1 and k = 0,

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.33/64

slide-94
SLIDE 94

SOLUTION OF THE RECURRENCE If

an,k = 1 n − 1

  • 1≤j<n

(aj,k + aj,k−1) + bn,k, (n ≥ 2; k ≥ 1),

with an,k = bn,k for n = 1 and k = 0, then

an,k = bn,k +

  • 2≤j<n

j−1

0≤r≤k

bj,k−r[wr](w + 1)

  • j<ℓ<n
  • 1 + w

  • .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.33/64

slide-95
SLIDE 95

SOLUTION OF THE RECURRENCE If

an,k = 1 n − 1

  • 1≤j<n

(aj,k + aj,k−1) + bn,k, (n ≥ 2; k ≥ 1),

with an,k = bn,k for n = 1 and k = 0, then

an,k = bn,k +

  • 2≤j<n

j−1

0≤r≤k

bj,k−r[wr](w + 1)

  • j<ℓ<n
  • 1 + w

  • .

Proof by GF

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.33/64

slide-96
SLIDE 96

WHICHEVER APPROACH REQUIRES MEAN VALUE

µn,k satisfies the recurrence with bn,k = δ0,k.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.34/64

slide-97
SLIDE 97

WHICHEVER APPROACH REQUIRES MEAN VALUE

µn,k satisfies the recurrence with bn,k = δ0,k. Thus

µn,k = [wk](w + 1)

  • 2≤j<n

1 j

  • j<ℓ<n
  • 1 + w

  • =

Stirling1(n, k + 1)

(n − 1)! = (log n)k Γ(1 +

k log n)k!

  • 1 + O
  • 1

log n

  • .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.34/64

slide-98
SLIDE 98

WHICHEVER APPROACH REQUIRES MEAN VALUE

µn,k satisfies the recurrence with bn,k = δ0,k. Thus

µn,k = [wk](w + 1)

  • 2≤j<n

1 j

  • j<ℓ<n
  • 1 + w

  • =

Stirling1(n, k + 1)

(n − 1)! = (log n)k Γ(1 +

k log n)k!

  • 1 + O
  • 1

log n

  • .

Sufficient for all ranges except k = log n + O(1).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.34/64

slide-99
SLIDE 99

ASYMPTOTICS OF HIGHER MOMENTS For method of moments: all moments (centered or not) satisfy the same type of recurrences

an,k = 1 n − 1

  • 1≤j<n

(aj,k + aj,k−1) + bn,k,

with different bn,k, and we need the ∼-transfer :

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.35/64

slide-100
SLIDE 100

ASYMPTOTICS OF HIGHER MOMENTS For method of moments: all moments (centered or not) satisfy the same type of recurrences

an,k = 1 n − 1

  • 1≤j<n

(aj,k + aj,k−1) + bn,k,

with different bn,k, and we need the ∼-transfer : if bn,k ∼ c

  • (log n)k

Γ(1+α)k!

m

, then an,k ∼ c mα+1

mα−αm

  • (log n)k

Γ(1+α)k!

m

.

c = c(α)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.35/64

slide-101
SLIDE 101

CONTRACTION METHOD: CONVERGENCE IN DISTRIBUTION For contraction method: (i) choose s ∈ (1, 2] such that

E (αsUsα + (1 − U)αs) = αs + 1 αs + 1 < 1,

  • r, equivalently, s − αs−1 > 0.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.36/64

slide-102
SLIDE 102

CONTRACTION METHOD: CONVERGENCE IN DISTRIBUTION For contraction method: (i) choose s ∈ (1, 2] such that

E (αsUsα + (1 − U)αs) = αs + 1 αs + 1 < 1,

  • r, equivalently, s − αs−1 > 0.

(ii) need the o-transfer : If bn,k = o(µs

n,k), where s > 1

satisfies s − αs−1 > 0, then an,k = o(µs

n,k).

1.2 1.4 1.6 1.8 2 0.5 1 1.5 2 2.5

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.36/64

slide-103
SLIDE 103

CONTRACTION METHOD: CONVERGENCE RATE For contraction method, a convergence rate in Zolotarev distance can be derived when 0 ≤ α < 2 by proving the stronger O-transfer : if bn,k = O

|k − α log n| ∨ 1 log n µs

n,k

  • ,

then an,k = O

|k − α log n| ∨ 1 log n µs

n,k

  • ,

where s > 1 satisfies s − αs−1 > 0.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.37/64

slide-104
SLIDE 104

THE CENTRAL RANGE α = 1 When k = log n + o(log n), same moments approach but starting with ¯

Pn,k(y) := E(e(Xn,k−µn,k)y), which satisfies ¯ Pn,k(y) = 1 n − 1

  • 1≤j<n

¯ Pj,k−1(y)¯ Pn−j,k(y)e−∆n,k(j)y,

for n ≥ 2, k ≥ 1, where ∆n,k(j) := µj,k−1 +µn−j,k −µn,k.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.38/64

slide-105
SLIDE 105

THE CENTRAL RANGE α = 1 When k = log n + o(log n), same moments approach but starting with ¯

Pn,k(y) := E(e(Xn,k−µn,k)y), which satisfies ¯ Pn,k(y) = 1 n − 1

  • 1≤j<n

¯ Pj,k−1(y)¯ Pn−j,k(y)e−∆n,k(j)y,

for n ≥ 2, k ≥ 1, where ∆n,k(j) := µj,k−1 +µn−j,k −µn,k. A more uniform estimate for ∆n,k(j) is needed.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.38/64

slide-106
SLIDE 106

THE NORMAL RANGE: α = 0 Let σn,k :=

  • (log n)2k−1

(2k−1)(k−1)!2 and Λ := log n k .

Two estimates are needed: (i) uniformly for |θ| ≤ εΛ1/6

  • E
  • e

Xn,k−(log n)k/k! σn,k

  • − e−θ2/2
  • = O

|θ| + |θ|3 √ Λ e−θ2/2 + n−ε

  • ;

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.39/64

slide-107
SLIDE 107

THE NORMAL RANGE: α = 0 Let σn,k :=

  • (log n)2k−1

(2k−1)(k−1)!2 and Λ := log n k .

Two estimates are needed: (i) uniformly for |θ| ≤ εΛ1/6

  • E
  • e

Xn,k−(log n)k/k! σn,k

  • − e−θ2/2
  • = O

|θ| + |θ|3 √ Λ e−θ2/2 + n−ε

  • ;

and (ii) uniformly for εΛ1/6 ≤ |θ| ≤ ε

√ Λ

E

  • e

Xn,k−(log n)k/k! σn,k

  • = O(e−θ2/4 + n−ε).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.39/64

slide-108
SLIDE 108

IDEA OF PROOF Let Qk(z, y) :=

n≥1 E(eXn,ky)zn−1. Then

     Q0(z, s) = es 1 − z, Qk(z, s) = exp z Qk−1(t, s)dt

  • ,

(k ≥ 1).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.40/64

slide-109
SLIDE 109

IDEA OF PROOF Decompose Qk in two ways as follows.

Qk(z, s) := exp

  • m≥0

Vk,m(− log(1 − z)) m! sm

  • :=

1 1 − z

  • m≥0

Wk,m(− log(1 − z)) m! sm.

Then manipulate inductively the recurrences of V and W.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.41/64

slide-110
SLIDE 110

PROFILE OF BST Our approach based on contraction method and method of moments is applicable to BSTs.

  • Yn,k

:= the number of external nodes at level k Zn,k := the number of internal nodes at level k

which satisfies the same type of recurrences

Cn,k

d

= Cuniform[0,n−1],k−1 + C∗

n−1−uniform[0,n−1],k−1,

with different initial conditions.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.42/64

slide-111
SLIDE 111

MEAN VALUES Mean values known since 1960’s: Lynch (1965), Knuth (1998), Brown, Shubert (1984), Mahmoud, Pittel (1984), Pittel (1984), Louchard (1987), Devroye (1988).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.43/64

slide-112
SLIDE 112

MEAN VALUES Mean values known since 1960’s: Lynch (1965), Knuth (1998), Brown, Shubert (1984), Mahmoud, Pittel (1984), Pittel (1984), Louchard (1987), Devroye (1988).

E(Yn,k) = 2k n!

Stirling1(n, k)

= (2 log n)k Γ(αn,k)k!n

  • 1 + O
  • 1

log n

  • ,

uniformly for 0 ≤ k ≤ K log n.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.43/64

slide-113
SLIDE 113

THE BINARY SEARCH TREE CONSTANTS

log E(Yn,k) log n → λ(α) := α − 1 − α log(α/2).

Thus E(Yn,k) → ∞ when α− < α < α+, where

0 < α− < 1 < α+ are the two real zeros of the equation z − 1 − z log(z/2) or e(z−1)/z = z/2.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.44/64

slide-114
SLIDE 114

THE BINARY SEARCH TREE CONSTANTS

log E(Yn,k) log n → λ(α) := α − 1 − α log(α/2).

Thus E(Yn,k) → ∞ when α− < α < α+, where

0 < α− < 1 < α+ are the two real zeros of the equation z − 1 − z log(z/2) or e(z−1)/z = z/2.

Also the estimate for µn,k implies that the expected height is bounded above by

E(Hn) ≤ α+ log n − α+ 2(α+ − 1) log log n + O(1).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.44/64

slide-115
SLIDE 115

LIMIT DISTRIBUTIONS Chauvin et al. (2001): almost sure convergence of

Yn,k E(Yn,k), Zn,k E(Zn,k)

d

− → Yα,

for 1.2 ≤ α ≤ 2.8, where

d

= α 2 Uα−1Yα + α 2 (1 − U)α−1Y∗

α.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.45/64

slide-116
SLIDE 116

LIMIT DISTRIBUTIONS Chauvin et al. (2001): almost sure convergence of

Yn,k E(Yn,k), Zn,k E(Zn,k)

d

− → Yα,

for 1.2 ≤ α ≤ 2.8, where

d

= α 2 Uα−1Yα + α 2 (1 − U)α−1Y∗

α.

Chauvin et al. (2003+): convergence in probability for

Yn,k/E(Yn,k) when k = α log n+ O(√log n) , α− < α < α+.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.45/64

slide-117
SLIDE 117

NEW RESULTS Define ¯

Zn,k :=

  • 2k − Zn,k,

if α− ≤ α < 1;

Zn,k,

if 1 ≤ α < α+.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.46/64

slide-118
SLIDE 118

NEW RESULTS Define ¯

Zn,k :=

  • 2k − Zn,k,

if α− ≤ α < 1;

Zn,k,

if 1 ≤ α < α+. If k = α log n+ o(log n) , where α− < α < α+, then

Yn,k E(Yn,k), ¯ Zn,k E(¯ Zn,k)

d

− → Yα,

with convergence of all moments for α ∈ [1, 2] but not for

α outside [1, 2].

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.46/64

slide-119
SLIDE 119

MOMENTS OF THE LIMIT LAW

η0 = η1 = 1 and for m ≥ 2 ηm = (α/2)m m(α − 1) + 1 − 2(α/2)m ×

  • 1≤j<m

m j

  • ηjηm−j

Γ(j(α − 1) + 1)Γ((m − j)(α − 1) + 1) Γ(m(α − 1) + 1) .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.47/64

slide-120
SLIDE 120

MOMENTS OF THE LIMIT LAW

η0 = η1 = 1 and for m ≥ 2 ηm = (α/2)m m(α − 1) + 1 − 2(α/2)m ×

  • 1≤j<m

m j

  • ηjηm−j

Γ(j(α − 1) + 1)Γ((m − j)(α − 1) + 1) Γ(m(α − 1) + 1) .

The polynomial m(z − 1) + 1 − 2(z/2)m has two positive zeros z−

m and z+ m, where z− m ↑ 1, and z+ m ↓ 2.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.47/64

slide-121
SLIDE 121

THE QUICKSORT LIMIT LAW WHEN α = 2 Since Y1 = Y2 = 1, we need to refine the limit result.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.48/64

slide-122
SLIDE 122

THE QUICKSORT LIMIT LAW WHEN α = 2 Since Y1 = Y2 = 1, we need to refine the limit result. If k = 2 log n + tn, where tn = o(log n) and tn → ∞, then

Yn,k − E(Yn,k) tnnλ(α

n,k)/

  • 4π(log n)3,

Zn,k − E(Zn,k) tnnλ(α

n,k)/

  • 4π(log n)3

m

− → Y ′

2,

where Y ′

2 := (dYα/dα)|α=2.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.48/64

slide-123
SLIDE 123

THE QUICKSORT LIMIT LAW WHEN α = 2 Since Y1 = Y2 = 1, we need to refine the limit result. If k = 2 log n + tn, where tn = o(log n) and tn → ∞, then

Yn,k − E(Yn,k) tnnλ(α

n,k)/

  • 4π(log n)3,

Zn,k − E(Zn,k) tnnλ(α

n,k)/

  • 4π(log n)3

m

− → Y ′

2,

where Y ′

2 := (dYα/dα)|α=2.

The limit law Y ′

2 is essentially the quicksort limit law

Y ′

2 d

= UY ′

2 + (1 − U)Y ′ 2 ∗ + 1

2 + U log U + (1 − U) log(1 − U).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.48/64

slide-124
SLIDE 124

NONEXISTENCE OF LIMIT DISTRIBUTION If k = 2 log n + O(1), then neither of the limit distribution

  • f
  • Yn,k − E(Yn,k)
  • V(Yn,k)

, Zn,k − E(Zn,k)

  • V(Zn,k)
  • exists.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.49/64

slide-125
SLIDE 125

THE RANGE α = 1 If k = log n + tn, where tn = o(log n) and tn → ∞, then

Yn,k − E(Yn,k) tnnλ(αn,k)/

  • 2π(log n)3

m

− → Y ′

1,

where Y ′

1 := (dYα/dα)|α=1;

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.50/64

slide-126
SLIDE 126

THE RANGE α = 1 If k = log n + tn, where tn = o(log n) and tn → ∞, then

Yn,k − E(Yn,k) tnnλ(αn,k)/

  • 2π(log n)3

m

− → Y ′

1,

where Y ′

1 := (dYα/dα)|α=1; if tn = O(1), then the limit

distribution of Yn,k−E(Yn,k)

V(Yn,k)

does not exist.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.50/64

slide-127
SLIDE 127

THE RANGE α = 1 If k = log n + tn, where tn = o(log n) and tn → ∞, then

Yn,k − E(Yn,k) tnnλ(αn,k)/

  • 2π(log n)3

m

− → Y ′

1,

where Y ′

1 := (dYα/dα)|α=1; if tn = O(1), then the limit

distribution of Yn,k−E(Yn,k)

V(Yn,k)

does not exist.

Y ′

1 d

= 1 2Y ′

1 + 1

2Y ′

1 ∗ + 1 + 1

2 log U + 1 2 log(1 − U).

Any naturally defined RVs on trees leading to Y ′

1?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.50/64

slide-128
SLIDE 128

DIFFERENT BEHAVIOR FOR INTERNAL NODES For internal nodes, if k = log n + tn, then, uniformly for

tn = o(log n), Zn,k − E(Zn,k) nλ(αn,k)/√2π log n

m

− → Y ′

1.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.51/64

slide-129
SLIDE 129

DIFFERENT BEHAVIOR FOR INTERNAL NODES For internal nodes, if k = log n + tn, then, uniformly for

tn = o(log n), Zn,k − E(Zn,k) nλ(αn,k)/√2π log n

m

− → Y ′

1.

The normalizing standard variation differs by a factor of

tn/ log n.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.51/64

slide-130
SLIDE 130

DIFFERENT BEHAVIOR FOR INTERNAL NODES For internal nodes, if k = log n + tn, then, uniformly for

tn = o(log n), Zn,k − E(Zn,k) nλ(αn,k)/√2π log n

m

− → Y ′

1.

The normalizing standard variation differs by a factor of

tn/ log n.

No normal range for BST-profile

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.51/64

slide-131
SLIDE 131

GENERALITY (METHODOLOGY) Our tools (contraction + moments), with suitable development of “asymptotic transfer”, are applicable to most BST relatives: m-ary search trees, median-of-(2t + 1) BSTs, Devroye’s simplex trees and

  • quadtrees. Technicalities are more involved.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.52/64

slide-132
SLIDE 132

GENERALITY (METHODOLOGY) Our tools (contraction + moments), with suitable development of “asymptotic transfer”, are applicable to most BST relatives: m-ary search trees, median-of-(2t + 1) BSTs, Devroye’s simplex trees and

  • quadtrees. Technicalities are more involved.

All asymptotic tools needed are based on solving asymptotically (exact solution being less useful) the underlying double-indexed recurrence.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.52/64

slide-133
SLIDE 133

GENERALITY (METHODOLOGY) Our tools (contraction + moments), with suitable development of “asymptotic transfer”, are applicable to most BST relatives: m-ary search trees, median-of-(2t + 1) BSTs, Devroye’s simplex trees and

  • quadtrees. Technicalities are more involved.

All asymptotic tools needed are based on solving asymptotically (exact solution being less useful) the underlying double-indexed recurrence. No martingale in general

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.52/64

slide-134
SLIDE 134

GENERALITY (METHODOLOGY)

✎ m-ary search trees, simplex trees and

median-of-(2t + 1) BSTs: GF satisfies a DE of Cauchy-Euler type; but more uniform estimates are needed.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.53/64

slide-135
SLIDE 135

GENERALITY (METHODOLOGY)

✎ m-ary search trees, simplex trees and

median-of-(2t + 1) BSTs: GF satisfies a DE of Cauchy-Euler type; but more uniform estimates are needed.

✎ quadtrees: extend Flajolet et al. (1993)’s direct DE and

Flajolet et al. (1995)’s Euler-transform approaches for asymptotics of moments.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.53/64

slide-136
SLIDE 136

GENERALITY (PHENOMENA) For the profiles of these random trees of logarithmic depth

  • 1. bimodality of variance near the central range

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.54/64

slide-137
SLIDE 137

GENERALITY (PHENOMENA) For the profiles of these random trees of logarithmic depth

  • 1. bimodality of variance near the central range
  • 2. cv in distribution in the range when mean → ∞

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.54/64

slide-138
SLIDE 138

GENERALITY (PHENOMENA) For the profiles of these random trees of logarithmic depth

  • 1. bimodality of variance near the central range
  • 2. cv in distribution in the range when mean → ∞
  • 3. cv of all moments in some smaller range, say [α1, α2]

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.54/64

slide-139
SLIDE 139

GENERALITY (PHENOMENA) For the profiles of these random trees of logarithmic depth

  • 1. bimodality of variance near the central range
  • 2. cv in distribution in the range when mean → ∞
  • 3. cv of all moments in some smaller range, say [α1, α2]
  • 4. convergence of all moments in the two extreme cases

(to the derivatives of the fixed-point equation)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.54/64

slide-140
SLIDE 140

GENERALITY (PHENOMENA) For the profiles of these random trees of logarithmic depth

  • 1. bimodality of variance near the central range
  • 2. cv in distribution in the range when mean → ∞
  • 3. cv of all moments in some smaller range, say [α1, α2]
  • 4. convergence of all moments in the two extreme cases

(to the derivatives of the fixed-point equation)

  • 5. nonexistence of limit law when k = α2 log n + O(1)

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.54/64

slide-141
SLIDE 141

ARE THERE LOG-TREES WITH DIFFERENT BEHAVIOR FOR THEIR PROFILE?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.55/64

slide-142
SLIDE 142

REPRESENTATIVE CLASSES OF INCREASING TREES Three representative classes of increasing trees (Bergeron, Flajolet, Salvy, 1992):

✔ recursive trees: y′ = ey

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.56/64

slide-143
SLIDE 143

REPRESENTATIVE CLASSES OF INCREASING TREES Three representative classes of increasing trees (Bergeron, Flajolet, Salvy, 1992):

✔ recursive trees: y′ = ey ✔ binary increasing trees: y′ = (1 + y)2

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.56/64

slide-144
SLIDE 144

REPRESENTATIVE CLASSES OF INCREASING TREES Three representative classes of increasing trees (Bergeron, Flajolet, Salvy, 1992):

✔ recursive trees: y′ = ey ✔ binary increasing trees: y′ = (1 + y)2 ☛ ordered recursive (or heap-ordered, plane-oriented)

trees: y′ =

1 1 − y

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.56/64

slide-145
SLIDE 145

HEAP-ORDERED (ORDERED RECURSIVE) TREES The profile Vn,k satisfies the recurrence

Vn,k

d

= VJn,k−1 + V∗

n−Jn,k,

where (Cn :=

2n−2

n−1

  • /n)

P(Jn = j) = 2(n − j)CjCn−j nCn (1 ≤ j < n).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.57/64

slide-146
SLIDE 146

HEAP-ORDERED (ORDERED RECURSIVE) TREES The profile Vn,k satisfies the recurrence

Vn,k

d

= VJn,k−1 + V∗

n−Jn,k,

where (Cn :=

2n−2

n−1

  • /n)

P(Jn = j) = 2(n − j)CjCn−j nCn (1 ≤ j < n).

Note that Jn

d

− → J, where P(J = h) = 2Ch/4h, but no

convergence of any moment of order ≥ 1.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.57/64

slide-147
SLIDE 147

METHOD OF MOMENTS: k = o(log n) The method of moments applies: for 1 ≤ k = o(log n)

Vn,k √n(1

2 log n)k−1/(k − 1)! −

→ R,

where R is Rayleigh distributed with the density te−t2/4/2.

0.1 0.2 0.3 0.4 1 2 3 4 5 6

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.58/64

slide-148
SLIDE 148

METHOD OF MOMENTS: 0 ≤ α ≤ 1/2 If 0 ≤ α ≤ 1/2 then

Vn,k E(Vn,k)

m

− → Vα, for some Vα whose

moments can be recursively computed. Same bimodality for variance, as well as other log-profile phenomena as above for α = 1/2.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.59/64

slide-149
SLIDE 149

METHOD OF MOMENTS: 0 ≤ α ≤ 1/2 But so far no contraction proof for 1/2 < α < c, where

c ≈ 1.79556 solves the equation 1

2 + z − z log(2z) = 0,

because it’s not obvious how to write a fixed-point equation from the moment sequence of the limit law.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.60/64

slide-150
SLIDE 150

METHOD OF MOMENTS: 0 ≤ α ≤ 1/2 But so far no contraction proof for 1/2 < α < c, where

c ≈ 1.79556 solves the equation 1

2 + z − z log(2z) = 0,

because it’s not obvious how to write a fixed-point equation from the moment sequence of the limit law. New method is needed for proving the convergence in distribution (anticipated) of

Vn,k E(Vn,k)

in the range (1/2, c).

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.60/64

slide-151
SLIDE 151

PROFILES OF RANDOM TREES WITH √n HEIGHT Much has been known for such trees (random binary trees being typical): Stepanov (1969), Tak´ acs (1991), Aldous (1993), Drmota, Gittenberger (1997), Pitman (1998), Gittenberger (1998), Kersting (1998), . . .

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.61/64

slide-152
SLIDE 152

PROFILES OF RANDOM TREES WITH √n HEIGHT Much has been known for such trees (random binary trees being typical): Stepanov (1969), Tak´ acs (1991), Aldous (1993), Drmota, Gittenberger (1997), Pitman (1998), Gittenberger (1998), Kersting (1998), . . . For example, for random binary trees,

       Xn,k k/4

d

− → Gamma(1),

if k → ∞, k = o(√n),

2 √ 2Xn,k √n

d

− → Stepanovα,

if k

√n → 2 √ 2α.

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.61/64

slide-153
SLIDE 153

OPEN QUESTIONS What happens at the boundary α = α−, α+?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.62/64

slide-154
SLIDE 154

OPEN QUESTIONS What happens at the boundary α = α−, α+? More “humps” in the central range for higher moments?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.62/64

slide-155
SLIDE 155

OPEN QUESTIONS What happens at the boundary α = α−, α+? More “humps” in the central range for higher moments? Are there good process approximations?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.62/64

slide-156
SLIDE 156

OPEN QUESTIONS What happens at the boundary α = α−, α+? More “humps” in the central range for higher moments? Are there good process approximations? How to prove almost-sure convergence in general?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.62/64

slide-157
SLIDE 157

OPEN QUESTIONS What happens at the boundary α = α−, α+? More “humps” in the central range for higher moments? Are there good process approximations? How to prove almost-sure convergence in general? More asymptotic transfer for the double-indexed recurrence?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.62/64

slide-158
SLIDE 158

OPEN QUESTIONS What happens at the boundary α = α−, α+? More “humps” in the central range for higher moments? Are there good process approximations? How to prove almost-sure convergence in general? More asymptotic transfer for the double-indexed recurrence? How to plot or simulate the limit law?

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.62/64

slide-159
SLIDE 159

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.63/64

slide-160
SLIDE 160

PROFILE OF RANDOM TREES: A RICH SOURCE OF INTRIGUING PHENOMENA

Profile of random recursive trees and random binary search trees, INRIA, 26/04/2004 – p.64/64