#Mergesort Recursion Tree: Big O
26 messages · Page 1 of 1 (latest)
- Wait patiently for a helper to come along.
- Once someone helps you, say thank you and close the thread with:
+close
- Feel free to nominate the person for helper of the week in #helper-nominations
- Do not ping the mods, unless someone is breaking the rules.
- If you're happy with the help you got here, and the server overall, you can contribute financially as well:
This is the example given
wha t
i know what it is but i dont really get how to solve it
Should be possible to solve this exactly.
exactly how
We have:
T(n) = 2T(n/2) + n^3
Let n = 2^k. Then:
T(2^k) = 2T(2^(k - 1)) + 2^(3k)
Let a(k) = T(2^k). Then:
a(k) = 2a(k - 1) + 2^(3k)
This is now a linear recurrence relation. Can you continue from here?
Any progress?
im currently out right now but ill work on it as soon as i get back
Oh, alright.
but im not sure eif this is the method they want us to use but im also sort of clueless on how to do this
like i know i have to make a tree but not how to build it
Well, yeah. I've heard of master theorem Al was talking about above, but I don't know it.
At least, when you solve the recurrence exactly, you'll know what to expect.
where did you get 2T(n/2)?
Well, you wrote it in your picture.
Oh, wait.
You didn't write it correctly, I think.
Well, no matter, the approach is the same.
T(n) = T(n/2) + n^3
Same as above...
a(k) = a(k - 1) + 2^(3k)
thats not the question thats the example
Oh, I see. Well, in any case, the approach is the same.