CLRS icon indicating copy to clipboard operation
CLRS copied to clipboard

Exercise 4.5-5

Open clear-life opened this issue 5 years ago • 2 comments

The answer is correct,but the process of the proof is wrong. It asks us to prove a * f(n/b)≤c * f(n) for c<1 is invalid. Now a=1, b=2 ,f(n)=n(2−cosn). So the first step is (n/2) * (2−cos(n/2)) < c * n(2−cosn)

clear-life avatar Jan 27 '20 04:01 clear-life

Now I found another bug:f(n)= n(2−cosn) maybe is not equal to Ω(n^(1+ε)) for some constant ε > 0. So f(n)=n(2−cosn) doesn‘t meet the condition of the master theorem case 3.

clear-life avatar Jan 27 '20 04:01 clear-life

@clear-life Due to a=1, b=2, the polynomial is n^{lg 1}, which is 1, so f(n) only need to be in Ω(n^ε).

run27017 avatar May 08 '20 04:05 run27017