I have the following summation: $$ \sum_{j=i+1}^{n-1}1=n-i-1 $$
I'm trying to understand how the summation evaluates to the expression $n-(i+1)$. Can someone show me algebraically how this is correct?
I have the following summation: $$ \sum_{j=i+1}^{n-1}1=n-i-1 $$
I'm trying to understand how the summation evaluates to the expression $n-(i+1)$. Can someone show me algebraically how this is correct?
One way to see this: The index of summation is $j$. The starting value for $j$ is $i+1$, and the ending value is $n-1$. You are adding a $1$ for each occurrence of $j$. How many copies of $1$ are you adding up?
Define a new index $k:=j-i$. In words, to get the value for $k$, you take the value for $j$ and subtract $i$. So the starting value for $k$ is $(i+1)-i$, which equals $1$, and the ending value for $k$ is $(n-1)-i$. We conclude $$ \sum_{j=i+1}^{n-1}1=\sum_{k=1}^{n-1-i}1 = n-1-i, $$ since you are adding up $n-1-i$ copies of the value $1$.
You can use this device to obtain the general formula $\sum_{i=a}^b 1=b-a+1$.
There is also a pictorial illustration of the general formula: $$\overbrace{\underbrace{1\quad 2\quad 3\quad \cdots\quad a-1}_{\text{$a-1$ items}}\quad a\quad a+1\quad \cdots\quad b-1\quad b}^{\text{$b$ items}}$$