Dependence and phase changes in random m -ary search trees
Hua-Huai Chern, Michael Fuchs, Hsien-Kuei Hwang, Ralph Neininger
DDependence and phase changes in random m -arysearch trees Hua-Huai ChernDepartment of Computer ScienceNational Taiwan Ocean UniversityKeelung 202Taiwan Michael Fuchs ∗ Department of Applied MathematicsNational Chiao Tung UniversityHsinchu 300TaiwanHsien-Kuei Hwang † Institute of Statistical ScienceAcademia SinicaTaipei 115Taiwan Ralph Neininger ‡ Institute for MathematicsGoethe University60054 Frankfurt a.M.GermanyOctober 28, 2018
Abstract
We study the joint asymptotic behavior of the space requirement and the total pathlength (either summing over all root-key distances or over all root-node distances) in ran-dom m -ary search trees. The covariance turns out to exhibit a change of asymptotic be-havior: it is essentially linear when (cid:54) m (cid:54) but becomes of higher order when m (cid:62) . Surprisingly, the corresponding asymptotic correlation coefficient tends to zerowhen (cid:54) m (cid:54) but is periodically oscillating for larger m , and we also prove asymp-totic independence when (cid:54) m (cid:54) . Such a less anticipated phenomenon is not excep-tional and we extend the results in two directions: one for more general shape parameters,and the other for other classes of random log-trees such as fringe-balanced binary searchtrees and quadtrees. The methods of proof combine asymptotic transfer for the underlyingrecurrence relations with the contraction method. AMS 2010 subject classifications.
Primary 60F05, 68Q25; secondary 68P05, 60C05, 05A16.
Key words. m -ary search tree, correlation, dependence, recurrence relations, fringe-balancedbinary search tree, quadtree, asymptotic analysis, limit law, asymptotic transfer, contractionmethod. ∗ Partially supported by the Ministry of Science and Technology, Taiwan under the grant MOST-103-2115-M-009-007-MY2. † This author’s research stay at J. W. Goethe-Universit¨at was partially supported by the Simons Foundation andby the Mathematisches Forschungsinstitut Oberwolfach. ‡ Supported by DFG grant NE 828/2-1. a r X i v : . [ m a t h . P R ] F e b Introduction
The m -ary search trees are a class of data structures introduced by Muntz and Uzgalis [35]in 1971 in computer algorithms to support efficient searching and sorting of data; see the nextsection for more details. When constructed from a random permutation of n elements, the spacerequirement (total number of nodes to store the input) S n of such random m -ary search trees ( m (cid:62) ) is known to exhibit a phase change phenomenon : its distribution is asymptoticallyGaussian for large n when the branching factor m satisfies (cid:54) m (cid:54) but does not approacha limit law when m (cid:62) ; see [8, 22, 30, 31] and the references therein. On the other hand,it is also known that the total key path length K n (the sum over all distances from the root toany key ) does not change its limiting behavior when m varies, and tends asymptotically, afterproperly centered and normalized, to a limit law for each m (cid:62) . Another closely related shapemeasure, the total node path length N n (summing over all distances from the root to any node )also follows asymptotically a very similar behavior.Our motivating question was “how does K n or N n depend on S n ?” Surprisingly, despitethe strong dependence of the definition of N n on S n (see (2)), we show that the correlationcoefficient ρ ( S n , N n ) satisfies ρ ( S n , N n ) ∼ (cid:40) , if (cid:54) m (cid:54) F ρ ( β log n ) , if m (cid:62) , (1)where F ρ ( t ) is a π -periodic function and β = β m is a structural constant depending on m .The same type of results also holds for ρ ( S n , K n ) . In words, N n and S n are asymptoticallyuncorrelated for (cid:54) m (cid:54) and their correlation fluctuates (between − and ) for m (cid:62) ;see Figure 1 for an illustration.Figure 1: The periodic functions F ρ (2 πt ) for m = 27 , . . . , (left) and F ρ ( β log n ) for m =27 , , . . . , (right). One reason why the above result (1) may seem less or even counter-intuitive is becauseof the seemingly strong dependence of N n on S n in the recursive equations satisfied by bothrandom variables (cid:40) S n d = S (1) I + · · · + S ( m ) I m + 1 ,N n d = N (1) I + · · · + N ( m ) I m + S (1) I + · · · + S ( m ) I m , (2)where the ( S ( r ) i , N ( r ) i ) ’s are independent copies of ( S i , N i ) , respectively, also independent of ( I , . . . , I m ) , and P ( I = i , . . . , I m = i m ) = 1 (cid:0) nm − (cid:1) , (3)2hen i , . . . , i m (cid:62) and i + · · · + i m = n − m + 1 . Intuitively, we expect, from the aboverelations, that the node path length N n would have a strong correlation with S n .While one might ascribe this seemingly less intuitive result to the possibly nonlinear de-pendence between N n and S n , we enhance such an uncorrelation by a stronger joint limit lawfor ( S n , N n ) for (cid:54) m (cid:54) , which further accents the asymptotic independence between N n and S n ; for m (cid:62) , they are asymptotically dependent and we will derive a precise character-ization of their joint asymptotic distributions. See Section 4 for a more precise description ofthe joint asymptotic behaviors of ( S n , N n ) and ( S n , K n ) .Let α denote the real part of the second largest zero (in real parts) of the indicial equation Λ( z ) = 0 , where Λ( z ) = z ( z + 1) · · · ( z + m − − m ! . (4)Then α < for m < and < α < for (cid:54) m (cid:54) ; see Table 1. Also α → as m → ∞ ; see [30, Sec. 3.3] for more properties of α . The main reason that ρ ( S n , N n ) → for m α − − . − . − . − .
260 0 .
101 0 .
366 0 . m
11 12 13 14 15 16 17 18 α .
726 0 .
852 0 .
955 1 .
040 1 .
112 1 .
173 1 .
226 1 . m
19 20 21 22 23 24 25 26 α .
313 1 .
348 1 .
380 1 .
409 1 .
435 1 .
458 1 .
479 1 . Table 1:
Approximate numerical values of α = α m for (cid:54) m (cid:54) . (cid:54) m (cid:54) is roughly that their covariance is of order max { n log n, n α } (see Theorem 2.3below), while the standard deviations for S n and N n are of orders √ n and n , respectively. Sothat ρ ( S n , N n ) = O (cid:16) n − log n (cid:17) , if (cid:54) m (cid:54) O (cid:16) n − + α (cid:17) , if (cid:54) m (cid:54) , which tends to zero in both cases. Briefly, the large quadratic variance of N n is the majorcause of the asymptotic independence between S n and N n for (cid:54) m (cid:54) .Such a change from being asymptotically independent to being asymptotically dependentunder a varying structural parameter is not an exception. We will extend our study to fringe-balanced binary search trees and quadtrees; a typical related instance states that: the number ofcomparisons (or exchanges) used by the median-of- (2 t + 1) quicksort is asymptotically inde-pendent of the number of partitioning stages when (cid:54) t (cid:54) , but is asymptotically dependentfor t (cid:62) . M -ary search trees We briefly introduce m -ary search trees in this section and then describe the random variableswe are studying in this paper.An m -ary tree is either empty or comprises of a single node called the root, together with anordered m -tuple of subtrees, each of which is, by definition, an m -ary tree. Given a sequence3 ,
61 4 , ,
83 9 ,
10 2 , ,
61 3 5 7 , , Figure 2:
Three m -ary search trees for the sequence { , , , , , , , , , } : m = 2 (left), m = 3 (middle), and m = 4 (right). of numbers, say { x , . . . , x n } , we construct an m -ary search tree by the following procedure, m (cid:62) . If (cid:54) n < m , then all keys are stored in the root. If n (cid:62) m the first m − keys are sorted and stored in the root, the remaining keys are directed to the m subtrees, eachcorresponding to one of the m intervals formed by the m − sorted keys in the root node; seeFigure 2 for an illustration (the rectangular nodes denote yet empty subtrees of full nodes). Ifthe m − numbers in the root are x j < · · · < x j m − , then the keys directed to the i th subtreeall have their values lying between x j i − and x j i , where x j := 0 and x j m := n + 1 . All subtreesare themselves m -ary search trees by definition. For more details, see Mahmoud [30].While the practical usefulness of m -ary search trees is largely overshadowed by their bal-anced counterparts such as B -trees, they have been a source of many interesting phenomena,which are to some extent universal. The study of m -ary search trees is thus of fundamental andprototypical value. Furthermore, the close connection between m -ary search trees and general-ized quicksort adds an extra dimension to the richness of diverse variations and their asymptoticbehaviors. Assume that the input sequence { x , . . . , x n } is a random permutation, where all n ! permuta-tions are equally likely. The resulting m -ary search tree constructed from the given sequence isthen called a random m -ary search tree. The major shape parameters of particular algorithmicinterest include the depth, the height, the space requirement, the total path length, and the pro-file; see [11, 30] for more information. We are concerned in this paper with the following threerandom variables. • S n (space requirement): the total number of nodes used to store the input; the three treesin Figure 2 have S equal to , , , respectively. If m = 2 , then S n ≡ n ; if m (cid:62) , wecan compute S n recursively by S = 0 , and S n d = (cid:40) , if (cid:54) n < m,S (1) I + · · · + S ( m ) I m + 1 , if n (cid:62) m, (5)where the S ( r ) i ’s are independent copies of S i , (cid:54) r (cid:54) m , (cid:54) i (cid:54) n − m + 1 , andindependent of ( I , . . . , I m ) defined in (3).4 K n (key path length, KPL): the sum of the distance between the root and each key; for thetrees in Figure 2, K = { , , } , respectively. For m (cid:62) , K n satisfies the recurrence K n d = (cid:40) , if n < m,K (1) I + · · · + K ( m ) I m + n − m + 1 , if n (cid:62) m, (6)where the K ( r ) i ’s are independent copies of K i , (cid:54) r (cid:54) m, (cid:54) i (cid:54) n − m + 1 ,independent of ( I , . . . , I m ) . • N n (node path length, NPL): the sum of the distance between the root and each node; sothat N = { , , } for the three trees in Figure 2. Obviously, N n = K n when m = 2 .When m (cid:62) , N n d = (cid:40) , if n < m,N (1) I + · · · + N ( m ) I m + S (1) I + · · · + S ( m ) I m , if n (cid:62) m, (7)where the ( N ( r ) i , S ( r ) i ) ’s are independent copies of ( N i , S i ) , (cid:54) r (cid:54) m, (cid:54) i (cid:54) n − m + 1 , independent of ( I , . . . , I m ) .While the first two random variables have been widely studied in the literature, NPL wasonly considered previously in [4, 21] in connection with the process of cutting trees. In additionto this, our interest was to understand the extent to which the asymptotic independence forsmall m between S n and K n subsists when the “toll function” changes from a linear functionto a function that is random and may depend on S n . Let H m := (cid:80) (cid:54) j (cid:54) m j − . Knuth [27, § E ( S n ) ∼ φn, where φ := 12( H m − , (see also [1]). Here φ denotes the “occupancy constant”, which will appear all over our analysis.Mahmoud and Pittel [31] improved the result and derived an identity for E ( S n ) , which impliesin particular that E ( S n ) = φ ( n + 1) − m − O (cid:0) n α − (cid:1) , where α has the same meaning as in Introduction; see (4). They also discovered and proved thesurprising result for the variance V ( S n ) ∼ (cid:40) C S n, if (cid:54) m (cid:54) F ( β log n ) n α − , if m (cid:62) , where C S is a constant depending on m , F is a π -periodic function given in (24), α + iβ is the second largest zero (in real part) with β > of the equation Λ( z ) = 0 (see (4)), and α − > for m (cid:62) . See also [9, 25, 33] for a closely related fragmentation model with thesame asymptotic behavior. A central limit theorem for S n was then proved for (cid:54) m (cid:54) in528, 31]; see also [30] for more details. Their approach is based on an inductive approximationargument.By the method of moments, two authors of this paper re-proved in [8] the central limit the-orem for S n when (cid:54) m (cid:54) ; the same approach was also used to establish the nonexistenceof a limit law for S n due to inherent oscillations. Moreover, the convergence rates to the normaldistribution were characterized in [22] by a refined method of moments, which undergo furtherchange of behaviors.Then several different approaches were developed in the literature for a deeper understand-ing of the “phase change” at m = 26 ; these include martingale [6], renewal theory [25], urnmodels [23, 32], contraction method [13, 39], method of moments [22], statistical physics[9, 33], etc.On the other hand, the KPL for general m (cid:62) was first studied by Mahmoud [29] and heproved E ( K n ) = 2 φn log n + c n + o ( n ) , for some explicitly computable constant c ; see (21). The variance was computed in [30, § H (2) m := (cid:80) (cid:54) j (cid:54) m j − ) V ( K n ) ∼ C K n , where C K = 4 φ (cid:16) ( m +1) H (2) m − m − − π (cid:17) . (8)The corresponding limit law was characterized in [38] by the contraction method K n − E ( K n ) n d −→ K, (9)where K is given by the recursive distributional equation (44); see also [4, 34] for a generalframework.For NPL N n , Broutin and Holmgren [4] proved that E ( N n ) = 2 φ n log n + c n + o ( n ) , for some constant c (for which no numerical value was provided); a series expression of c is given in [21, p. 156]. We will give an alternative proof of this result below with tools from[8, 14]. Our approach makes the computation of c feasible (although its exact value is notneeded); see (27).It should be mentioned that there is a large literature on K n when m = 2 because it isidentical to the comparison cost used by quicksort. Many fine results were obtained; see, forexample, the recent papers [3, 12, 17, 20, 37, 41] and the references therein for more informa-tion. We state in this section our results for the covariance and correlation between the space require-ment and the total path lengths (KPL and NPL). The proofs and the tools needed will be givenin the next sections.Unlike the space requirement S n whose variance changes its asymptotic behavior for m (cid:62) , the covariance Cov( S n , K n ) changes its asymptotic behavior at m = 14 .6 heorem 2.1. The covariance between S n and K n satisfies Cov( S n , K n ) ∼ (cid:40) C R n, if (cid:54) m (cid:54) F ( β log n ) n α , if m (cid:62) where C R is a suitable constant and F ( z ) is a π -periodic function given in (25) below. This result has the following consequence.
Corollary 2.2.
The correlation coefficient between S n and K n satisfies ρ ( S n , K n ) → , if (cid:54) m (cid:54) ∼ F ( β log n ) (cid:112) C K F ( β log n ) , if m (cid:62) , where C K > is given in (8) . See Figure 1 for two different plots for the periodic functions when m (cid:62) .The same consideration extends easily to clarify the correlation between space requirementand NPL. Theorem 2.3.
The covariance between S n and N n satisfies Cov( S n , N n ) ∼ (cid:40) φC S n log n, if (cid:54) m (cid:54) φF ( β log n ) n α , if m (cid:62) , where C S is as in Section 2.2. Moreover, the variance of N n satisfies V ( N n ) ∼ φ C K n . Notice the appearance of an extra log n factor when (cid:54) m (cid:54) , which reflects theadditional random effect introduced by the toll function in (7). These estimates imply thefollowing consequence. Corollary 2.4.
The correlation coefficient ρ ( S n , N n ) satisfies ρ ( S n , N n ) → , if (cid:54) m (cid:54) ∼ ρ ( S n , K n ) ∼ F ( β log n ) (cid:112) C K F ( β log n ) , if m (cid:62) . The last relation suggests considering the correlation between K n and N n . Corollary 2.5.
The random variable K n is asymptotically linearly correlated to N n ρ ( K n , N n ) → . (cid:107) N n − φK n − ( E ( N n − φK n )) (cid:107) = o ( n ) which then by Slutsky’s theorem implies that (cid:18) K n − E ( K n ) n , N n − E ( N n ) n (cid:19) d −→ ( K, φK ); see (9), Section 4.3 and 4.4.These results will be proved by working out the asymptotics of the corresponding recur-rence relations, which all have the same form a n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j a j + b n , ( n (cid:62) m − , where π n,j = (cid:0) n − − jm − (cid:1)(cid:0) nm − (cid:1) (0 (cid:54) j (cid:54) n − m + 1) is a probability distribution, and { b n } is a given sequence (referred to as the toll-function).For that asymptotic purpose, our key tools will rely on the asymptotic transfer techniques (see[8, 14]), which provide a direct asymptotic translation from the asymptotic behaviors of b n tothose of a n . The remaining analysis will then consist of simplifying some multiple Dirichlet’sintegrals.Since Pearson’s product-moment correlation coefficient ρ is known to be poor in measuringnonlinear dependence between two random variables, we go further by considering the jointlimit laws for ( S n , K n ) and ( S n , N n ) , which exhibit a change of behavior depending on whether (cid:54) m (cid:54) (convergent case) or m (cid:62) (periodic case): they are asymptotically independentin the former case but dependent in the latter. Theorem 2.6.
Assume (cid:54) m (cid:54) . Let ( X n ) n ∈ { ( K n ) n , ( N n ) n } and Q n = ( X n , S n ) denotethe vector of KPL or NPL and the space requirement used by a random m -ary search tree.Then the convergence in distribution holds: Cov( Q n ) − / ( Q n − E [ Q n ]) d −→ ( X, N ) , (10) where N has the standard normal distribution and the limit law ( X, N ) is described inLemma 4.2; moreover, X and N are independent. Theorem 2.7.
Assume m (cid:62) . Let ( X n ) n ∈ { ( K n ) n , ( N n ) n } and Y n := (cid:18) X n − E [ X n ] ι X n , S n − φnn α − (cid:19) with ι X = 1 for ( X n ) n = ( N n ) n and ι X = φ − for ( X n ) n = ( K n ) n . Then we have (cid:96) ( Y n , ( X, (cid:60) ( n iβ Λ))) → , where β is as in Section 2.2 and ( X, Λ) is a random vector whose distribution is specified as theunique fixed point solution appearing in Lemma 4.1 for the choice γ = (0 , θ ) ( θ being definedbelow in (28)). contraction method (see [36]) where we use the above moment asymptotics as input and combine well-knownestimates within the minimal L -metric for the convergent case (as in [40]), and those withestimates for the periodic case (as in [13]). Similar proof techniques related to periodic distri-butional behaviors are also applied in [25, Theorem 1.3(iii)] and [26, Theorem 6.10]. If one isonly interested in the asymptotic (univariate) distribution of the NPL N n (the case of the KPLbeing known before), there are more direct proofs which we also discuss in Sections 4.3 and4.4.Our study of the dependence of random variables on random m -ary search trees can beextended in at least two directions by the same methods used in this paper, namely, asymptotictransfer techniques and the contraction method. • Extension to more general linear and n log n shape measures : That the asymptotic co-variance undergoes a phase change after m = 13 and the asymptotic correlation under-goes a phase change after m = 26 is not restricted to the space requirement and KPL orNPL. Indeed, we can replace the space requirement by many other linear shape measuressuch as the number of leaves, the number of nodes of a specified type, the number ofoccurrences of a fixed pattern, etc. (see [8] for more examples), and KPL or NPL byother shape measures with mean of order n log n such as summing over the root-node orroot-key distance for certain specified nodes or patterns and weighted path length. • Extension to other random trees of logarithmic height : the same change of asymptoticbehaviors from being independent to being dependent under a varying structural pa-rameter also occurs in other classes of random log-trees; we content ourselves with thebrief discussion of two classes of random trees: fringe-balanced binary search trees and quadtrees . The behaviors will be however very different for the classes of trees where theunderlying distribution of the subtree sizes are dictated by a binomial distribution, whichwill be examined elsewhere; see a companion paper [18] for more information.This paper is organized as follows. We prove in the next section our results for the co-variances and the correlations. These results are then used to study the bivariate distributionalasymptotics in Section 4 by the multivariate contraction method (see [36]). Finally, in Sec-tion 5, we discuss the dependence and phase changes in fringe-balanced binary search treesand in quadtrees, where for the former, we study the joint behavior of the size and total pathlength, while for the latter (since the size is a constant) we consider the joint behavior of thenumber of leaves and total path length. Also we include a brief discussion for extending thestudy and results to other shape parameters in Section 5.
We prove in this section Theorems 2.1 and 2.3 for the covariances Cov ( S n , K n ) and Cov ( S n , N n ) ,respectively. We collect here the notations to be used in the proofs. Let m (cid:62) be a fixed integer. For n (cid:62) m , denote by I ( n ) = ( I ( n )1 , . . . , I ( n ) m ) the vector of the number of keys inserted in the m m -ary search tree with n keys. When the dependenceon n is obvious, we write simply ( I , . . . , I m ) . Generate independently n uniform randomvariables U , . . . , U n on [0 , . Store the first m − elements U , . . . , U m − in the root-node ofthe tree. Then they decompose the unit interval [0 , into spacings of lengths V , . . . , V m , where V j = U ( j ) − U ( j − for j = 1 , . . . , m with U (0) := 0 , U ( m ) := 1 and U ( j ) for j = 1 , . . . , m − arethe order statistics of U , . . . , U m − . The uniform permutation model implies, that, conditionalon U , . . . , U m − , the vector I ( n ) has the multinomial distribution with success probabilities V , . . . , V m , namely, we have ( I , . . . , I m ) d = M ( n − m + 1; V , . . . , V m ) . In particular, we have the convergence I r n −→ V r , (11)for all r = 1 , . . . , m , where the convergence is in L p for all (cid:54) p < ∞ . Note that we also have(3) for all m -tuples i , . . . , i m (cid:62) with i + · · · + i m = n − m + 1 and all n (cid:62) m .For each of the subtrees, the randomness (uniformity) is preserved; more precisely, condi-tional on the number of keys inserted in a subtree, each subtree has the same distribution asa random m -ary search tree of that number of keys in the uniform model. Moreover, condi-tional on ( I , . . . , I m ) , the subtrees are independent. This can be seen by switching back tothe ranks { , . . . , n } of the input elements, and then by checking that a uniform random per-mutation yields independent permutations on the respective ranges. This recursive structureof the random m -ary search tree implies the recursive relations for S n , K n and N n given in(5)–(7), where the summands appearing on the right-hand sides, namely, S (1) j , . . . , S ( m ) j and K (1) j , . . . , K ( m ) j and N (1) j , . . . , N ( m ) j have the same distributions as S j and K j and N j , respec-tively. Furthermore, the triples (cid:16)(cid:0) S ( r ) j (cid:1) (cid:54) j (cid:54) n − m +1 , (cid:0) K ( r ) j (cid:1) (cid:54) j (cid:54) n − m +1 , (cid:0) N ( r ) j (cid:1) (cid:54) j (cid:54) n − m +1 (cid:17) areindependent for r = 1 , . . . , m and independent of ( I , . . . , I m ) . Finally, the recursive structureof the m -ary search tree implies recurrences satisfied by their joint distributions. In particular,the pair Q n := ( N n , S n ) satisfies the recurrence ( Q n ) t d = (cid:88) (cid:54) r (cid:54) m (cid:104) (cid:105) (cid:16) Q ( r ) I r (cid:17) t + (cid:18) (cid:19) , ( n (cid:62) m ) , (12)where, as in (5)–(7), the Q ( r ) j ’s are distributed as Q j for all (cid:54) r (cid:54) m and (cid:54) j (cid:54) n − m + 1 ,and the (cid:0) Q ( r ) j (cid:1) (cid:54) j (cid:54) n − m +1 are independent for r = 1 , . . . , m and independent of ( I , . . . , I n ) .The recurrence satisfied by the pair Z n := ( K n , S n ) is ( Z n ) t d = (cid:88) (cid:54) r (cid:54) m (cid:104) (cid:105) (cid:16) Z ( r ) I r (cid:17) t + (cid:18) n − m + 11 (cid:19) , ( n (cid:62) m ) , (13)with conditions on independence and identical distributions similar to (12).10 .2 Asymptotic transfer and Dirichlet integrals Starting from the distributional recurrences (5) and (6), we see that all centered and non-centered moments satisfy the same recurrence of the following type a n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j a j + b n , π n,j = (cid:0) n − − jm − (cid:1)(cid:0) nm − (cid:1) , (14)for n (cid:62) m − , where { b n } n (cid:62) m − is a given sequence. The asymptotics of a n can be system-atically characterized by that of b n through the use of the following transfer techniques; seeProposition 7 in [8] and Theorem 2.4 in [14] for details. Proposition 3.1.
Assume that a n satisfies (14) with finite initial conditions a , . . . , a m − . Define b n := a n for (cid:54) n (cid:54) m − .(i) Assume b n = c ( n + 1) + t n , where c ∈ C . Then the conditions t n = o ( n ) and (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:88) n (cid:62) t n n − (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) < ∞ are both necessary and sufficient for a n = 2 cφnH n + c (cid:48) n + o ( n ) , where c (cid:48) = 2 φ (cid:88) j (cid:62) t j ( j + 1)( j + 2) + c − cφ + 2 c ( H (2) m − φ ; (ii) if b n ∼ cn v , where v > , then a n ∼ c − m !Γ( v +1)Γ( v + m ) n v . In particular, when c = 0 in ( i ) , then we see that a n is asymptotically linear a n n ∼ φ (cid:88) j (cid:62) b j ( j + 1)( j + 2) iff b n = o ( n ) and (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:88) n (cid:62) b n n − (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) < ∞ . We will be dealing with Dirichlet integrals of the following type I ( u, v ) := (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:32) (cid:88) (cid:54) l (cid:54) m x u − l (cid:33) (cid:32) (cid:88) (cid:54) r (cid:54) m x v − r (cid:33) d x , ( (cid:60) ( u ) , (cid:60) ( v ) > . Here d x is an abbreviation for d x · · · d x m − . Such integrals have a closed-form expression. Lemma 3.2.
For m (cid:62) and (cid:60) ( u ) , (cid:60) ( v ) > , I ( u, v ) = m Γ( u + v −
1) + m ( m − u )Γ( v )Γ( u + v + m − . (15)11 roof. First, the claim is easily proved for m = 2 . Assume m (cid:62) . Then, by symmetry, I ( u, v ) = (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:0) mx u + v − + m ( m − x u − x v − (cid:1) d x = m ( m − (cid:90) x u + v − (1 − x ) m − d x + m ( m − m − (cid:90) (cid:90) − x x u − x v − (1 − x − x ) m − d x d x = m Γ( u + v − u + v + m −
2) + m ( m − u )Γ( v )Γ( u + v + m − , which leads to (15).The following two identities will be needed below. (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:32) (cid:88) (cid:54) l (cid:54) m x u − l (cid:33) (cid:32) (cid:88) (cid:54) r (cid:54) m x r log x r (cid:33) d x = ∂∂v I ( u, v ) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) v =2 = m Γ( u )Γ( m + u ) ( uψ ( u + 1) + ( m − − γ ) − ( m + u − ψ ( m + u )) , (16)where ψ is the digamma function and γ is Euler’s constant. Similarly, (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:32) (cid:88) (cid:54) r (cid:54) m x r log x r (cid:33) d x = ∂ ∂u∂v I ( u, v ) (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) u = v =2 = H (2) m + 4 φ − m + 1 − ( m − π m + 1) . (17) We are now ready to prove Theorem 2.1.
Expected values of S n and K n . For convenience, let µ n := E ( S n ) and κ n := E ( K n ) . Then,by (5) and (6), for n (cid:62) m − µ n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j µ j + 1 ,κ n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j κ j + n − m + 1 , with the initial conditions µ = κ n = 0 for (cid:54) n (cid:54) m − and µ n = 1 for (cid:54) n (cid:54) m − .By applying Proposition 3.1(i), we obtain µ n ∼ φn, and κ n = 2 φn log n + c n + o ( n ) , (18)12or some constant c whose value matters less; see (21) below. The latter approximation is suf-ficient for all our purposes, but the former is not and we need the following stronger expansion(see [8, 31, 30]) µ n = φ ( n + 1) − m − (cid:88) (cid:54) k (cid:54) A k Γ( λ k ) n λ k − + o ( n α − ) , (19)where λ = α + iβ and λ := α − iβ and A k = 1 λ k ( λ k − (cid:80) (cid:54) j (cid:54) m − j + λ k . (20)Note that for (cid:54) m (cid:54) the constant term − m − (together with φ ) is the second-order termon the right-hand side of (19), while for larger m , it is absorbed in the o -term.On the other hand, although the explicit expression of c is not needed in this paper, weprovide its expression here since the known ones (see [29, 30]) are less explicit and it can beeasily obtained from Proposition 3.1: c = − − φ + 2 φ ( H (2) m −
1) + γ. (21) Variance and covariance.
To compute the asymptotics of the covariance, we first derive thecorresponding recurrences and then apply Proposition 3.1 of asymptotic transfer.First, let ¯ S n = S n − µ n and ¯ K n = K n − κ n . We consider the moment-generating function ¯ P n ( u, v ) := E (cid:16) e ¯ S n u + ¯ K n v (cid:17) . Then, using (5) and (6), we obtain for n (cid:62) m − P n ( u, v ) = 1 (cid:0) nm − (cid:1) (cid:88) j P j ( u, v ) · · · P j m ( u, v ) e ∆ j u + ∇ j v (22)with the initial conditions ¯ P n ( u, v ) = 1 for (cid:54) n (cid:54) m − . Here, j = ( j , . . . , j m ) is a vectorwith j , . . . , j m (cid:62) and j + · · · + j m = n − m + 1 (we use this notation throughout), ∆ j = 1 − µ n + (cid:88) (cid:54) l (cid:54) m µ j l , and ∇ j = n − m + 1 − κ n + (cid:88) (cid:54) l (cid:54) m κ j l . (23)Define V [ S ] n = V ( S n ) , V [ SK ] n = Cov( S n , K n ) , V [ K ] n = V ( K n ) . Then, by taking derivatives in (22), we obtain V [ X ] n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j V [ X ] j + b [ X ] n , ( X ∈ { S, SK, K } ) , where b [ S ] n = 1 (cid:0) nm − (cid:1) (cid:88) j ∆ j , b [ SK ] n = 1 (cid:0) nm − (cid:1) (cid:88) j ∆ j ∇ j , and b [ K ] n = 1 (cid:0) nm − (cid:1) (cid:88) j ∇ j . We first derive uniform asymptotic approximations for ∆ j and ∇ j .13 emma 3.3. Uniformly in j , ∆ j = (cid:88) (cid:54) k (cid:54) A k Γ( λ k ) n λ k − (cid:32) − (cid:88) (cid:54) r (cid:54) m (cid:18) j r n (cid:19) λ k − (cid:33) + o ( n α − ) , and ∇ j = n (cid:32) φ (cid:88) (cid:54) r (cid:54) m j r n log j r n (cid:33) + o ( n ) . Proof.
This follows from substituting the asymptotic approximations (18) and (19) into (23),and standard manipulations.
Asymptotics of V [ S ] n . Although the asymptotic behaviors of the variance of S n have beencomputed before, we re-derive them here by a different approach, which is easily amended forthe calculation of other variances and covariances.Consider first (cid:54) m (cid:54) . Then α < / . Moreover, from Lemma 3.3, b [ S ] n = O ( n α − ) = O ( n − ε ) , for some < ε < . . Consequently, by applying Proposition 3.1(i), V [ S ] n ∼ C S n, for some constant C S ; see [8] for a more explicit expression and the proof that C S > .On other hand, if m (cid:62) , since α > / , we then have, by Lemmas 3.2 and 3.3, b [ S ] n ∼ (cid:88) (cid:54) k ,k (cid:54) ( m − A k A k n λ k + λ k − Γ( λ k )Γ( λ k ) × (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:32) − (cid:88) (cid:54) l (cid:54) m x λ k − l (cid:33) (cid:32) − (cid:88) (cid:54) r (cid:54) m x λ k − r (cid:33) d x ∼ (cid:88) (cid:54) k ,k (cid:54) A k A k n λ k + λ k − Γ( λ k )Γ( λ k ) (cid:32) − m !Γ( λ k )Γ( λ k + m − − m !Γ( λ k )Γ( λ k + m − m !Γ( λ k + λ k − λ k + λ k + m −
2) + m !( m − λ k )Γ( λ k )Γ( λ k + λ k + m − (cid:33) . Note that m !Γ( λ k j )Γ( λ k j + m −
1) = 1 , (2 (cid:54) j (cid:54) . Applying Proposition 3.1(ii) term by term then gives V [ S ] n ∼ (cid:88) (cid:54) k ,k (cid:54) A k A k n λ k + λ k − Γ( λ k )Γ( λ k ) (cid:18) − m !( m − λ k )Γ( λ k )Γ( λ k + λ k + m − − m !Γ( λ k + λ k − (cid:19) =: F ( β log n ) n α − , F ( z ) := 2 | A | | Γ( λ ) | (cid:18) − m !( m − | Γ( λ ) | Γ(2 α + m − − m !Γ(2 α − (cid:19) + 2 (cid:60) (cid:18) A e iz Γ( λ ) (cid:18) − m !( m − λ ) Γ(2 λ + m − − m !Γ(2 λ − (cid:19)(cid:19) . (24) Asymptotics of V [ SK ] n . We now turn to V [ SK ] n . If (cid:54) m (cid:54) , then, by Lemma 3.3, b [ SK ] n = O ( n α ) , where α < . Consequently, by Proposition 3.1(i), V [ SK ] n ∼ C R n, for some constant C R . For the remaining range where m (cid:62) , we have α > , and, by Lemma3.3 and (16), b [ SK ] n ∼ (cid:88) (cid:54) k (cid:54) ( m − A k n λ k Γ( λ k ) (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:32) − (cid:88) (cid:54) l (cid:54) m x λ k − l (cid:33) (cid:32) φ (cid:88) (cid:54) r (cid:54) m x r log x r (cid:33) d x ∼ (cid:88) (cid:54) k (cid:54) A k n λ k Γ( λ k ) (cid:32) − φ m !Γ( λ k + 1)Γ( λ k + m ) (cid:8) mψ ( λ k + m ) − ψ ( λ k + 1) − ( m − − γ ) (cid:9)(cid:33) . Now, we apply Proposition 3.1(ii) and again after some straightforward simplifications V [ SK ] n ∼ F ( β log n ) n α , where F ( z ) := 2 φ (cid:60) (cid:32) ( λ + m − A e iz ( m − λ ) (cid:32) φ − λ λ + m − (cid:8) mψ ( λ + m ) − ψ ( λ + 1) − ( m − − γ ) (cid:9)(cid:33)(cid:33) . (25) Asymptotics of V [ K ] n . In a similar manner, we obtain, by Lemma 3.3, b [ K ] n ∼ ( m − n (cid:90) x + ··· + x m =10 (cid:54) x ,...,x m (cid:54) (cid:32) φ (cid:88) (cid:54) l (cid:54) m x l log x l (cid:33) d x ∼ φ n (cid:18) H (2) m − m + 1 − π ( m − m + 1) (cid:19) , where the last line follows from applying (15), (16) and (17). Applying again Proposition3.1(ii) gives V [ K ] n ∼ C K n , which completes the proof of Theorem 2.1. 15 .4 Correlation between space requirement and NPL The calculations in this case are similar to those for ρ ( S n , K n ) , so we only sketch the majorsteps needed. Briefly, most asymptotic estimates differ either by a factor of the occupancyconstant φ or its powers. The only exception is the additional factor log n appearing in thecovariance Cov( S n , N n ) (see (2.3)).Let ν n = E ( N n ) . Then ν n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j ν j + µ n − . Consequently, by the asymptotic estimate (19) and by applying Proposition 3.1(i), we obtain ν n = 2 φ n log n + c n + o ( n ) , (26)where, by Proposition 3.1, c = φc + 2 φ (cid:32) φ − m − (cid:88) (cid:54) (cid:96) (cid:54) m − A (cid:96) − λ (cid:96) (cid:33) , (27) c being given in (21) and the A (cid:96) ’s defined in (20). Indeed, consider the difference ξ n := ν n − φκ n , which then satisfies the same recurrence (14) but with the toll function η n := µ n − − φ ( n − m + 1) = φm − mm − (cid:88) (cid:54) (cid:96) Lemma 3.4. Uniformly in j , δ j = φn (cid:32) φ (cid:88) (cid:54) l (cid:54) m j l n log j l n (cid:33) + o ( n ) . Proof. By the definition of δ j and the estimates (19) and (26).Note that the expansion differs from that for ∇ j in Lemma 3.3 by an additional factor φ .If (cid:54) m (cid:54) , then, by Lemmas 3.3 and 3.4, b [ SN ] n = C S n + O (cid:0) n − ε (cid:1) , for a sufficiently small ε > . Thus, by Proposition 3.1 (i), V [ SN ] n ∼ C S n log nH m − . m (cid:62) . Then, again from Lemma 3.3 and Lemma 3.4 together with the knownasymptotics of V [ S ] n , we see that b [ SN ] n ∼ (cid:0) nm − (cid:1) (cid:88) j ∆ j δ j ∼ φ (cid:0) nm − (cid:1) (cid:88) j ∆ j ∇ j ∼ φb [ SK ] n . Thus we deduce, as in the proof for V [ SK ] n , V [ SN ] n ∼ φV [ SK ] n ∼ φF ( β log n ) n α . Similarly, we have b [ N ] n ∼ (cid:0) nm − (cid:1) (cid:88) j δ j ∼ φ (cid:0) nm − (cid:1) (cid:88) j ∇ j ∼ φ b [ K ] n . Consequently, V [ N ] n ∼ φ V [ K ] n ∼ φ C K n . This completes the proof of Theorem 2.3. In this section, we identify the asymptotic joint distributional behaviors of the pairs ( N n , S n ) and ( K n , S n ) . Although the sequences ( N n ) and ( K n ) converge after normalization for all m (cid:62) with limit distributions depending on m , we split the analysis into two cases depending on (cid:54) m (cid:54) or m > due to the phase change in the limit behavior of S n . We discuss the pair ( N n , S n ) in detail in Sections 4.1 and 4.2. (the corresponding analysis for ( K n , S n ) is similarand we will not give details). Moreover, in Section 4.3, we will show that the univariate limitrandom variables of the normalized sequences ( N n ) and ( K n ) do have the same distribution.We introduce the following notation µ ( n ) := µ n = E [ S n ] = φ ( n + 1) + (cid:60) ( θn λ − ) + o (1 ∨ n α − ) , (28)where θ := 2 A / Γ( λ ) ; see (19). Similarly, write κ ( n ) = κ n = E ( K n ) and ν ( n ) = ν n = E ( N n ) . m (cid:62) We give in this section the precise formulation of the periodic case m (cid:62) of Theorem 2.7. Normalization. We first normalize the vector Q n = ( N n , S n ) as follows. Let Y := 0 and Y n := (cid:18) N n − E [ N n ] n , S n − φnn α − (cid:19) , ( n (cid:62) . n (cid:62) m − Y n ) t d = (cid:88) (cid:54) r (cid:54) m A ( n ) r (cid:16) Y ( r ) I ( n ) r (cid:17) t + b ( n ) , (29)where A ( n ) r := I ( n ) r n (cid:0) I ( n ) r (cid:1) α − n (cid:32) I ( n ) r n (cid:33) α − , b ( n ) := n (cid:32) (cid:88) (cid:54) r (cid:54) m (cid:0) ν (cid:0) I ( n ) r (cid:1) + φI ( n ) r (cid:1) − ν ( n ) (cid:33) − φ m − n α − , with assumptions on independence and on identical distributions as in Section 3.1. The expan-sion (26) implies n (cid:32) (cid:88) (cid:54) r (cid:54) m (cid:0) ν (cid:0) I ( n ) r (cid:1) + φI ( n ) r (cid:1) − ν ( n ) (cid:33) = φ + 2 φ (cid:88) (cid:54) r (cid:54) m I ( n ) r n log I ( n ) r n + o (1) . Moreover, by (11), we obtain the L -convergence I ( n ) n L −→ ( V , . . . , V m ) =: V. (30)This implies the L -convergences n (cid:32) (cid:88) (cid:54) r (cid:54) m (cid:0) ν (cid:0) I ( n ) r (cid:1) + φI ( n ) r (cid:1) − ν ( n ) (cid:33) → φ + 2 φ (cid:88) (cid:54) r (cid:54) m V r log V r =: b N , (31)and b ( n ) → (cid:18) b N (cid:19) , A ( n ) r → (cid:20) V r V α − r (cid:21) . (32)For our limit result for m (cid:62) , we first define a distribution which governs the asymptotics. The limiting map. To describe the asymptotic behavior of Q n , we use the following prob-ability distribution on the space R × C . Let M R × C denote the space of all distributions L ( Z, W ) on R × C and M R × C the subspace of distributions with finite second moment, i.e., (cid:107) ( Z, W ) (cid:107) := ( E [ Z ] + E [ | W | ]) / < ∞ . For γ = ( γ , γ ) ∈ R × C , let M R × C ( γ ) := (cid:110) L ( Z, W ) ∈ M R × C (cid:12)(cid:12)(cid:12) E [ Z ] = γ , E [ W ] = γ (cid:111) . We define the following map T N on M R × C : T N : M R × C → M R × C L ( Z, W ) (cid:55)→ L (cid:32) (cid:88) (cid:54) r (cid:54) m (cid:20) V r V λ − r (cid:21) (cid:18) Z ( r ) W ( r ) (cid:19) + (cid:18) b N (cid:19)(cid:33) , (33)19here ( Z (1) , W (1) ) , . . . , ( Z ( m ) , W ( m ) ) , V are independent, ( Z ( r ) , W ( r ) ) is distributed as ( Z, W ) for all r = 1 , . . . , m and b N is defined in (31). The (cid:107) · (cid:107) -norm induces the minimal L -metric (cid:96) by (cid:96) ( µ, ν ) := inf {(cid:107) X − Y (cid:107) : L ( X ) = µ, L ( Y ) = ν } , ( µ, ν ∈ M R × C ) . Given random variables X, Y , write for simplicity (cid:96) ( X, Y ) = (cid:96) ( L ( X ) , L ( Y )) . For any dis-tributions µ, ν ∈ M R × C , there exist optimal (cid:96) -couplings, i.e. random vectors Υ , Υ in R × C with (cid:96) ( µ, ν ) = (cid:107) Υ − Υ (cid:107) . Lemma 4.1. Assume m (cid:62) . For any γ ∈ R × C , the restriction of the map T N defined in(33) to M R × C ( γ ) is a (strict) contraction with respect to (cid:96) , and has a unique fixed point in M R × C ( γ ) .Proof. Let γ ∈ R × C be arbitrary. For µ ∈ M R × C ( γ ) , let Υ be a random variable withdistribution T ( µ ) . First, note that (cid:107) Υ (cid:107) < ∞ by independence and (cid:107) b N (cid:107) < ∞ (we evenhave (cid:107) b N (cid:107) ∞ < ∞ ). To see that E [Υ] = γ , note that E [ b N ] = 0 and (cid:80) (cid:54) r (cid:54) m V r = 1 almostsurely. Hence, we only need to show that E [ V λ − ] = 1 /m . Since V has density x (cid:55)→ ( m − − x ) m − for x ∈ [0 , , we see that E (cid:2) V λ − (cid:3) = (cid:90) ( m − − x ) m − x λ − d x = ( m − 1) Γ( m − λ )Γ( m + λ − 1) = 1 m , because Γ( m + λ − / Γ( λ ) = m ! . This implies that E [Υ] = γ , and thus T ( µ ) ∈ M R × C ( γ ) .This in turn implies that the restriction of T to M R × C ( γ ) maps into M R × C ( γ ) .That the restriction of T to M R × C ( γ ) is a contraction with respect to (cid:96) follows from astandard calculation, e.g., with a slight modification as in [36, Lemma 3.1]. Proof of Theorem 2.7: NPL. Denote by L ( X, Λ) the unique fixed point of the restriction of T N to M R × C ((0 , θ )) , with θ defined in (28). By Lemma 4.1, the distribution L ( X, Λ) as in thestatement of the Theorem is well-defined. The fixed point property of ( X, Λ) implies that (cid:18) X (cid:60) ( n iβ Λ) (cid:19) d = (cid:88) (cid:54) r (cid:54) m V r X ( r ) + b N (cid:88) (cid:54) r (cid:54) m (cid:60) ( n iβ V λ − r Λ ( r ) ) , (34)where ( V , . . . , V m ) , ( X (1) , Λ (1) ) , . . . , ( X ( m ) , Λ ( m ) ) are independent, and ( X ( r ) , Λ ( r ) ) are iden-tically distributed as ( X, Λ) .Define now three matrices (cid:101) A ( n ) r := I ( n ) r n (cid:32) I ( n ) r n (cid:33) α − , B ( n ) r := (cid:20) V r n iβ V λ − r (cid:21) , C ( n ) r := I ( n ) r n (cid:16) I ( n ) r (cid:17) λ − n α − , and write ∆( n ) := (cid:96) ( Y n , ( X, (cid:60) ( n iβ Λ))) . 20o bound ∆( n ) , we use the following coupling between the Y ( r ) j ’s appearing in the recurrence(29) and the quantities appearing on the right-hand side of (34). Note that for any pair ofdistributions on R , there always exists an optimal (cid:96) -coupling. We first fix the random vectors ( X (1) , Λ (1) ) , . . . , ( X ( m ) , Λ ( m ) ) . Then, for each j (cid:62) and r = 1 , . . . , m , we choose Y ( r ) j as anoptimal (cid:96) -coupling to ( X ( r ) , (cid:60) ( j iβ Λ ( r ) )) on R . This can be done such that the sequences (cid:16) Y (1) j , ( X (1) , (cid:60) ( j iβ Λ (1) )) (cid:17) j (cid:62) , . . . , (cid:16) Y ( m ) j , ( X ( m ) , (cid:60) ( j iβ Λ ( m ) )) (cid:17) j (cid:62) are independent and independent of ( I ( n ) , V , . . . , V m ) . Note that these couplings and indepen-dence assumptions do not violate equations (29) and (34). Hence, we obtain ∆( n ) (cid:54) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) (cid:88) (cid:54) r (cid:54) m A ( n ) r (cid:16) Y ( r ) I ( n ) r (cid:17) t + b ( n ) − (cid:60) (cid:32) (cid:88) (cid:54) r (cid:54) m B ( n ) r (cid:18) X ( r ) Λ ( r ) (cid:19) + (cid:18) b (cid:19)(cid:33)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) . Using the triangle inequality and writing the components as Y n = ( Y n, , Y n, ) , we obtain ∆( n ) (cid:54) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) (cid:88) (cid:54) r (cid:54) m (cid:18) (cid:101) A ( n ) r (cid:16) Y ( r ) I ( n ) r (cid:17) t − (cid:60) (cid:18) C ( n ) r (cid:18) X ( r ) Λ ( r ) (cid:19)(cid:19)(cid:19)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) + (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) (cid:88) (cid:54) r (cid:54) m (cid:60) (cid:18) C ( n ) r (cid:18) X ( r ) Λ ( r ) (cid:19)(cid:19) − (cid:60) (cid:18) B ( n ) r (cid:18) X ( r ) Λ ( r ) (cid:19)(cid:19)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13) + (cid:88) (cid:54) r (cid:54) m (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) ( I ( n ) r ) α − n Y ( r ) I ( n ) r , (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) + (cid:13)(cid:13)(cid:13)(cid:13) b ( n ) − (cid:18) b (cid:19)(cid:13)(cid:13)(cid:13)(cid:13) . The second and the fourth summand on the right-hand side tend to zero as n → ∞ by (30) and(32). For the third summand, note that the asymptotic behavior of the normalized size Y n, of m -ary search trees is covered by Theorem 1, eq. (2) in [8]. In particular, from that theorem weobtain sup n (cid:62) (cid:107) Y n, (cid:107) < ∞ . Taking into account the prefactor ( I ( n ) r ) α − /n and conditioningon I ( n ) r , we find that the third summand also tends to zero.To bound the first summand in the latter display, we write, for r = 1 , . . . , m and n (cid:62) m − , W ( n ) r := (cid:101) A ( n ) r (cid:16) Y ( r ) I ( n ) r (cid:17) t − (cid:60) (cid:18) C ( n ) r (cid:18) X ( r ) Λ ( r ) (cid:19)(cid:19) and denote the components of W ( n ) r by W ( n ) r = ( W ( n ) r, , W ( n ) r, ) . For r = 1 , . . . , m , we have E (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) (cid:88) (cid:54) r (cid:54) m W ( n ) r (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) = E (cid:34) (cid:88) (cid:54) r (cid:54) m (cid:110) ( W ( n ) r, ) + ( W ( n ) r, ) (cid:111) + (cid:88) r (cid:54) = s (cid:110) W ( n ) r, W ( n ) s, + W ( n ) r, W ( n ) s, (cid:111)(cid:35) . (35)We bound the three types of terms individually. First, for the dominant term E (cid:104) ( W ( n ) r, ) + ( W ( n ) r, ) (cid:105) = E (cid:32) I ( n ) r n (cid:33) (cid:16) Y ( r ) I ( n ) r , − X ( r ) (cid:17) + (cid:32) I ( n ) r n (cid:33) α − (cid:16) Y ( r ) I ( n ) r , − (cid:60) (cid:0) ( I ( n ) r ) iβ Λ ( r ) (cid:1)(cid:17) E (cid:32) I ( n ) r n (cid:33) α − (cid:18)(cid:16) Y ( r ) I ( n ) r , − X ( r ) (cid:17) + (cid:16) Y ( r ) I ( n ) r , − (cid:60) (cid:0) ( I ( n ) r ) iβ Λ ( r ) (cid:1)(cid:17) (cid:19) where we used the inequality ( I ( n ) r /n ) (cid:54) ( I ( n ) r /n ) α − . Conditioning on I ( n ) r and using that Y ( r ) j and ( X ( r ) , (cid:60) ( j iβ Λ ( r ) )) are optimal couplings, we obtain E (cid:104) ( W ( n ) r, ) + ( W ( n ) r, ) (cid:105) (cid:54) E (cid:32) I ( n ) r n (cid:33) α − ∆ ( I ( n ) r ) . For the cross-product terms in (35), assume (cid:54) r, s (cid:54) m with r (cid:54) = s . Note that, by indepen-dence, we have E [ W ( n ) r, W ( n ) s, ] = 0 conditioning on I ( n ) r and I ( n ) s . From the expansion (28), weobtain E [ Y n ] = (cid:18) (cid:60) ( θn iβ ) + R ( n ) (cid:19) , with a remainder R ( n ) = o (1) . By independence and E [Λ] = θ , we obtain E [ W ( n ) r, ] = E [( I ( n ) r /n ) α − R ( I ( n ) r )] , and E [ W ( n ) r, W ( n ) s, ] = E (cid:32) I ( n ) r n · I ( n ) s n (cid:33) α − R ( I ( n ) r ) R ( I ( n ) s ) which tends to by the dominated convergence theorem as R ( I ( n ) r ) , R ( I ( n ) s ) → in probability.Hence, collecting all estimates, we obtain ∆( n ) (cid:54) E (cid:88) (cid:54) r (cid:54) m (cid:32) I ( n ) r n (cid:33) α − ∆ ( I ( n ) r ) + o (1) / + o (1) . (36)Now ∆( n ) → follows from a standard argument since we have lim n →∞ (cid:88) (cid:54) r (cid:54) m E (cid:32) I ( n ) r n (cid:33) α − = (cid:88) (cid:54) r (cid:54) m E (cid:2) V α − r (cid:3) = m B ( m, α − < (cf. the proof of Theorem 4.1 in [36]). This proves Theorem 2.7 for NPL. (cid:54) m (cid:54) We begin with the recurrence (12), and recall that, for (cid:54) m (cid:54) , V ( S n ) ∼ C S n, V ( N n ) ∼ C N n with C N = φ C K ; n (cid:62) , such that for all n (cid:62) n , the matrix Cov( Q n ) ispositive definite. We normalize it by (cid:101) Q n := Q n for (cid:54) n < n and by (cid:16) (cid:101) Q n (cid:17) t := (cid:20) ( √ C N n ) − 00 ( C S n ) − / (cid:21) ( Q n − E [ Q n ]) t , ( n (cid:62) n ) . Then, by (12), (cid:101) Q n satisfies the recurrence (cid:16) (cid:101) Q n (cid:17) t d = (cid:88) (cid:54) r (cid:54) m D ( n ) r (cid:16) (cid:101) Q ( r ) I ( n ) r (cid:17) t + (cid:101) b n , ( n (cid:62) m − , where (denoting by F n,r the event F n,r := { I ( n ) r (cid:62) n } and F cn,r its complement) D ( n ) r = (cid:32) I ( n ) r n (cid:33) F n,r + F cn,r √ C N n (cid:113) C S I ( n ) r √ C N n F n,r + F cn,r √ C N n (cid:113) I ( n ) r √ n F n,r + F cn,r σ Y √ n , (cid:101) b n = √ C N n (cid:32) (cid:88) (cid:54) r (cid:54) m ( ν ( I ( n ) r ) + µ ( I ( n ) r )) − ν ( n ) (cid:33) C s n (cid:32) − µ ( n ) + (cid:88) (cid:54) r (cid:54) m ν ( I ( n ) r ) (cid:33) , (37)with assumptions on independence and identical distributions as in (12). Note that the asymp-totic expressions for the variances and covariance between N n and S n imply that Cov( (cid:101) Q n ) = Id + o (1) , where Id denotes the × identity matrix and the o (1) -term means that all four components of Cov( (cid:101) Q n ) converge to the corresponding components of Id , each o (1) in the four componentsbeing different in general. In particular, Cov( (cid:101) Q n ) is a symmetric, positive definite matrix forall n (cid:62) n . Let R n := Id for (cid:54) n < n and R n := (Cov( (cid:101) Q n )) / for n (cid:62) n . Note that, bycontinuity, we have R n = Id + o (1) , R − n = Id + o (1) . (38)Now normalize (cid:101) Q n by Y n := R − n (cid:101) Q n , for n (cid:62) , so that Cov( Y n ) = Id for n (cid:62) n , and ( Y n ) t d = (cid:88) (cid:54) r (cid:54) m F ( n ) r (cid:16) Y ( n ) I ( n ) r (cid:17) t + b ( n ) , ( n (cid:62) n ) , (39)where F ( n ) r = R − n D ( n ) r R I ( n ) r and b ( n ) = R − n (cid:101) b n , with assumptions on independence and identi-cal distributions as in (12). From (37), (38) and (30), we then obtain the convergences F ( n ) r → (cid:20) V r V / r (cid:21) =: F ∗ r , b ( n ) → (cid:18) C − / N b N (cid:19) =: b ∗ N , (40)which hold in L p for any (cid:54) p < ∞ (we will need p = 3 below).23 he limiting map. To describe the asymptotic behavior of Q n , we use the following proba-bility distribution on the space R . In accordance with the notation in [39], we denote by M the space of all probability distributions on R , by M the subspace of all L ( Z ) ∈ M with (cid:107) Z (cid:107) < ∞ , and furthermore M (0 , Id ) := (cid:110) L ( Z ) ∈ M (cid:12)(cid:12)(cid:12) E [ Z ] = 0 , Cov( Z ) = Id (cid:111) . Define the map T (cid:48) N on M : T (cid:48) N : M → M , (41) L ( Z ) (cid:55)→ L (cid:32) (cid:88) (cid:54) r (cid:54) m F ∗ r Z ( r ) + b ∗ N (cid:33) , where Z (1) , . . . , Z ( m ) , ( F ∗ , . . . , F ∗ m , b ∗ N ) are independent and Z ( r ) is distributed as Z for all r = 1 , . . . , m . Here F ∗ r and b ∗ N are defined in (40). Lemma 4.2. The restriction of T (cid:48) N in (41) to M (0 , Id ) has a unique fixed point L ( X (cid:48) , Λ (cid:48) ) which is a product measure, i.e., its components X (cid:48) and Λ (cid:48) are independent.Proof. We check first that the restriction of T (cid:48) N to M (0 , Id ) maps into M (0 , Id ) : • For any µ ∈ M (0 , Id ) , we see, by independence and (cid:107) b N (cid:107) < ∞ , that T (cid:48) N ( µ ) ∈ M . • For the mean of T (cid:48) N ( µ ) , we have, from E [ b N ] = 0 , that T (cid:48) N ( µ ) is centered. • For the covariance of T (cid:48) N ( µ ) , we obtain (see also [39, Lemma 3.2]) the matrix E (cid:20) b N /C N 00 0 (cid:21) + m E (cid:20) V V (cid:21) = Id . (42)Thus T (cid:48) N ( µ ) ∈ M (0 , Id ) . By Lemma 3.3 in [39], the existence of a unique fixed point L ( X (cid:48) , Λ (cid:48) ) follows from the inequality m E (cid:107) F ∗ (cid:107) = m E [ V / ] < . Alternatively, Theorem 5.1 in [11] (or Lemma 3.1 in [39] as well) implies the existence of aunique fixed point L ( X (cid:48) , Λ (cid:48) ) in M (0 , Id ) .To show that L ( X (cid:48) , Λ (cid:48) ) is a product measure we recall that the existence of the unique fixedpoint that we just obtained is based on the fact that the restriction of T (cid:48) N to M (0 , Id ) is acontraction with respect to a complete metric on M (0 , Id ) . We do not introduce this metric,the Zolotarev metric ζ , here, since we do not require the special description of ζ . For moreinformation on ζ , in particular the completeness of the metric space ( M (0 , Id ) , ζ ) , see [11].We denote the space of probability measures on R by M and M (0 , 1) := (cid:110) L ( Z ) ∈ M (cid:12)(cid:12)(cid:12) E [ | Z | ] < ∞ , E [ Z ] = 0 , V ( Z ) = 1 (cid:111) . Furthermore, the product of probability measures ν and ν on R by ν ⊗ ν . Consider the space G := { ν ⊗ N (0 , | ν ∈ M (0 , } . G ⊂ M (0 , Id ) .To show that ( G , ζ ) is a closed subspace of ( M (0 , Id ) , ζ ) , let ( µ n ⊗ N (0 , n (cid:62) bea sequence in G that converges in ( M (0 , Id ) , ζ ) , say to L ( Y , Y ) . Since ζ -convergenceimplies weak convergence, we first obtain that Y is standard normally distributed. Clearly, wehave L ( Y ) ∈ M (0 , . Since a weak limit of product measures is a product measure (seee.g. [2, Theorem 2.8(ii)]), L ( Y , Y ) is a product measure. Now ( G , ζ ) as a closed subspace ofthe complete space ( M (0 , Id ) , ζ ) is complete.We next show that the restriction of T (cid:48) N to G maps to G . Note that only here do weuse the fact that the second component in the definition of G is a normal distribution; see(43) below. For µ = µ ⊗ N (0 , ∈ G , the covariance matrix of T (cid:48) N ( µ ) =: L ( Y , Y ) is Id by (42). Since Y is distributed as (cid:80) (cid:54) r (cid:54) m V / r N r , where the N j ’s are independentnormals and independent of ( V , . . . , V m ) , we see that L ( Y ) = N (0 , . Thus it remainsto show that, for T (cid:48) N ( µ ) ∈ G , the components Y and Y are independent. Let A, B ⊂ R be measurable and ( Y (1)1 , Y (1)2 ) , . . . , ( Y ( m )1 , Y ( m )2 ) be independent random vectors that areindependent of ( V , . . . , V m ) and identically distributed as µ . Then, denoting the distribu-tion of V = ( V , . . . , V m ) by Υ and, for v = ( v , . . . , v m ) , writing t N ( v ) := C − / N ( ϕ m +2 ϕ m (cid:80) (cid:54) r (cid:54) m v r log v r ) , we have P ( Y ∈ A, Y ∈ B ) = P (cid:32) (cid:88) (cid:54) r (cid:54) m V r Y (1) r + t N ( V ) ∈ A, (cid:88) (cid:54) r (cid:54) m V / r Y (2) r ∈ B (cid:33) = (cid:90) P (cid:32) (cid:88) (cid:54) r (cid:54) m v r Y (1) r + t N ( v ) ∈ A, (cid:88) (cid:54) r (cid:54) m v / r Y (2) r ∈ B (cid:33) dΥ( v )= (cid:90) P (cid:32) (cid:88) (cid:54) r (cid:54) m v r Y (1) r + t N ( v ) ∈ A (cid:33) P (cid:32) (cid:88) (cid:54) r (cid:54) m v / r Y (2) r ∈ B (cid:33) dΥ( v )= (cid:90) P (cid:32) (cid:88) (cid:54) r (cid:54) m v r Y (1) r + t N ( v ) ∈ A (cid:33) N (0 , B )dΥ( v ) (43) = P ( Y ∈ A ) P ( Y ∈ B ) . We then deduce that T (cid:48) N ( µ ) ∈ G and T (cid:48) N maps G to G .Finally, Banach’s fixed point theorem implies that the restriction of T (cid:48) N to G has a uniquefixed point. Since G ⊂ M (0 , Id ) , we find L ( X (cid:48) , Λ (cid:48) ) ∈ G . Consequently, X (cid:48) and Λ (cid:48) areindependent. Proof of Theorem 2.6: NPL. The proof of Theorem 2.6 relies on Theorem 4.1 in [39]. Theparameter d there is taken to be the dimension d = 2 here, and we choose the parameter s = 3 . Note that the normalization in (10) is as required in [39, eq. (22)] and is identical tothe normalization leading to the Y n in (39). We need to check the conditions (24)–(26) in [39].Condition (24) in our case is, with F ( n ) r and b ( n ) as in (40), ( F ( n )1 , . . . , F ( n ) m , b ( n ) ) → ( F ∗ , . . . , F ∗ m , b ∗ N ) in L . This is satisfied by (40). Condition (25) in our case is also satisfied because (cid:88) (cid:54) r (cid:54) m (cid:107) F ∗ r (cid:107) = m E [ V / ] < . r = 1 , . . . , m and all (cid:96) ∈ N , E (cid:104) { I ( n ) r (cid:54) (cid:96) }∪{ I ( n ) r = n } (cid:107) F ( n ) r (cid:107) (cid:105) → . Since (cid:107) F ( n ) r (cid:107) op are uniformly bounded random variables, this condition is equivalent to P (cid:0) I ( n ) r (cid:54) (cid:96) (cid:1) → , which is satisfied in view of (30). Hence, Theorem 4.1 in [39] applies and implies the con-vergence Cov( Q n ) − / ( Q n − E [ Q n ]) → ( X (cid:48) , Λ (cid:48) ) in the metric ζ , which implies the statedconvergence in distribution.Note that the components of T (cid:48) N imply univariate recursive distributional equations for L (Λ (cid:48) ) and L ( X (cid:48) ) : Λ (cid:48) d = (cid:88) (cid:54) r (cid:54) m (cid:112) V r Λ (cid:48) ( r ) ,X (cid:48) d = (cid:88) (cid:54) r (cid:54) m V r X (cid:48) ( r ) + C − / N b N , with conditions on independence and identical distributions corresponding to the definitionof T (cid:48) N . Moreover, both equations are subject to the constraints of zero mean, unit varianceand bounded third absolute moment. The solution for L (Λ (cid:48) ) is given by the standard normaldistribution, and a comparison of the equation for L ( X (cid:48) ) with (33) shows that X (cid:48) is identicallydistributed as C − / N X with X as in Theorem 2.7. From the previous two subsections, we see that the limit law of ( N n − E ( N n )) /n is the uniquesolution, subject to zero mean and finite variance, of the recursive distributional equation X d = (cid:88) (cid:54) r (cid:54) m V r X ( r ) + φ + 2 φ (cid:88) (cid:54) r (cid:54) m V r log V r , where X (1) , . . . , X ( m ) , V are independent and the X ( r ) have the same distribution as X .Moreover, it is well-known (see Corollary 5.2 in [38]) that the limit law of ( K n − E ( K n )) /n ,which we denote by L ( K ) in Section 2.2, is the unique solution, again subject to zero meanand finite variance, of X d = (cid:88) (cid:54) r (cid:54) m V r X ( r ) + 1 + 2 φ (cid:88) (cid:54) r (cid:54) m V r log V r , (44)where the meaning of the notations is as above.Comparing these two distributional recurrences, we see that the solution to the first one is L ( φK ) . Thus, we have N n − E ( N n ) n d −→ φK, i.e., the limit law of K n and N n are up to a constant identical. In fact, if one is only interested inthis result, then one does not need the analysis in the last two subsections but there are simplerapproaches, as we discussed below. 26 .4 Short proofs for the limit law of N n In this section, we discuss different means of proving directly the limit law for NPL withoutthe detour via the bivariate setting from Sections 4.1 and 4.2. Limit law for NPL by the contraction method. A first alternative approach to the limitlaw for NPL uses the contraction method and “over-normalizing” in recurrence (12). Moreprecisely, normalize with an α < α (cid:48) < by R n := (cid:20) n − n − α (cid:48) (cid:21) (cid:18) N n − E [ N n ] S n − E [ S n ] (cid:19) , ( n (cid:62) . Now the recurrence (12) leads to the limit equation ( R ) t d = (cid:88) (cid:54) r (cid:54) m (cid:20) V r V α (cid:48) r (cid:21) (cid:0) R ( r ) (cid:1) t + (cid:18) b N (cid:19) , (45)with conditions on independence and identical distributions as in (33). Theorem 4.1 in [36]directly applies and implies that R n → R in distribution and with second (mixed) moments,where R is the unique fixed point subject to zero mean and finite second moment of the re-cursive distributional equation (45). By substituting into (45), we see that ( φK, has thedistribution of R , which implies that N n − E [ N n ] n d −→ φK. Univariate limit law for NPL via Slutsky’s theorem. Another approach is to apply Slutsky’stheorem. For that purpose, we consider the moment generating function ¯ P n ( u, v, w ) = E (cid:16) e ¯ S n u + ¯ K n v + ¯ N n w (cid:17) . Then ¯ P n satisfies the recurrence ¯ P n ( u, v, w ) = 1 (cid:0) nm − (cid:1) (cid:88) j ¯ P j ( u + w, v, w ) · · · ¯ P j l ( u + w, v, w ) e ∆ j u + ∇ j v + δ j w , with the initial conditions P n ( u, v, w ) = 1 for (cid:54) n (cid:54) m − . Now define V [ KN ] n := Cov( K n , N n ) . Then V [ KN ] n = m (cid:88) (cid:54) j (cid:54) n − m +1 π n,j V [ KN ] j + b [ KN ] n , where b [ KN ] n = 1 (cid:0) nm − (cid:1) (cid:88) j (cid:16) V [ SK ] j + ∇ j δ j (cid:17) = V [ SK ] n + 1 (cid:0) nm − (cid:1) (cid:88) j ( ∇ j δ j − ∆ j ∇ j ) . V [ SK ] n , imply that b [ KN ] n ∼ (cid:0) nm − (cid:1) (cid:88) j ∇ j δ j ∼ φ (cid:0) nm − (cid:1) (cid:88) j ∇ j ∼ φb [ K ] n . Consequently, by the same method of proofs used in Section 3, we see that V [ KN ] n ∼ φC K n . Now consider the difference E ( φ ¯ K n − ¯ N n ) = φ V [ K ] n − φV [ KN ] n + V [ N ] n ∼ φ C K n − φ C K n + φ C K n = o ( n ) . Consequently, by Chebyshev’s inequality, we obtain the convergence in probability φ ¯ K n − ¯ N n n P −→ . From this, the claimed result follows from Slutsky’s theorem and the limit law for KPL.Note that this argument in addition gives the following consequence. Corollary 4.3. The correlation coefficient between K n and N n tends asymptotically to one ρ ( K n , N n ) → . Identical limit random variables. To the pair ( N n , K n ) , we could as well apply the contrac-tion method, and prove that the normalization ( N n − E ( N n )) /n, ( K n − E ( K n )) /n ) convergesto a limit given by ( P ) t d = (cid:88) (cid:54) r (cid:54) m (cid:20) V r V r (cid:21) (cid:0) P ( r ) (cid:1) t + (cid:18) φb K b K (cid:19) , with conditions on independence and identical distributions as in (33) and subject to zero meanand finite second moment. By plugging in, we find that ( φK, K ) has the limit distribution.This re-derives Corollary 4.3 and shows that the limit random variables (up to scaling) are evenalmost surely identical. It seems reasonable to conjecture that the sequences (cid:18) N n − E [ N n ] φn (cid:19) n (cid:62) , (cid:18) K n − E [ K n ] n (cid:19) n (cid:62) both convergence almost surely to the same random variable with the distribution of K . Thisrequires the m -ary search trees to grow as a combinatorial Markov chain, which canonically isobtained by building up the tree from i.i.d. uniformly on [0 , distributed data. For the notionof a combinatorial Markov chain and related results on binary search trees, see Gr¨ubel [19].28 Extensions The dependence and phase changes we established above for space requirement and pathlengths in random m -ary search trees are not confined to these shape parameters, neither arethey specific to m -ary search trees. The same study (including the same methods of proof) canbe carried out for other shape parameters and other classes of random trees. We consider firstrandom median-of- (2 t + 1) search trees in this section, where we discuss the joint asymptoticsof size (defined as the number of nodes with at least t descendants) and total key path length(which is also the major cost measure for Quicksort using the median-of- (2 t + 1) technique).Random quadtrees will be also briefly discussed. Then we consider another line of extension,namely, to other shape parameters in these trees. Since the technicalities follow more or lessthe same pattern, we skip all proofs. Fringe-balanced binary search trees (FBBSTs) are binary search trees ( m = 2 ) with localre-organizations for all subtrees of size exactly t + 1 into more balanced ones. In terms ofquicksort, the corresponding tree structures choose at each partitioning stage the median ofa sample of t + 1 elements to partition the elements into smaller and larger groups. For aprecise description and other connections, see [8, 10]. The number of nodes S n with at least t descendants (or the number of median-partitioning stages) and the total path length of thesenodes (TPL; KPL = NPL for binary search trees) X n of a random FBBST constructed froma random permutation of n elements satisfy the following distributional recurrence ( Q n :=( X n , S n ) ) ( Q n ) t d = (cid:16) Q (1) I (cid:48) n (cid:17) t + (cid:16) Q (2) n − − I (cid:48) n (cid:17) t + (cid:18) n − (cid:19) , ( n (cid:62) t + 1) , with conditions on independence and identical distributions as in (12) and the initial conditions S = · · · = S t = X = · · · = X t = 0 . Here P ( I (cid:48) n = j ) = (cid:0) j − t (cid:1)(cid:0) n − jt (cid:1)(cid:0) n t +1 (cid:1) ( t (cid:54) j (cid:54) n − − t ) . We start with the mean. First, for S n , it was proved in [8] that E ( S n ) = C ( n + 1) − (cid:88) (cid:54) k (cid:54) C k Γ( (cid:37) k ) n (cid:37) k − + o ( n α t − ) (46)where C k = t !2( (cid:37) k − (cid:37) k · · · ( (cid:37) k + t − (cid:80) t (cid:54) j (cid:54) t j + (cid:37) k ( k = 1 , . . . , t + 1) , with (cid:37) = 2 > (cid:60) ( (cid:37) ) = (cid:60) ( (cid:37) ) = α t > (cid:60) ( (cid:37) ) (cid:62) · · · (cid:62) (cid:60) ( (cid:37) t +1 ) being the zeros of the indicialequation ( z + t ) · · · ( z + 2 t ) − t + 1)! t ! . 29n particular, C = φ t := 12( t + 1)( H t +2 − H t +1 ) . Moreover, using the transfer theorems from [8], we obtain, for the mean of X n , E ( X n ) = 1 H t +2 − H t +1 n log n + c t n + o ( n ) , for some constant c t . The same method of proofs (asymptotic transfer and the approach usedin Section 3.3) also leads to asymptotic estimates for the variances and the covariance between X n and S n . Theorem 5.1. The variance of the number of non-leaf nodes S n and that of the TPL X n in arandom FBBST, and their covariance satisfy V ( S n ) ∼ (cid:40) D S n, if (cid:54) t (cid:54) G ( β t log n ) n α t − , if t (cid:62) , Cov( S n , X n ) ∼ (cid:40) D R n, if (cid:54) t (cid:54) G ( β t log n ) n α t , if t (cid:62) , V ( X n ) ∼ D X n , where D S , D R are suitable constants, β t = (cid:61) ( (cid:37) ) , and all other constants and functions aregiven below. The periodic functions in the above theorem are given by G ( z ) = 2 | C | | Γ( (cid:37) ) | (cid:18) − t + 1)! | Γ( (cid:37) + t ) | t ! Γ(2 α t + 2 t ) − t !(2 t + 1)!Γ(2 α t + t − (cid:19) + 2 (cid:60) (cid:18) C e iz Γ( (cid:37) ) (cid:18) − t + 1)!Γ( (cid:37) + t ) t ! Γ(2 (cid:37) + 2 t ) − t !(2 t + 1)!Γ(2 (cid:37) + t − (cid:19)(cid:19) and G ( z ) = (cid:60) (cid:32) C e iz Γ( (cid:37) ) (cid:32) (cid:37) + 2 t + 1 t + 1 − ( (cid:37) + 2 t + 1) ψ ( (cid:37) + 2 t + 2) − ( (cid:37) + t ) ψ ( (cid:37) + t + 1) − ( t + 1)( H t +1 − γ )( t + 1)( H t +2 − H t +1 ) (cid:33)(cid:33) , respectively. Moreover, we have D X = 1( H t +2 − H t +1 ) (cid:32) t + 3 t + 1 H (2)2 t +2 − t + 2 t + 1 H (2) t +1 − π (cid:33) . The limit law for the normalized TPL of random FBBSTs was first shown in the dissertation ofBruhn, [5]; see also [4, 8, 34, 40]. The phase change of the limit law of the normalized S n wasfirst discovered in [8]. 30o describe the joint limiting behavior of S n and X n , we denote by V a random variable thatis the median of (2 t + 1) independent, identically distributed uniform [0 , random variables,i.e., a Beta ( t + 1 , t + 1) distribution. We define the map T med by T med : M R × C → M R × C , L ( Z, W ) (cid:55)→ L (cid:18)(cid:20) V V (cid:37) (cid:21) (cid:18) Z (1) W (1) (cid:19) + (cid:20) − V 00 (1 − V ) (cid:37) (cid:21) (cid:18) Z (2) W (2) (cid:19) + (cid:18) b M (cid:19)(cid:19) , with conditions on independence and distributions as in (33) and b M := 1 + 1 H t +2 − H t +1 ( V log V + (1 − V ) log(1 − V )) . Then Lemma 4.1 and its proof also apply to the map T med as long as t (cid:62) . The normalizationused is given by Y n := (cid:18) X n − E ( X n ) n , S n − C nn α t − (cid:19) , ( n (cid:62) . (47)We have the following asymptotic behavior for t (cid:62) . Rewrite (46) as E ( S n ) = C ( n + 1) − (cid:60) ( ϑn (cid:37) ) + o ( n α t − ) , (48)where ϑ := 2 (cid:60) ( C / Γ( (cid:37) )) . Theorem 5.2. Assume t (cid:62) . Let Y n be the normalization of TPL and the number of non-leafnodes in a random FBBST defined in (47). Denote by L ( X med , Λ med ) the unique fixed point ofthe restriction of T med to M R × C ((0 , ϑ )) with ϑ defined in (48). Then, denoting by β t := (cid:61) ( (cid:37) ) ,we have (cid:96) (cid:0) Y n , ( X med , (cid:60) ( n iβ t Λ med )) (cid:1) → , ( n → ∞ ) . For the range of (cid:54) t (cid:54) , we define b ∗ med := ( D − / X b M , t and the map T (cid:48) med on M : T (cid:48) med : M → M , L ( Z, W ) (cid:55)→ L (cid:18)(cid:20) V V / (cid:21) (cid:18) Z (1) W (1) (cid:19) + (cid:20) − V 00 (1 − V ) / (cid:21) (cid:18) Z (2) W (2) (cid:19) + b ∗ med (cid:19) , with conditions on independence and distributions as in (41). Again Lemma 4.2 and its proofapply to T (cid:48) med and imply that the restriction of T (cid:48) med to M (0 , Id ) has a unique fixed point L ( X (cid:48) med , Λ (cid:48) med ) .Similar to the small m case of m -ary search trees, the remaining range (cid:54) t (cid:54) alsoleads to a convergence in distribution. Theorem 5.3. Assume (cid:54) t (cid:54) . Let Q n = ( X n , S n ) be the vector of TPL and the numberof non-leaf nodes in a random FBBST. With L ( X (cid:48) med , Λ (cid:48) med ) as above, we have Cov( Q n ) − / ( Q n − E [ Q n ]) d −→ L ( X (cid:48) med , Λ (cid:48) med ) , where Λ (cid:48) med is a standard normal distribution. Moreover, X (cid:48) med and Λ (cid:48) med are independent. .2 Random quadtrees Point quadtrees, first proposed by Finkel and Bentley [15], are one of the most natural exten-sions of binary search trees to multivariate data in which each point splits the d -dimensionalspace into d subspaces, corresponding to d subtrees in the corresponding tree structure. For aprecise definition of random d -dimensional quadtrees; see [7, 30]. Since the space requirementis a constant, we discuss the number of leaves L n and the internal path length Ξ n in this section.Note that for the pair W n := (Ξ n , L n ) , we have, for all n (cid:62) , ( W n ) t d = (cid:88) (cid:54) r (cid:54) d (cid:16) W ( r ) J r (cid:17) t + (cid:18) n − (cid:19) , with conditions on independence and identical distributions as in (12), where the initial condi-tions are L = 0 , L = 1 , Ξ = Ξ = 0 . Moreover, the underlying splitting probabilities aregiven by P ( J = j , . . . , J d = j d ) = (cid:18) n − j , . . . , j d (cid:19) (cid:90) [0 , d q ( x ) j · · · q d ( x ) j d d x , where j , . . . , j d (cid:62) , j + · · · + j d = n − , x = ( x , . . . , x d ) and q h ( x ) = (cid:89) (cid:54) l (cid:54) d ((1 − b l ) x l + b l (1 − x l )) , with ( b , . . . , b d ) being the binary representation of h − .First, it was proved in [7] that the mean of L n satisfies, for d (cid:62) , E ( L n ) = χ d n + c + n ˆ α + i ˆ β + c − n ˆ α − i ˆ β + χ d d − o ( n ˆ α ) , (49)where χ d , c + , c − (which is the conjugate of c + ) are given in [7], and e πi/d = ˆ α + 1 + i ˆ β .Moreover, the asymptotic transfer results in [7] also lead to the asymptotic approximation (seealso [16]) E (Ξ n ) = 2 d n log n + ˆ cn + o ( n ) , for some explicitly computable constant ˆ c . In a similar manner, we can characterize the asymp-totics of the variances and the covariance. Theorem 5.4. For the number of leaves L n and the internal path length Ξ n in random d -dimensional quadtrees, we have V ( L n ) ∼ (cid:40) E L n, if (cid:54) d (cid:54) P (cid:0) ˆ β log n (cid:1) n α , if d (cid:62) , Cov(Ξ n , L n ) ∼ (cid:40) E R n, if (cid:54) d (cid:54) P (cid:0) ˆ β log n (cid:1) n ˆ α +1 , if d (cid:62) , V (Ξ n ) ∼ E X n , where E L , E R are suitable constants, ˆ β := 2 sin πd , and all other constants and functions aregiven below. P ( z ) = 2 (2 ˆ α + 1) d (2 ˆ α + 1) d − d | c + | c L ( ˆ α + i ˆ β, ˆ α − i ˆ β )+ 2 (cid:60) (cid:32) (2 ˆ α + 2 i ˆ β + 1) d (2 ˆ α + 2 i ˆ β + 1) d − d c c L ( ˆ α + i ˆ β, ˆ α + i ˆ β ) e iz (cid:33) , where c L ( u, v ) = 1 − η (0 , u ) − η (0 , v ) + 2 d η ( u, v ) with η ( u, v ) := (cid:18) u + v + 1 + Γ( u + 1)Γ( v + 1)Γ( u + v + 2) (cid:19) d and P ( z ) = 2 (cid:60) (cid:32) ( ˆ α + i ˆ β + 2) d ( ˆ α + i ˆ β + 2) d − d c + c K ( ˆ α + i ˆ β ) e iz (cid:33) , where c K ( u, v ) = η (0 , u ) + 2 d +1 d ∂∂v η ( u, v ) (cid:12)(cid:12)(cid:12) v =1 . Finally, E X = 3 d d − d · − π d . The limit law for the normalized internal path length of random d -dimensional quadtrees wasfirst obtained in [38]; see also [4, 7, 34]. The asymptotic behavior of the normalized numberof leaves together with its phase change was first discovered in [7]; see also [9, 23, 24, 25] forclosely related types of phase changes.We now describe the joint behavior of Ξ n and L n . A random variable U uniformly dis-tributed over the unit hypercube [0 , d decomposes this cube into d quadrants by drawing the d hyperplanes through U perpendicular to the edges of the cube. Choose an ordering of thesequadrants and denote their volumes by (cid:104) U (cid:105) , . . . , (cid:104) U (cid:105) d ; see [38, Section 2]. Now define themap T quad by (with δ := 2 e πi/d ) T quad : M R × C → M R × C , L ( Z, W ) (cid:55)→ L (cid:88) (cid:54) r (cid:54) d (cid:20) (cid:104) U (cid:105) r (cid:104) U (cid:105) δ r (cid:21) (cid:18) Z ( r ) W ( r ) (cid:19) + (cid:18) b Q (cid:19) , with conditions on independence and distributions as in (33), and b Q := 1 + 2 d (cid:88) (cid:54) r (cid:54) d (cid:104) U (cid:105) r log (cid:104) U (cid:105) r . Then Lemma 4.1 and its proof also apply to map T quad as long as d (cid:62) . The normalizationused is given by V n := (cid:18) Ξ n − E (Ξ n ) n , L n − χ d nn ˆ α (cid:19) ( n (cid:62) . (50)33ewrite (49) as E ( L n ) = χ d n + (cid:60) ( ˆ ϑn ˆ α + i ˆ β ) + χ d d − o ( n ˆ α ) , (51)where ˆ ϑ = 2 c + . Theorem 5.5. Assume d (cid:62) . Let V n denote the normalization of the internal path lengthand the number of leaves in a random d -dimensional quadtree defined in (50). Denote by L ( X quad , Λ quad ) the unique fixed point of the restriction of T quad to M R × C ((0 , ˆ ϑ )) with ˆ ϑ de-fined in (51). Then we have (cid:96) (cid:16) V n , (cid:0) X quad , (cid:60) (cid:0) n i ˆ β Λ quad (cid:1)(cid:1)(cid:17) → . For the remaining range of (cid:54) d (cid:54) , we define b ∗ quad := ( E − / X b M , t and the map T (cid:48) quad on M T (cid:48) quad : M → M , L ( Z, W ) (cid:55)→ L (cid:88) (cid:54) r (cid:54) d (cid:20) (cid:104) U (cid:105) r (cid:104) U (cid:105) / r (cid:21) (cid:18) Z ( r ) W ( r ) (cid:19) + b ∗ quad , with conditions on independence and distributions as in (41). Similarly, Lemma 4.2 and itsproof again apply to T (cid:48) quad and imply that the restriction of T (cid:48) quad to M (0 , Id ) has a uniquefixed point L ( X (cid:48) quad , Λ (cid:48) quad ) . Theorem 5.6. Assume (cid:54) d (cid:54) . Let V n = (Ξ n , L n ) denote the vector of internal path lengthand the number of leaves in a random d -dimensional quadtree. With L ( X (cid:48) quad , Λ (cid:48) quad ) as above,we have Cov( V n ) − / ( V n − E [ V n ]) d −→ L (cid:0) X (cid:48) quad , Λ (cid:48) quad (cid:1) , where Λ (cid:48) quad is a standard normal distribution, and X (cid:48) quad , and Λ (cid:48) quad are independent. The case when d = 1 corresponds to binary search trees, or equivalently, to Hoare’s quick-sort, and the above theorem can be re-worded as follows. The number of comparisons and thenumber of partitioning stages used by Hoare’s quicksort are asymptotically uncorrelated andindependent. Note that our results in the previous section for random FBBSTs give indeed astronger statement for the asymptotic independence or asymptotical periodicity for quicksortusing median-of-( t + 1 ). Our study can be extended to other shape parameters. For random m -ary search trees, thegenerality of Proposition 3.1 provides an effective means of widening our study to a broaderclass of “toll functions” in the definitions of S n , K n and N n . For example, the followingextensions are straightforward. S n d = S (1) I + · · · + S ( m ) I m + (cid:40) c + o ( n − ε ) , if (cid:54) m (cid:54) o ( n α − ) , if m (cid:62) (52)for some constant c , and 34 K n d = K (1) I + · · · + K ( m ) I m + n + t n with t n = o ( n ) and (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:88) n t n n − (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) < ∞ , (53)and – N n d = N (1) I + · · · + N ( m ) I m + S (1) I + · · · + S ( m ) I m + t n , where the S n ’s satisfy (52) and t n satisfies(53).Because the same iff-condition (53) also appears in the recurrence relations arising fromthe two other classes of random trees (see [7, 8]), exactly the same conditions can be used toextend the consideration for FBBSTs and quadtrees. Details are omitted here. References [1] R. A. Baeza-Yates. Some average measures in m -ary search trees. Inform. Process. Lett. ,25(6):375–381, 1987.[2] P. Billingsley. Convergence of probability measures . Wiley Series in Probability andStatistics: Probability and Statistics. John Wiley & Sons, Inc., New York, second edition,1999. A Wiley-Interscience Publication.[3] P. Bindjeme and J. A. Fill. Exact l -distance from the limit for quicksort key comparisons(extended abstract). Discrete Math. Theor. Comput. Sci., Nancy , pages 339–348, 2012.[4] N. Broutin and C. Holmgren. The total path length of split trees. Ann. Appl. Probab ,22:1745–1777, 2012.[5] V. Bruhn. Eine Methode zur asymptotischen Behandlung einer Klasse von Rekursionsgle-ichungen mit einer Anwendung in der stochastischen Analyse des Quicksort-Algorithmus .PhD thesis, Christian-Albrechts-Universit¨at zu Kiel Dissertation, 1996.[6] B. Chauvin and N. Pouyanne. m -ary search trees when m (cid:62) : a strong asymptotics forthe space requirements. Random Structures Algorithms , 24(2):133–154, 2004.[7] H.-H. Chern, M. Fuchs, and H.-K. Hwang. Phase changes in random point quadtrees. ACM Trans. Algorithms , 3(2):Art. 12, 51, 2007.[8] H.-H. Chern and H.-K. Hwang. Phase changes in random m -ary search trees and gener-alized quicksort. Random Structures Algorithms , 19(3-4):316–358, 2001.[9] D. S. Dean and S. N. Majumdar. Phase transition in a random fragmentation problemwith applications to computer science. J. Phys. A , 35(32):L501–L507, 2002.[10] L. Devroye. On the expected height of fringe-balanced trees. Acta Inform. , 30(5):459–466, 1993.[11] M. Drmota, S. Janson, and R. Neininger. A functional limit theorem for the profile ofsearch trees. Ann. Appl. Probab. , 18(1):288–333, 2008.3512] J. A. Fill. Distributional convergence for the number of symbol comparisons used byquicksort. Ann. Appl. Probab , 23:1129–1147, 2013.[13] J. A. Fill and N. Kapur. The space requirement of m -ary search trees: distributionalasymptotics for m (cid:62) . Invited paper, Proceedings of the 7th Iranian Statistical Confer-ence. Available via , 7, 2004.[14] J. A. Fill and N. Kapur. Transfer theorems and asymptotic distributional results for m -arysearch trees. Random Structures Algorithms , 26(4):359–391, 2005.[15] R. A. Finkel and J. L. Bentley. Quad trees: A data structure for retrieval on compositekeys. Acta Inf. , 4:1–9, 1974.[16] P. Flajolet, G. Labelle, L. Laforest, and B. Salvy. Hypergeometrics and the cost structureof quadtrees. Random Structures Algorithms , 7(2):117–144, 1995.[17] M. Fuchs. A note on the quicksort asymptotics. Random Structures Algorithms ,46(4):677–687, 2015.[18] M. Fuchs and H.-K. Hwang. Dependence between size and external path-length in randomtries. preprint, 2016.[19] R. Gr¨ubel. Search trees: metric aspects and strong limit theorems. Ann. Appl. Probab. ,24(3):1269–1297, 2014.[20] R. Gr¨ubel and Z. Kabluchko. A functional central limit theorem for branching randomwalks, almost sure weak convergence, and applications to random trees. preprint, 2014.[21] C. Holmgren. A weakly 1-stable distribution for the number of random records and cut-tings in split trees. Adv. in Appl. Probab. , 43(1):151–177, 2011.[22] H.-K. Hwang. Second phase changes in random m -ary search trees and generalized quick-sort: convergence rates. Ann. Probab. , 31(2):609–629, 2003.[23] S. Janson. Functional limit theorems for multitype branching processes and generalizedP´olya urns. Stochastic Process. Appl. , 110(2):177–245, 2004.[24] S. Janson. Congruence properties of depths in some random trees. ALEA Lat. Am. J.Probab. Math. Stat. , 1:347–366, 2006.[25] S. Janson and R. Neininger. The size of random fragmentation trees. Probab. TheoryRelated Fields , 142(3-4):399–442, 2008.[26] M. Knape and R. Neininger. P´olya urns via the contraction method. Combin. Probab.Comput. , 23(6):1148–1186, 2014.[27] D. E. Knuth. The Art of Computer Programming. Vol. 3. Sorting and Searching. Addison-Wesley, Reading, MA, 1998. Second edition.[28] W. Lew and H. M. Mahmoud. The joint distribution of elastic buckets in multiway searchtrees. SIAM J. Comput. , 23(5):1050–1074, 1994.3629] H. M. Mahmoud. On the average internal path length of m -ary search trees. Acta Inform. ,23(1):111–117, 1986.[30] H. M. Mahmoud. Evolution of Random Search Trees . Wiley-Interscience. John Wiley& Sons, Inc., New York, 1992. A Wiley-Interscience Publication.[31] H. M. Mahmoud and B. Pittel. Analysis of the space of search trees under the randominsertion algorithm. J. Algorithms , 10(1):52–75, 1989.[32] C. Mailler. Describing the asymptotic behaviour of multicolour P ´olya urns via smoothingsystems analysis. arXiv:1407.2879 , 2014.[33] S. N. Majumdar, D. S. Dean, and P. L. Krapivsky. Understanding search trees via statisti-cal physics. Pramana , 64:1175–1189, 2005.[34] G. O. Munsonius. On the asymptotic internal path length and the asymptotic Wienerindex of random split trees. Electron. J. Probab. , 16:no. 35, 1020–1047, 2011.[35] R. Muntz and R. Uzgalis. Dynamic storage allocation for binary search trees in a two-level memory. Proceedings of the Princeton Conference on Information Sciences andSystems , 4:345–349, 1971.[36] R. Neininger. On a multivariate contraction method for random recursive structures withapplications to Quicksort. Random Structures Algorithms , 19(3-4):498–524, 2001.[37] R. Neininger. Refined quicksort asymptotics. Random Structures Algorithms , 46(2):346–361, 2015.[38] R. Neininger and L. R¨uschendorf. On the internal path length of d -dimensional quadtrees. Random Structures Algorithms , 15(1):25–41, 1999.[39] R. Neininger and L. R¨uschendorf. A general limit theorem for recursive algorithms andcombinatorial structures. Ann. Appl. Probab. , 14(1):378–418, 2004.[40] U. R¨osler. On the analysis of stochastic divide and conquer algorithms. Algorithmica ,29(1-2):238–261, 2001.[41] H. Sulzbach. On martingale tail sums for the path length in random trees. http://arXiv:1412.3508http://arXiv:1412.3508