You want to show that the solution of T(n) = 4T(n/2) + n is O(n²), using the substitution method. Unfortunately, if you simply recursively plug in Cn² to try to make the method go through, it doesn't work: on the left side of the inequality you are trying to prove you are left with an extra term, so the left side isn't the right side. The extra term is 0 However, you can make the proof work by modifying the induction. Instead of proving it is < Cn², instead, you prove that it is ≤ Cn² - Dn. The smallest value of D that will work is greater than or equi (Once you prove that T(n) ≤ Cn² - Dn, it is easy enough to show that that is € O(n²).)

Question

data structure and algorithm

You want to show that the solution of T(n) = 4T(n/2) + n
is O(n²), using the substitution method. Unfortunately, i
you simply recursively plug in Cn² to try to make the method
go through, it doesn't work: on the left side of the inequality
you are trying to prove you are left with an extra term, so the
left side isn't the right side. The extra term is
0
However, you can make the proof work by modifying the
induction. Instead of proving it is < Cn², instead, you prove
that it is Cn² - Dn. The smallest value of D that will
work is greater than or equi
(Once you prove that T(n) ≤ Cn² - Dn, it is easy enough
to show that that is € O(n²).)
Transcribed Image Text:You want to show that the solution of T(n) = 4T(n/2) + n is O(n²), using the substitution method. Unfortunately, i you simply recursively plug in Cn² to try to make the method go through, it doesn't work: on the left side of the inequality you are trying to prove you are left with an extra term, so the left side isn't the right side. The extra term is 0 However, you can make the proof work by modifying the induction. Instead of proving it is < Cn², instead, you prove that it is Cn² - Dn. The smallest value of D that will work is greater than or equi (Once you prove that T(n) ≤ Cn² - Dn, it is easy enough to show that that is € O(n²).)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer