-2

Can anybody help me to Solve the following recurrence using iteration/expansion method?

1.T(n)= T(n-1)+ n,T(0)= 1

The solution should be like this way

T(k)=T(K-1)+K

T(K-1)=T(K-2)+(K-1)

......................
  • this sounds like a home work; if so think your self, and ask when got stuck; else please clearify – halfbit Nov 10 '13 at 21:06
  • got stuck in the last line for the question 1.the form i found after solution is T(k)=1+1+2+3...... which does not belongs to any series! – user2759169 Nov 10 '13 at 21:12
  • this sounds like [fibionacci](http://en.wikipedia.org/wiki/Fibonacci_number), but i still dont get the question, or was that you question -> fibionacci – halfbit Nov 11 '13 at 18:44
  • no my question was not fibionacci! but i would not mind if the resultant series forms a fibionacci series.my target is to expand the equation using iteration/expansion method such a way so that i get a non recurrence form! – user2759169 Nov 12 '13 at 07:59
  • oh I need glasses, I read 1,1,2,3 instead of 1+1+2+3, sry, answer below – halfbit Nov 18 '13 at 18:12

1 Answers1

0

so given is:

1. T(n)= T(n-1) + n
2. T(0)= 1

so it gets like this:

T(0) = 1
T(1) = T(0) + 1 = 2
T(2) = T(1) + 2 = 4
T(3) = T(2) + 3 = 7
T(4) = T(3) + 4 = 11
T(5) = T(4) + 5 = 16

if you look closer it is:

T(k) = sum(k) +1    // sum(k)=1+2+3+4+5 ... + k-1+k

Take a look at Gauss The sum of all natural numbers, he told us, that sum(k)=(k^2+k)/2

so your solution should be:

T(k) = 1 + (k^2+k)/2
halfbit
  • 3,773
  • 2
  • 34
  • 47