algorithm - sum of series AP GP clrs appendix A.1-4 -


i trying prove equation given in clrs exercise book. equation is:

sigma k=0 k=infinity (k-1)/2^k = 0 

i solved lhs answer 1 whereas rhs should 0 following solution:

let's s = k/2^k = 1/2 + 2/2^2 + 3/2^3 + 4/2^4 .... 2s = 1 + 2/2 + 3/2^2 + 4/2^3 ...  2s - s = 1 + ( 2/2 - 1/2) + (3/2^2 - 2/2^2) + (4/2^3 -     3/2^3).. s = 1+ 1/2 + 1/2^2 + 1/2^3 + 1/2^4.. s = 2       -- eq 1  let's s1 = (k-1)/2^k = 0/2 + 1/2^2 + 2/2^3 + 3/2^4...  s - s1 = 1/2 + (2/2^2 - 1/2^2) + (3/2^3 - 2/2^3) + (4/2^4 - 3/2^4).... s - s1 = 1/2 + 1/2^2 + 1/2^3 + 1/2^4...            = 1 eq 1 2 - s1 = 1 s1 = 1 

whereas required rhs 0. there wrong solution? thanks..

yes, have issues in solution problem.

while correct in formulating value of s, have calculated value of s1 incorrectly. missed substituting value k=0 in s1. whereas, s, after putting value of k, first term 0, no effect.

therefore,

s1 =  (k-1)/2^k = -1 + 0/2 + 1/2^2 + 2/2^3 + 3/2^4...  // missed -1 here because started substituting values k=1 s - s1 = -(-1) + 1/2 + (2/2^2 - 1/2^2) + (3/2^3 - 2/2^3) + (4/2^4 - 3/2^4).... s - s1 = 1 + (1/2 + 1/2^2 + 1/2^3 + 1/2^4...)        = 1 + 1        = 2.  eq 1 2 - s1 = 2 s1 = 0. 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -