Suppose you have the following recurrence relation:
T1=1 Tn=Tn-1+3
Fill in the table to show Tn for values 1-5
n Tn
1 1
2 4
3 7
4 10
5 13

T2=T1+3 → 4=1+3
T3=T2+3 → 7=4+3
…
T5=T4+3 → 13=10+3
Using the expansion method with counting, find a closed-form solution to your recurrence. You must provide the number of expansions required and the closed form Provide the first result in the table. You must include enough to show how the answers were obtained. Word NEATLY
T1=1
Tn=Tn-1+3
Tn=Tn-2+3+3

#expansions: (n-1)-1+1) = n-1(final answer)
=T1+3(n-1)
=1+3n-3 = 3n-2
Please prove that your solution is correct, by induction, based on the work i supplied above.



Answer :

Other Questions