Using the master theorem to find an expression for T(n) in Big Oh

166 Views Asked by At

Solve the recurrence relation $T(n)$ = $2T$($\frac n 3$) + $c\sqrt2^{logn}$ , T(1) = 1, by finding an expression for T(n) in big-Oh notation.

So I'd like to solve this using the master theorem but I was confused on how to use it here.

Master Theorem -

$f(n) = af(\frac n b) + Cn^d$

O $(n^d)$ When a < $b^d$

O $(n^{d}log(n))$ When a = $b^d$

O $(n^{log_ba})$ When a > $b^d$

going off of this

we get

a = 2

and $b^d$ = $3^{logn}$

now as far as the relation goes as long as n>= 5

a < $b^d$

but I'm not sure if that's how it's supposed to be used,since I am a beginner. How do i deal with the fact that it's $logn$ and how can T(1) = 1 be used in this case?

1

There are 1 best solutions below

0
On BEST ANSWER

$\sqrt{2}^{\log n} =e^{\frac12\log 2 \log n} =(e^{\log n})^{\frac12\log 2} =n^{\frac12\log 2} $ so $d = \frac12\log 2 =\log\sqrt{2} $.

Since $a=2, b=3$, $b^d =3^{\log\sqrt{2}} =e^{\log 3\log\sqrt{2}} \sim 1.46338 $ so that $a > b^d$ (I originally had "<" here - oops) and the third case, $f(n) = O(n^{log_ba}) =O(n^{\log_32}$ holds.

$\log_32 \approx 0.5991 $.