0

I'm trying to solve this recurrence equation in this way:

$$ T(0)=O(1)\\ T(n) = 2T(n - 1) + n \\ = 2[ 2T(n - 2) + (n - 1) ] + n \\ = 2[ 2[ 2T( n - 3 ) + ( n - 2 ) ] + ( n - 1 ) ] + n \\ = 2³T(n-3) + 2²(n-2) + 2(n-1) + n$$

And I get:

$$ \sum_{i=0}^{n} 2^i(n-i) $$

That's right?

pipeline
  • 3
  • 2
  • We already have detailed advice on how to solve recurrences. Checking your specific answer is off-topic here, since it's only ever going to be interesting to you. – David Richerby Mar 26 '18 at 10:23
  • I have a book with the same information, but that does not solve my question for this specific exercise, thank you. – pipeline Mar 26 '18 at 13:52

0 Answers0