Sum solution unclear I have started studying algorithms and currently am reading Skiena's Algorithm Design book. While doing the tasks, I encountered with question that I could not find solution for. I took a look in solution, but don't get how it is being solved. Specifically line Now the third summation goes from j to i+j the formula on closer examination reveals that sum _(k=j)^(i+j) (j+i−k) which is sum _(k=1)^i (k) Can you explain to me how it could be transformed to this?

Gavyn Whitehead

Gavyn Whitehead

Answered question

2022-09-03

Sum solution unclear
I have started studying algorithms and currently am reading Skiena's Algorithm Design book. While doing the tasks, I encountered with question that I could not find solution for. I took a look in solution, but don't get how it is being solved. Specifically line
Now the third summation goes from j to i+j the formula on closer examination reveals that
k = j i + j ( j + i k )  which is k = 1 i ( k )
Can you explain to me how it could be transformed to this?

Answer & Explanation

Vaughn Greer

Vaughn Greer

Beginner2022-09-04Added 15 answers

k = j i + j ( j + i k ) = ( j + i ) k = j i + j 1 k = j i + j k = ( j + i ) ( ( i + j ) j + 1 ) k = j i + j k = ( j + i ) ( i + 1 ) ( i + j ) j + 1 2 ( j + ( i + j ) ) = ( j + i ) ( i + 1 ) i + 1 2 ( 2 j + i ) = ( i + 1 ) ( ( j + i ) 2 j + i 2 ) = ( i + 1 ) 2 j + 2 i 2 j i 2 = ( i + 1 ) i 2 = k = 1 i k .

Do you have a similar question?

Recalculate according to your conditions!

New Questions in High school statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?