I just need help solving this problem. I know I'm supposed to be using the Master's Theorem but I don't know where to start
Asked
Active
Viewed 106 times
-3
-
6The solution is a direct application of the theorem. You just need to read the statement and check which condition applies. – Steven Mar 06 '22 at 21:47
-
2And if you can't figure it out, calculate T(729) by hand. – gnasher729 Mar 06 '22 at 23:45
-
2Does this answer your question? Solving or approximating recurrence relations for sequences of numbers – xskxzr Mar 07 '22 at 07:07
1 Answers
0
$$T(n)=3T\left(\frac n3\right)+3n=9T\left(\frac n9\right)+3\frac n3+3n=27T\left(\frac n{27}\right)+3\frac n{27}+3\frac n3+3n=\cdots$$
So for an exact power of $3$, you get
$$nT(1)+3\frac{3n-3}2.$$
-
1
-
1I think you lost a factor 3 at the 3 (n/3) which should be 9 (n/3). And you do that for every recursion level, which means k times if n = 3^k, or a factor of log_3(n) – gnasher729 Mar 07 '22 at 12:30