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

The recurrence eqation:
T(1) = 1
T(n) = 2T(n - 1) + n, n 2

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

The correct option is A 2n+1 - n -2
T(1) = 1
T(n) = 2T(n - 1) + n n 2
T(2) = 2T(1) + 2 = 2.1 + 2 = 4
T(3) = 2T(2) + 3 = 2.4 + 3 = 11
T(4) = 2T(3) +4 = 2.11 + 4 =26

T(n -1) = 2T(n -2) + n = 2n - (n - 1) - 2
So, T(n) = 2n+1 - n -2

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Factorisation of Polynomials-Factor Theorem
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon