Question
Solve the following recurrence Using Recursion tree method
(i) T(n) = 3T(n/3) + n
(ii) T(n) = 2T(n/2) + n²
(iii) T(n) = T(n/2) + T(n/4) + T(n/8) + n
Answer :
Word Count : 206
_________ ________ _____ ________ _______ _____ _______.
______ ________ ________ ____ _______ __________ ____.
__________ ____ _________ _____ ________ ___.
______ _______ _____ ________ _______.
_________ ____ _________ _______ _________ _____ _________ _________ ____.
________ _________ _____ _________ _____ ____ ______ __________ __________ __________ ___.
___ ___ ____ ____ __________.
_______ __________ _______ ___ ___ _________ _______.
__________ _________ _______ ________ _______ ____ __________ ______ _______ ______ ___.
_________ _______ _______ _____ ____ ____ ______ ______ __________ ___ _________.
__________ _________ _________ ______ _____ _________.
____ ______ _______ _______ _____.
_____ ____ __________ ________ ________ ________ _________.
_______ _______ ____ ______ ________ _______ ________.
____ __________ ___ _________ ________ ___ _________ ____ ___ _____ ___ ________.
___ _______ _________ _______ ___.
_____ ______ ________ ___ _____ __________ _________ ___ ______ ________.
______ __________ ________ _____ _______.
____ _____ _________ ____.
Skip in 10
For (i) (T(n)=3T(n/3)+n): At level 0, the cost is (n). At level 1, there are 3 subproblems of size (n/3), each contributing (n/3), so total cost is (3 \cdot (n/3)=n). At level 2, there are (3^2) subproblems of size (n/3^2), total cost (3^2 \cdot (n/3^2)=n). Thus, each level contributes (n). The recursion continues until (n/3^k=1), giving (k=\log_3 n) levels. Hence,
________ ____ _______ ____ ________ __________._________ ________ _____ ________ _______ _____ _______.
______ ________ ________ ____ _______ __________ ____.
__________ ____ _________ _____ ________ ___.
______ _______ _____ ________ _______.
_________ ____ _________ _______ _________ _____ _________ _________ ____.
________ _________ _____ _________ _____ ____ ______ __________ __________ __________ ___.
___ ___ ____ ____ __________.
_______ __________ _______ ___ ___ _________ _______.
__________ _________ _______ ________ _______ ____ __________ ______ _______ ______ ___.
_________ _______ _______ _____ ____ ____ ______ ______ __________ ___ _________.
__________ _________ _________ ______ _____ _________.
____ ______ _______ _______ _____.
_____ ____ __________ ________ ________ ________ _________.
_______ _______ ____ ______ ________ _______ ________.
____ __________ ___ _________ ________ ___ _________ ____ ___ _____ ___ ________.
___ _______ _________ _______ ___.
_____ ______ ________ ___ _____ __________ _________ ___ ______ ________.
______ __________ ________ _____ _______.
____ _____ _________ ____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.