193 views

1 Answer

0 0 votes

Given:

$T(n) = 7T(n/2) + n^3$

Compare with:

$T(n) = aT(n/b) + f(n)$

Here:

$a = 7$

$b = 2$

$f(n) = n^3$

Now calculate:

$n^{\log_b a} = n^{\log_2 7}$

Since:

$\log_2 7 \approx 2.807$

So:

$n^{\log_2 7} = n^{2.807}$

Now compare $f(n)$ with $n^{\log_b a}$:

$f(n) = n^3$

$n^3$ grows polynomially faster than $n^{2.807}$.

So this is Master Theorem Case 3.

Therefore:

$T(n) = \Theta(f(n)) = \Theta(n^3)$

Final answer: $\boxed{\Theta(n^3)}$

Answer:
Position:
Show:

Related questions

2 2 votes
1 1 answer
277
277 views
2 2 votes
1 1 answer
176
176 views
2 2 votes
1 1 answer
181
181 views
1 1 vote
1 1 answer
212
212 views
GO Classes asked Aug 31
212 views
Let $G$ be a directed graph with nonnegative edge weights, and let $s$ and $t$ be vertices of $G$.Consider the statement:Any shortest path from $s$ to $t$ in $G$ is also ...