简体   繁体   中英

How to solve the following recurrence using the substitution method?

I need to prove a tight bound on the following recurrence using the Substitution method:

T(n) = 2T(n/2) + n/log(n)

I have arrived to the "guess" part of the Substitution method and know that T(n) is O(n*log(log(n))) by using recursion tree and iteration method. But I have trouble figuring out how to proceed from the inductive step both for big-O and Omega:

Assume  T(n/2) <= c*(n/2)log(log(n/2))
T(n) = 2T(n/2) + n/log(n) <= 2c*(n/2)log(log(n/2)) + n/log(n)

Assume  T(n/2) => c*(n/2)log(log(n/2))
T(n) = 2T(n/2) + n/log(n) => 2c*(n/2)log(log(n/2)) + n/log(n)

Assume

T(n/2) <= (n/2) log log (n/2) = (n/2) log (log n - 1).

Then

T(n) = 2T(n/2) + n/log n
     <= n log (log n - 1) + n/log n
     = n log log n - n (log log n - log (log n - 1) + 1/log n),

so it suffices to show that log log n - log (log n - 1) >= 1/log n , which is an instance of the general inequality log k - log (k - 1) >= 1/k , proved by integrating 1/x from x = k - 1 to x = k and applying the mean value theorem. (Visually, a rectangle of width 1 and height 1/k fits under the curve of 1/x from x = k - 1 to x = k .)

The lower bound is similar; use the inequality log k - log (k - 1) <= 1/(k - 1) <= 2/k for k >= 2 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM