...
Data-Structures
October 13, 2023
Memory-Management
October 13, 2023
Data-Structures
October 13, 2023
Memory-Management
October 13, 2023

GATE 2002

Question 3

The solution to the recurrence equation T(2k) = 3 T(2k-1) + 1, T(1)=1, is:

A
B
C
D
Question 3 Explanation: 
T(2k) = 3T(2k-1) + 1
T(1)=1
k=0; T(1) = 3T(2-1)+1
k=1; T(2) = 3T(20)+1 = 3(1)+1 = 4
k=2; T(4) = 3T(21)+1 = 3(4)+1 = 13
k=3; T(8) = 3T(22)+1 = 3(13)+1 = 40
k=4; T(16) = 3T(23)+1 = 3(40)+1 = 121
Simply go through the options.
Option B:
k=4 ⇒ (34+1-1)/2
⇒ (243-1)/2
⇒ 121
Correct Answer: B
Question 3 Explanation: 
T(2k) = 3T(2k-1) + 1
T(1)=1
k=0; T(1) = 3T(2-1)+1
k=1; T(2) = 3T(20)+1 = 3(1)+1 = 4
k=2; T(4) = 3T(21)+1 = 3(4)+1 = 13
k=3; T(8) = 3T(22)+1 = 3(13)+1 = 40
k=4; T(16) = 3T(23)+1 = 3(40)+1 = 121
Simply go through the options.
Option B:
k=4 ⇒ (34+1-1)/2
⇒ (243-1)/2
⇒ 121
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!