Skip to main content
Loris Simonetti's user avatar
Loris Simonetti's user avatar
Loris Simonetti's user avatar
Loris Simonetti
  • Member for 3 years, 2 months
  • Last seen more than 1 year ago
awarded
Loading…
awarded
awarded
comment
Prove by induction $T(n) = T(\lfloor\frac{n}{2}\rfloor)+n^2 \in \Theta (\log_2 n)$
@Steven with $[x]$ I mean the floor, but I'm not able to write it in LaTeX.
comment
Prove by induction $T(n) = T(\lfloor\frac{n}{2}\rfloor)+n^2 \in \Theta (\log_2 n)$
I thought so because when I went to each recursive call I work only on half of the previous one, so the height of the call tree should be $ \log_2 (n) $ and the complexity $ \sum_ {i = 1} ^ {\log_2 (n)} costwhile = \sum_ {i = 1} ^ {\log_2 (n)} \theta (1) = \theta (\log_2 (n)) $. do I have to think differently?
comment
Loading…
awarded
Loading…
Loading…