wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

When n = 22k for some k 0, the recurrence relation T(n) = 2 T(n/2) + n, T(1) = 1 evalutes to:

A
n(log n + 1)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
n log n
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
nlogn
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
nlog n
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A n(log n + 1)
T(n) = 2 . T(n/2) + n ...(1)
= 2 [2 . T(n/4) + n/2 + n]
= (2)2 . T(n/22) + 2n ....(2)
= (2)3 . T(n/23) + 3n ....(3)
= (2)2k) . T(n/22k)) + 2kn
= (2)logn . 1 + loh n . n [ put 2K = log n]
= n + log n . n
= n (log n + 1)

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Special Integrals - 2
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon