4

I have an exercise where I need to prove by using the substitution method the following $$T(n) = 4T(n/3)+n = \Theta(n^{\log_3 4})$$ using as guess like the one below will fail, I cannot see why, though, even if I developed the substitution $$T(n) ≤ cn^{\log_3 4}$$ finally, they ask me to show how to substract off a lower-order term to make a substitution proof work. I was thiking about using something like $$T(n) ≤ cn^{\log_3 4}-dn$$ but again, I cannot see how to verify this recurrence.

What I did:

$$T(n) = 4T(n/3)+n$$ $$\qquad ≤ \frac{4c}{3}n^{\log_3 4} + n$$

and then from here, how to proceed and conclude that the first guess fails?

The complete exercise says:

Using the master method, you can show that the solution to the recurrence $T(n) = 4T(n/3)+n$ is $T(n)=\Theta(n^{log_3 4})$. Show that a substitution proof with the assumption $T(n) ≤ cn^{log_3 4}$ fails. Then show how to subtract off a lower-order term to make a substitution proof work.

BRabbit27
  • 767
  • Do you have any familiarity with solving such problems? Do you know what the terms general solution and specific solution means? – Calvin Lin Jan 04 '13 at 22:53
  • Yeah, more or less. I was following Cormen's book of Algorithms and try to solve it using the examples, but I quite don't get it. – BRabbit27 Jan 04 '13 at 23:01
  • This is a standard problem, with a standard approach. You should 'guess' that the substitution is $S(n) = T(n) +kn$, and then calculate that with $k=3$, we get $S(n) = 4S(n/3)$. This is where $\log_3 4$ comes from. – Calvin Lin Jan 04 '13 at 23:04
  • Could you develop more your suggestion, please? – BRabbit27 Jan 04 '13 at 23:11
  • Solving T(n) = A T(n/B) is extremely easy and you should know how to do this. 2) If T(n) = A T (n/B) + f(n), then use a substitution, S(n) = T(n) - g(n), such that g(n) - Ag(n/B) = f(n), which makes S(n) = S(n/B).
  • – Calvin Lin Jan 04 '13 at 23:46