Substitution Method: Use the substitution method to show that T(n) is O(n log? (n)): • T(n) = 2T(n/2) + n. Solution: Recursion tree Method: Solve T(n) = T(n/4) + T(n/2) + n²: n² (n/4)² (n/2)² (n/16)² (n/8)² (n/8)² (n/4)² ... ?(1) Total = n²\left(1 + \frac{5}{16} + \left(\frac{5}{16}\right)² + \left(\frac{5}{16}\right)³ + ...\right) = ?(n²) geometric series
Added by Robert Z.
Close
Step 1
To solve the given recurrence relation \(T(n) = T(n/4) + T(n/2) + n^2\) using the recursion tree method, follow these steps: ### Show more…
Show all steps
Your feedback will help us improve your experience
Rosemary Charnley and 82 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Use a recursion tree to determine a good asymptotic upper bound on the recurrence T(n) = 3T(⌊n/2⌋) + n. Use the substitution method to verify your answer.
Akash M.
Draw recursion tree for T(n) = 8T(n/2) + n, and prove the obtained T(n) by substitution method.
3. Use the Substitution Method to prove the following. T(n) = O(n²) is a valid solution for T(n) = { 1 if n=1; 2T(n/3) + n if n>2 4. Give an expression for the runtime T(n) if the recurrence can be solved with the Master Theorem. Otherwise, indicate that the theorem does not apply. T(n) = sqrt(3T(n/3) + log n)
Madhur L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD