• 沒有找到結果。

Wiener Index for Digital Search Trees

4.1 Approximate Counting

4.2.2 Wiener Index for Digital Search Trees

In order to obtain the moments, we will use the Poisson-Laplace-Mellin method. Here, we will prove Theorem 4.2.1 and Theorem 4.2.3. Note that the total path length is already analyzed in [74]. In fact, we will heavily use results from this analysis in our derivation below (for the relevant results see Section 2.5 and Section 2.6 in [74]).

Now, we will start with our analysis. Therefore, set f˜1,0(z) = e−z

n≥0

E(Tn)zn

n! and f˜0,1(z) = e−z

n≥0

E(Wn)zn n!. Then, from (4.11), (4.12) and a straightforward computation, one obtains

f˜1,0(z) + ˜f1,0 (z) = 2 ˜f1,0(z/2) + z,

f˜0,1(z) + ˜f0,1 (z) = 2 ˜f0,1(z/2) + (z + 2) ˜f1,0(z/2) + z2

2 + z (4.13) with ˜f1,0(0) = ˜f0,1(0) = 0. Similarly, set

f˜2,0(z) = e−z

n≥0

E(Tn2)zn

n!, f˜1,1(z) = e−z

n≥0

E(TnWn)zn n!, and

f˜0,2(z) = e−z

n≥0

E(Wn2)zn n!.

Then, again from (4.11), (4.12) with a slightly more involved computation, f˜2,0(z) + ˜f2,0 (z) =2 ˜f2,0(z/2) + 2 ˜f1,02 (z/2) + 4z ˜f1,0(z/2) + 2z ˜f1,0 (z/2)

+ z2+ z

f˜1,1(z) + ˜f1,1 (z) =2 ˜f1,1(z/2) + 2 ˜f1,0(z/2) ˜f0,1(z/2) + z ˜f1,0(z/2) ˜f1,0 (z/2) + (z + 2) ˜f2,0(z/2) + (z + 2) ˜f1,02 (z/2)

+ (2z2+ 5z) ˜f1,0(z/2) +3z2+ 4z 2

f˜1,0 (z/2) + 2z ˜f0,1(z/2) + z ˜f0,1 (z/2) +z3 + 4z2+ 2z

2

f˜0,2(z) + ˜f0,2 (z) =2 ˜f0,2(z/2) + (z3

2 + 3z + 2 )

f˜2,0(z/2) + (2z + 4) ˜f1,1(z/2) + (2z + 4) ˜f1,0(z/2)

+ ˜f0,1(z/2) + 2z ˜f1,0(z/2) ˜f0,1 (z/2) + 2 ˜f0,1(z/2)2 + (2z2+ 4z) ˜f0,1(z/2) + (2z2+ 2z) ˜f0,1 (z/2) +

(z2

2 + 2z + 2 )

f˜1,0(z/2)2+ (z2+ 2z) ˜f1,0(z/2) ˜f1,0 (z/2)

+ z2 2

f˜1,0 (z/2)2+ (z3+ 6z2+ 6z) ˜f1,0(z/2) + (z3+ 5z2+ 2z) ˜f1,0 (z/2) + z4

4 + 2z3+ 4z2+ z, where ˜f2,0(0) = ˜f1,1(0) = ˜f0,2(0) = 0.

Next, we define poissonized variances and covariances by using the pois-sonized variance with corrections which was introduced in Section 3.5.1.

V (z) + ˜˜ V(z) = 2 ˜V (z/2) + z ˜f1,0′′ (z)2,

C(z) + ˜˜ C(z) = 2 ˜C(z/2) + (z + 2) ˜V (z/2) + z ˜f1,0′′ (z) ˜f0,1′′ (z), (4.14) W (z) + ˜˜ W(z) = 2 ˜W (z/2) + (2z + 4) ˜C(z/2) +

(z2

2 + 3z + 2 )

V (z/2)˜ + z2f˜1,0 (z/2)2+ 2z2f˜1,0 (z/2) + z ˜f0,1′′ (z)2 + z2 (4.15) with ˜V (0) = ˜C(0) = ˜W (0) = 0.

We will now apply the ”Poisson-Laplace-Mellin” method to these differential-functional equations. We will start with the mean value.

Mean Value of Wiener Index.

We will start from (4.13). We first apply Laplace transform which yields

(1+s)L [ ˜f0,1(z); s] = 4L [ ˜f0,1(z); 2s]−2 d

dsL [ ˜f1,0(z); 2s]+4L [ ˜f1,0(z); 2s]+1 + s s3 . Next, dividing by Q(−2s) and setting

L [ ˜¯f0,1(z); s] = L [ ˜f0,1(z); s] Moreover, logarithmic differentiation yields

d

2j+s whose Maclaurin series is given by A(s) =

where ¯A(s) =

k≥12k+1(−s)k/(2k+1 − 1). Plugging (4.18) into (4.17) and (4.17) in turn into (4.16) gives

L [ ˜¯f0,1(z); s] =4 ¯L [ ˜f0,1(z); 2s]− 2 d

dsL [ ˜¯f1,0(z); 2s]− 2 ¯A(s) ¯L [ ˜f1,0(z); 2s]

+ 1 + s

s3Q(−2s). (4.19)

The next step is to apply Mellin transform. Therefore, note that from [74], we know that

L [ ˜¯f1,0(z); s] =

{O (|s|−2| log s|) , as s → 0;

O(

|s|−b)

, as s→ ∞

uniformly for s with | arg(s)| ≤ π − ϵ, where b > 0 is an arbitrary large constant. Moreover, again from [74], for Q(−2s) (and consequently also for A(s)), we have the bounds¯

Q(−2s) = {

1 +O(|s|), as s → 0;

O(|s|−b), as s→ ∞, A(s) =¯

{O(|s|), as s→ 0;

O(|s|−b), as s→ ∞ (4.20) again uniformly for s with | arg(s)| ≤ π − ϵ, where b > 0 is an arbitrary large constant. As a consequence of this and Ritt’s theorem (see Chapter 1, Section 4.3 in Olver [163]), the Mellin transform of

˜

s0,1(s) =−2 d

dsL [ ˜¯f1,0(z); 2s] + 1 + s s3Q(−2s),

which we denote by S0,1(ω), exists forℜ(ω) > 3 and the Mellin transform of t˜0,1(s) =−2 ¯A(s) ¯L [ ˜f1,0(z); 2s],

which we denote by T0,1(ω), exists for ℜ(ω) > 1. Moreover, by Proposition 5 in [62], we have, as |t| → ∞,

S0,1(c + it) =O(

e−(π−ϵ)|t|)

, T0,1(c + it) =O(

e−(π−ϵ)|t|)

(4.21) for all c∈ R contained in the fundamental strip. In fact, using the expression for the Mellin transform forL [ ˜f1,0(z); s] from [74], we obtain for S0,1(ω) the expression

S0,1(ω) =Q(2ω−3)Γ(ω)Γ(2− ω)

2Q(2ω−3− 1) +Q(2ω−3)Γ(ω− 1)Γ(2 − ω) Q

+ Q(2ω−2)Γ(ω)Γ(1− ω)

Q .

Note that from this, it follows that (4.21) holds for all c ∈ R. Finally, by applying Mellin transform to (4.19), we have

M [ ¯L [ ˜f1,0]; ω] = S0,1(ω) + T0,1(ω) 1− 22−ω .

From this and the above explicit expression for S0,1(ω), we obtain by inverse Mellin transform

L [ ˜¯f1,0(z); s] = 2s−3log2 1 s +

( 1

log 2 − 1 − 2c )

s−3

+ 1

log 2

k̸=0

Γ(3 + χk)Γ(−1 − χk)s−3−χk+O(

|s|−2| log s|)

where c =

k≥11/(2k−1), χkwas defined in Remark4and the above asymp-totic expansion holds uniformly as s → 0 with | arg(s)| ≤ π − ϵ. Moreover, due to (4.20), the same asymptotic expansion holds for L [ ˜f1,0(z); s] as well.

Next, we apply inverse Laplace transform and obtain

f˜0,1(z) = z2log2z + z2P1(log2z)− z2+O(|z log z|) (4.22) uniformly as z → ∞ with | arg(z)| ≤ π/2 − ϵ, where P1(z) was introduced in Remark 4.

The final step is depoissonization which is done by the closure properties of JS-admisibility. Hence,

E(Wn) = ˜f0,1(n)− n 2

f˜0,1′′ (n) + lower order terms.

Note that from (4.22) and Ritt’s theorem, we obtain that the second term on the right-hand side above is of order O(n log n). Consequently, the above gives the claimed expansion for the mean.

Covariance of Total Path Length and Wiener Index.

Here, we start from (4.14) and use the same method as for the mean. First, from [74], we have that

f˜1,0(z) = z log2z + zP1(log2z) +O(| log z|) (4.23) uniformly as z → ∞ with | arg(z)| ≤ π/2 − ϵ. From this, (4.22) and Ritt’s theorem, we obtain the bounds

z ˜f1,0′′ (z) ˜f0,1′′ (z) =

{O(|z|), as z → 0;

O(| log z|), as z → ∞ (4.24)

uniformly for z with| arg(z)| ≤ π/2 − ϵ.

Next, we apply Laplace transform to (4.14) and divide it by Q(−2s).

Then, by similar manipulations as for the mean, we obtain L [ ˜¯C(z); s] = 4 ¯L [ ˜C(z); 2s]− 2d

dsL [ ˜V (z); 2s] − 2 ¯¯ A(s) ¯L [ ˜V (z); 2s] + ¯g1,1(s), (4.25) where

¯

g1,1(s) = L [z ˜f1,0′′ (z) ˜f0,1′′ (z); s]

Q(−2s) .

Before applying Mellin transform, we note that from [74], we have L [ ˜V (z); s] =¯

{O (|s|−2) , as s→ 0;

O(

|s|−b)

, as s→ ∞

uniformly for s with | arg(s)| ≤ π − ϵ, where b > 0 is an arbitrary large constant. Moreover, from (4.24) and (4.20), we obtain

¯

g1,1(s) =

{O (|s|−1| log s|) , as s → 0;

O(

|s|−b)

, as s→ ∞

again uniformly for s with| arg(s)| ≤ π − ϵ, where b > 0 is an arbitrary large constant. Hence, the Mellin transform of

˜

s1,1(s) =−2d

dsL [ ˜V (z); 2s],¯

which we denote by S1,1(ω), exists forℜ(ω) > 3 and the Mellin transform of

˜t1,1(s) =−2 ¯A(s) ¯L [ ˜V (z); 2s] + ¯g1,1(s),

which we denote by T1,1(ω), exists forℜ(ω) > 1. Also, both Mellin transforms satisfy a bound of the form (4.21) inside their fundamental strips. Moreover, in [74], we showed that

M [ ¯L [ ˜V ]; ω] = G2(ω) 1− 22−ω,

where G2(ω) is analytic forℜ(ω) > 0 and satisfies a bound of the form (4.21) in this half-plane. Consequently, by applying Mellin transform to (4.25),

M [ ¯L [ ˜C]; ω] = S1,1(ω) + T1,1(ω)

1− 22−ω = 22−ω(ω− 1)G2(ω− 1)

(1− 23−ω)(1− 22−ω) + T1,1(ω) 1− 22−ω.

From this by inverse Mellin transform L [ ˜¯C(z); s] = 1

log 2

k

(2 + χk)G2(2 + χk)s−3−χk +O(

|s|−2)

uniformly as s→ 0 with | arg(s)| ≤ π − ϵ. (For G2(ω), the expressions given in Remark 5 was proved in [74]) From (4.20), we get the same asymptotic for L [ ˜C(z); s].

Inverse Laplace transform yields

C(z) = z˜ 2P2(log2z) +O(|z|) (4.26) uniformly as z→ ∞ and | arg(z)| ≤ π/2 − ϵ, where P2(z) is given in Remark 5.

The final step is depoissonization. Therefore, observe that ˜f1,0(z), ˜f0,1(z) and ˜f1,1(z) are all JS-admissible. Hence,

Cov(Tn, Wn) = ˜C(n)− n 2

C˜′′(n)− n2 2

f˜1,0′′ (n) ˜f0,1′′ (n) + lower order terms.

Note that due to Ritt’s theorem, the second term on the right hand side is O(n) and the third term is O(n log n). Hence, our claimed result for the covariance is proved.

Variance of Wiener Index. Next, we turn to the variance of the Wiener

index. We start from (4.15) which we rewrite as

W (z) + ˜˜ W(z) = 2 ˜W (z/2) + 2z ˜C(z/2) +z2 2

V (z/2) + ˜˜ g0,2(z) with

˜

g0,2(z) = 4 ˜C(z/2)+(3z+2) ˜V (z/2)+z2f˜1,0 (z/2)2+2z2f˜1,0 (z/2)+z ˜f0,1′′ (z)2+z2. From [74], we have that

V (z) = zP˜ 2(log2z) +O(1)

uniformly as z → ∞ with | arg(z)| ≤ π/2−ϵ. From this, (4.26), (4.23), (4.22) and Ritt’s theorem it follows that

˜

g0,2(z) =

{O(|z|), as z → 0;

O(|z|2| log z|2), as z → ∞ (4.27)

uniformly for z with| arg(z)| ≤ π/2 − ϵ.

Next, applying Laplace transform to the above differential-functional equation and dividing by Q(−2s) yields

L [ ˜¯W (z); s] =4 ¯L [ ˜W (z); 2s]− 4

Using the same manipulations as for mean and covariance

4 and plugging (4.30) and (4.29) into (4.28) yields

L [ ˜¯W (z); s] = 4 ¯L [ ˜W (z); 2s]− 4 d

dsL [ ˜¯C(z); 2s] + d2

ds2L [ ˜V (z); 2s] + ˜t¯ 0,2(s)

with

˜t0,2(s) =− 4A(s) ¯L [ ˜C(z); 2s] + 2A(s) d

dsL [ ˜V (z); 2s]¯ + (A(s)2+ B(s)) ¯L [ ˜V (z); 2s] + ¯g0,2(s).

Before we apply Mellin transform, note that from (4.27) and (4.20),

¯

g0,2(s) =

{O(|s|−3| log s|2), as s→ 0;

O(|s|−b), as s→ ∞

uniformly for s with | arg(s)| ≤ π − ϵ, where b > 0 is an arbitrary large constant. Moreover,

B(s) =

{O(1), as s→ 0;

O(|s|−b), as s→ ∞

again uniformly for s with | arg(s)| ≤ π − ϵ, where b > 0 is an arbitrary large constant. From this and corresponding bounds for A(s), ¯L [ ˜C(z); s]

and ¯L [ ˜V (z); s] obtained in the analysis of the mean and covariance, we see that the Mellin transform of ˜t0,2(s), which we denote by T0,2(ω), exists for ℜ(ω) > 3. Similarly, the Mellin transform of

˜

s0,2(s) =−4d

dsL [ ˜¯C(z); 2s] + d2

ds2L [ ˜V (z); 2s],¯

which we denote by S0,2(ω), exists for ℜ(ω) > 4. Both of these Mellin transforms satisfy a bound of the form (4.21) inside their fundamental strip.

Moreover, observe that using the expressions from the analysis of the covari-ance, S0,2(ω) is given by

S0,2(ω) = 22−ω(23−ω+ 1)(ω− 1)(ω − 2)G2(ω− 2)

(1− 23−ω)(1− 24−ω) +23−ω(ω− 1)T1,1(ω− 1) 1− 23−ω , where G2(ω) is an analytic function for ℜ(ω) > 0, T1,1(ω) is an analytic function for ℜ(ω) > 1 and both satisfy a bound of the form (4.21) in their half-plane of analyticity. Overall, we obtain for the Mellin transform of L [ ˜¯W (z); s]

M [ ¯L [ ˜W ]; ω] =S0,2(ω) + T0,2(ω) 1− 22−ω

=22−ω(23−ω+ 1)(ω− 1)(ω − 2)G2(ω− 2) (1− 22−ω)(1− 23−ω)(1− 24−ω) +23−ω(ω− 1)T1,1(ω− 1)

1− 23−ω + T0,2(ω) 1− 22−ω.

From this, by applying inverse Mellin transform L [ ˜¯W (z); s] = 1

log 2

k

(3 + χk)(2 + χk)G2(2 + χk)s−4−χk +O(|s|−3−ϵ) uniformly as s→ 0 with | arg(s)| ≤ π − ϵ. Moreover, due to (4.20), the same is also true forL [ ˜W (z); s].

Again, we apply inverse Laplace transform and obtain W (z) = z˜ 3P2(log2z) +O(|z|2+ϵ) uniformly as z→ ∞ with | arg(z)| ≤ π/2 − ϵ.

The final step is the depoissonization step where as above we use the closure properties of JS-admissiblity. By these results, ˜f0,2(z) and ˜f0,1(z) are both JS-admissible. Consequently,

Var(Wn) = ˜W (n)− n 2

W˜′′(n)−n2 2

f˜0,1′′ (n)2+ smaller order terms.

By Ritt’s theorem, the second term on the right-hand side isO(n2) and the third term is O(n2log2n). From this our result follows (the claimed error term in Theorem 4.2.1 is obtained by a slightly refined analysis which we leave as an exercise to the reader).

This concludes our proof of Theorem 4.2.1 and consequently also Corol-lary4.2.2. We will use now the latter to give a proof of Theorem 4.2.3. As a second ingredient, we need the following central limit theorem for the total path length.

Theorem 4.2.4 (Jacquet and Szpankowski; [98]). We have,

Tn− E(Tn)

Var(Tn)

−→ X,d

where X has a standard normal distribution.

Proof of Theorem

4.2.3. First set

Xn= Tn− E(Tn)

Var(Tn). Then, by the above result

Xn

−→ X,d

where X has a standard normal distribution. Consequently, (Xn, Xn)−→ (X, X).d

Next, define

Yn = Wn− E(Wn)

Var(Wn) Tn− E(Tn)

Var(Tn).

Note that

E(Yn2) = E(Wn− E(Wn))2

Var(Wn) + E(Tn− E(Tn))2

Var(Tn) − 2E(Wn− E(Wn))(Tn− E(Tn))

Var(Wn)Var(Tn)

= 2− 2ρ(Tn, Wn).

Hence, by Markov’s inequality P (|Yn| ≥ ϵ) ≤ E(Yn2)

ϵ −→ 0, as n→ ∞.

Thus, Yn −→ 0 and consequently (0, YP n)−→ (0, 0) (here,P −→ denotes conver-P gence in probability). Using Slutsky’s theorem (also called Cramér’s theorem;

see Theorem 11.4 in Gut [87]) now implies

(Xn, Xn) + (0, Yn)−→ (X, X).d Since

(Xn, Xn) + (0, Yn) = (

Tn− E(Tn)

Var(Tn),Wn− E(Wn)

√Var(Wn) )

this proves our claim.