Double Summation Over a constant

255 Views Asked by At

Can someone please help me explain this double summation? I can't see why its n-k+1? $$ d(I) = \sum_{k=1}^n \sum_{j=1}^k l_{i_j} = \sum_{k=1}^n \left( n-k+1 \right) l_{i_k} $$

2

There are 2 best solutions below

3
On BEST ANSWER

$\begin{array}{cccccccc} \ell_{i_1}\\ \ell_{i_1}&\ell_{i_2}\\ \ell_{i_1}&\ell_{i_2}&\ell_{i_3}\\ \ell_{i_1}&\ell_{i_2}&\ell_{i_3}&\ell_{i_4}\\ \vdots &\vdots&&&\ddots\\ \ell_{i_1}&\ell_{i_2}&\ell_{i_3}&\ell_{i_4}&\cdots&\ell_{i_n} \end{array}$

The way the summation is originally written you read it from left to right and then from top to down.

Try reading it instead from top to down followed by from left to right.

1
On

It may be easier to see why this is true if, in the final expression, you relabel the dummy variable $k$ as $m$. The term $l_{i_m}$ is included in the left-hand sum once for each value of $k$ from $1$ to $n$ inclusive satisfying $k\ge m$. There are $n-m+1$ such values, as in the final expression.