Appedix to Quicksort Asymptotics James Alle Fill Departmet of Mathematical Scieces The Johs Hopkis Uiversity jimfill@jhu.edu ad http://www.mts.jhu.edu/~fill/ ad Svate Jaso Departmet of Mathematics Uppsala Uiversity svate.jaso@math.uu.se ad http://www.math.uu.se/~svate/ ABSTRACT This appedix to [] cotais a proof of the improved estimates i Remark 7.3 of that paper for the momet geeratig fuctio of the ormalized) umber of comparisos i Quicksort. AMS 000 subject classificatios. Primary 68W40; secodary 68P0, 60F05, 60E0. Date. May, 00. Research supported by NSF grat DMS 9803780, ad by The Johs Hopkis Uiversity s Acheso J. Duca Fud for the Advacemet of Research i Statistics.
This is a appedix to [], to which we refer for backgroud ad otatio. The theorem, lemmas, ad equatios i this appedix are labelled by A., etc.; labels with pure umbers refer to []. The purpose of this appedix is to provide a proof of the followig estimates stated i Remark 7.3 of [].. Theorem A.. Let L 0 = 5.08 be the largest root of e L = 6L. The, for all 0, e.34λ, λ 0.58, e 0.5λ, 0.58 λ 0, E e λy e λ, 0 λ 0.4, e λ, 0.4 λ L 0, e eλ, L 0 λ. I particular, E e λy exp max λ, e λ)) for all λ R. The proof below follows closely the correspodig proof i [], where we obtaied by the method of Rösler [3] with some refiemets) explicit estimates for the momet geeratig fuctio of the limit variable Y. I this appedix we treat istead the ormalized umber of comparisos Y for fiite. I the preset case, some estimates ivolvig C i), stated as lemmas below, become harder tha the correspodig estimates i [] where the limit as is treated. Note that the boud i Theorem A. is the same as the oe obtaied for E e λy i [] for λ 0, but slightly weaker for λ < 0 or rather for λ < 0.58). It seems likely that with further effort oe could show that the bouds i [] for E e λy hold also for E e λy for all λ ad, but this is still a ope problem.) I order to obtai good estimates we use extesive umerical calculatios for small to supplemet our aalytical estimates; we could do without these umerical calculatios at the cost of icreasig the costats i the expoets i the theorem. [All umerical calculatios have bee verified idepedetly by the two authors, the alphabetically) first usig Mathematica ad the secod usig Maple.] We begi with some estimates of C i). Lemma A.. The sequece µ ) 0 is odecreasig ad covex. Proof. By.7) ad.8), for 0, µ µ = )H 4 ) [ )H 4 ) ] which is oegative ad icreasig. = H, A.) Lemma A.3. For every, the sequece C i)) i is covex. Its maximum is C ) = C ) ad its miimum is C )/ ) = C )/ ). Proof. The defiitio.5) ad Lemma A. show that C i)) i is covex. Moreover, C i) C i), ad the result follows.
Lemma A.4. If i, the η C i), where η := l. = 0.3863. Proof. By Lemma A.3 ad.5) C i) C ) = µ 0 µ µ ), because µ 0 = 0 ad µ µ by Lemma A.. For the lower boud we first cosider odd, = m with m. By Lemma A.3,.5), ad.8), C m i) C m m) = m m µ m µ m µ m ) = m [m mh m 4m ) 4mH m 8m )] = m m H m H m ). A.) Note that for k we have l k lk ) = l k ) > k k, ad thus δ m := l H m H m ) = > m k=m k > Hece, if m, the m k=m mδ m = m k=m k ) k while if m =, the δ = η. Therefore, C m i) C m m) = l k lk ) ) k = m m = m m )m ) 8 5 > η, m m l δ m) < m η m m m )m ). If = m is eve, the Lemma A.3,.5),.7), ad.8) similarly yield C m i) C m m) = m m µ m µ m µ m ) = m [m mh m 4m m )H m 4m m )H m 8m)] = m m H m H m ). η ) = η. m Comparig with A.) we fid by the estimate above C m m) < C m m) < η, ad the result follows.
3 Lemma A.5. For ad U uif{,..., }, the sequece E C U ) is strictly icreasig, ad therefore E C U ) = C i) < E CU) = σ /3 =. 0.40. i= Proof. We could use Lemma., Mikowski s iequality, ad umerical calculatios by computer to verify E C U ) < 0.5, but we ca do slightly better. Ideed, from the results i Sectio, oe obtais the formula E C U ) = 7 3 ) 4 3 ) ) H ) 4 3 3 H,. From this expressio it is simple if somewhat laborious) to prove icreasigess. Fially, the limitig value of E C U ) is E CU) = σ /3. Lemma A.6. For i, [ i ) ) i C i) η ] 0. Proof. Fix ad deote the left-had side by x i. By.5) ad A.), for i we have x i x i ) = µ i µ i µ i µ i ) η [ i ) i i) i ) ] ad thus, for i, = H i H i η 4i) x i x i x i ) = i ) ) 8η = 8η i i ) i) [ )/] 8η 8 = 8η 4 8η > 0. Hece x i ) i is covex. Moreover x i = x i, ad thus the miimum is x i0 i 0 = )/. Sice i 0 / i 0, [ i0 ) ) i0 η ] η 4 ) 4 = η C i 0 ) with by Lemma A.4. Hece x i0 0 ad the result follows. Lemma A.7. If i ad i )/ u i/, the u u)c i) 0.05.
4 Proof. The left-had side is ot chaged if we replace i by i ad u by u; hece we may assume that i )/. Moreover if is odd ad i = )/, the, by Lemma A.3, C i) = mi j C j), ad sice E C U ) = 0 whe U uif{,..., }, C i) 0 ad the iequality is trivial. We may thus assume i /. Sice u u) is icreasig o [0, /], we may further assume u = i/. The, by.5), u u)c i) u u) Cu) 3 ) u u)cu) 3 4. As stated i [], it ca easily be checked umerically that max 0 u u u)cu) < 0.033, ad thus u u)c i) < 0.05 follows for 45. The cases i 44 are verified umerically. The maximum value is 59/005. = 0.049, obtaied for = 7 ad i = or 7.) Proof of Theorem A.. Let U uif0, ) ad, for, K 0, λ R, U := U uif{,..., }, ) U ) U W := U U) = U U), f,kλ) := E exp λc U ) Kλ W ), f,k λ) := E exp λc U ) Kλ U U) ) ; ote that f,k λ) f,kλ). Suppose ow that we have foud positive umbers K ad L such that The, by iductio, for every 0, f,kλ),, λ [0, L]. A.3) E e λy e Kλ, λ [0, L]. A.4) Ideed, A.4) is trivial for = 0, ad if ad E e λym e Kλ for m ad λ [0, L], the by the recursio.4), for λ [0, L], E e λy = = i= i= [ { i E exp λ exp[λc i)] E exp { exp[λc i)] exp i= Y i i [ λ i Y i Kλ [ i = E exp [ λc U ) Kλ W ) ] = e Kλ f,kλ) e Kλ. }] Y i C i) ]) [ E exp λ i ) ) ]} i Y i ]) Similarly, if f,k λ) for every ad λ [ L, 0], the E eλy e Kλ ad λ [ L, 0]. for every
5 Thus our goal is to show f,k λ) for suitable K ad λ; sice f,k λ) f,kλ), it suffices to show f,k λ). We follow the argumet i [], omittig may details which remai the same. First, a Taylor expasio yields, usig Lemma A.5, for 0 λ L, ) f,k λ) σ 6 λ K L sup f,kλ) 0 λ L. A.5) Moreover, [ ) f,kλ) = E C U ) 4KλU U)) 3 KU U) C U ) 4KλU U)) exp λc U ) Kλ U U) )]. A.6) Usig Lemma A.4, it follows as i [] that L sup f,kλ) L3Kη 3K L)e L. 0 λ L It is readily checked that for K = ad L = 0.4, this is less tha.547 < K σ, so A.5) shows that f, λ) for 0 λ 0.4. Hece A.3) ad thus A.4) hold with K = ad L = 0.4. For larger L we use agai Lemma A.4 to obtai f,k λ) e λ E e Kλ U U). It is show i [] that the right-had side is at most g K λ) := e λ [ exp Kλ /) ] /Kλ /), ad further that g K λ) < if K = ad 0.4 λ, or if K = L e L ad λ L. It follows that A.3) ad A.4) hold for ay L > 0 ad K = max, L e L). For L λ 0, a Taylor expasio yields [cf. A.5)] f,k λ) σ 6 λ K L sup f,kλ) )). L<λ 0 A.7) Moreover, from A.6) ad Lemmas A.4 ad A.7, for L λ 0 we have f,kλ) η 3 K 0.05 3K L)e ηl. Takig K = 0.5 ad L = 0.58, we fid L sup f,kλ) ) < 0.576 < K σ, ad thus by A.7) L λ 0 f,0.5 λ), 0.58 λ 0. A.8)
6 Fially, for λ 0.58 we take K = η/0.58 <.34. The Kλ η, ad thus, usig Lemma A.6, λc U ) Kλ W λc U ) η λ W [ U ) ) U = λ C U ) η )] 0. Hece f,k λ). This time we thus use f,k istead of f,k.) Combied with A.8), this shows that f,.34 λ) for all λ 0, which completes the proof. Refereces [] Fill, J. A. ad Jaso, S. Approximatig the limitig Quicksort distributio. Techical Report #65, Departmet of Mathematical Scieces, The Johs Hopkis Uiversity. Preprit available from http://www.mts.jhu.edu/~fill/ or http://www.math.uu.se/~svate/. [] Fill, J. A. ad Jaso, S. Quicksort asymptotics. Techical Report #597, Departmet of Mathematical Scieces, The Johs Hopkis Uiversity. Preprit available from http://www.mts.jhu.edu/~fill/ or http://www.math.uu.se/~svate/. [3] Rösler, U. A limit theorem for Quicksort. RAIRO Iform. Théor. Appl. 5 99), 85 00.