You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We saw that the solution of $T(n) = 2T(\left \lfloor n / 2 \right \rfloor) + n$ is $O(n \lg n)$. Show that the solution of this recurrence is also $\Omega(n \lg n)$. Conclude that the solution is $\Theta(n \lg n)$.
Show that by making a different inductive hypothesis, we can overcome the difficulty with the boundary condition $T(1) = 1$ for recurrence (4.19) without adjusting the boundary conditions for the inductive proof.
Suppose $T(n) \le cn \lg n + n$
$$
\begin{array}{llll}
T(n) & \le & \displaystyle cn\lg n - 2n + n & \\\
& \le & \displaystyle cn\lg n + n &
\end{array}
$$
When $n=1$, $T(n)=0+1=1$.
4.3-5
Show that $\Theta(n\lg n)$ is the solution to the "exact" recurrence (4.3) for merge sort.
We know $T(n) = T(\left \lceil n / 2 \right \rceil) + T(\left \lfloor n / 2 \right \rfloor) + n$ is $O(n \lg n)$.
Based on 4.3-3, $T(n)$ is $\Omega(n \lg n)$.
Therefore, $T(n)$ is $\Theta(n\lg n)$.
4.3-6
Show that the solution to $T(n)=2T(\left \lfloor n/2 \right \rfloor + 17) + n$ is $O(n \lg n)$.
Using the master method in Section 4.5, you can show that the solution to the recurrence $T(n)=4T(n/3)+N$ is $T(n)=\Theta(n^{\log_34})$. Show that a substitution proof with the assumption $T(n) \le n^{\log_34}$ fails. Then show how to subtract off a lower-order term to make a substitution proof work.
Using the master method in Section 4.5, you can show that the solution to the recurrence $T(n)=4T(n/2)+n$ is $T(n)=\Theta(n^2)$. Show that a substitution proof with the assumption $T(n)=cn^2$ fails. Then show how to subtract off a lower-order term to make a substitution proof work.