1

I am reading a book where the following example is shown.

$$= \sum_{0\le n-j\le n} (a+b(n-j)) $$ $$= \sum_{0\le j\le n} (a+bn-bj) $$

Why is n-j being simplified to j? I don't understand why this is possible? To specify my question, what rule of simplification is being used for the part under the summation sign.

  • You need $n-j\ge 0\implies j\le n$ and $n-j\le n\implies j\ge 0$, hence $0\le j\le n$. What we actually do is changing the order of summation (try to set different values of $j$ in both expressions). – Galc127 Jun 23 '16 at 16:58

2 Answers2

1

It should be clear that $a + b(n-j) = a +bn - bj$, so it is really just a question of how $$ \sum_{0\leq n-j \leq n} = \sum_{0\leq j\leq n} $$

First: I assume that $n$ is a fixed number and the the index variable is $j$. So you just have to convince yourself that when $j$ ranges over an interval such that $0\leq n-j \leq n$, then you get the same as $0\leq j \leq n$. And $$\begin{align} &0\leq n-j \leq n \quad &\Rightarrow \\ &0 \geq j-n \geq -n \quad&\Rightarrow \\ &n \geq j \geq 0 \end{align} $$

Thomas
  • 43,555
1

Addition is commutative so the order in which you add up the terms $a_0, a_1,...,a_n$ doesn't matter.

So saying $\sum_{0\le j \le n} a_j$ doesn't necessarily mean you must add them up in the exact order from $a_0$ first to $a_n$ last. What it really means is $\sum_{j \in \{0,1,.....,n\}} a_j$, i.e. the indexed terms $a_j$ are such that $j$ is between $0$ and $n$ and the terms are, in any order, $a_0,....a_n$.

Notice: $0 \le j \le n \iff 0 \le n - j \le n$. So the set of terms where $j \in \{0,....,n\}$ is the set of terms where $n - j \in \{0,...,n\}$.

So $\sum_{0\le j \le n} a_j = \sum_{0 \le n- j \le n} a_j$.

And to convince ourselves of that we note:

$\sum_{0\le j \le n} a_j = a_0 + a_1 + .... + a_n$

while

$\sum_{0 \le n- j \le n} a_j = a_n + a_{n-1} + .... + a_0$ and we can see they are the same, just with the order of addition reversed.

This might seem silly and pointless but relabeling can lead to radically different interpretations.

In this example for instance:

$\sum_{0 \le j \le n}(a + bn - bj)$ is a pretty complex looking sum. But as the group $j \in \{0,.....n\}$ is the same as the group $n - j \in \{0,....,n\}$ we can regroup/reindex the sum as

$\sum_{0 \le n - j \le n}(a + bn - bj) =$

$\sum_{0 \le n-j \le n}(a + b(n - j))$

Now indexing is indexing. If we simply rewrite $n - j = k$ it doesn't matter if we refer to $a_{n-j}$ as $a_{n-j}$ or as $a_k$.

So $\sum_{0 \le n-j \le n}(a + b(n - j))=$

$\sum_{0 \le k = n-j \le n}(a + b(n - j))=$

$\sum_{0 \le k = n-j \le n}(a + bk)=$

$(a + b*0) + (a + b*1)+ ..... + (a + k*n)=$

$(a + a + a + ..... + a) + b(0+1+2 +3.....) = $

$(n+1)a + b\sum_{0\le k \le n}k$

Which is a much "tighter " sum.

In fact we can take this a "reindexing" a step further and solve $\sum_{0\le k \le n} k$ as:

Let $N = \sum_{0\le k \le n} k = \sum_{0\le n - k \le n} k = \sum_{0\le n - k \le n} (n -k) = \sum_{0\le k \le n} (n-k)$

So $2N = \sum_{0\le k \le n} k + \sum_{0\le k \le n} (n-k)= \sum_{0\le k \le n} [k + (n-k)] = \sum_{0\le k \le n} n = n(n+1)$

So $\sum_{0 \le k \le n}k = N = n(n+1)/2$.

So $\sum_{0 \le j \le n}(a + bn - bj) = (n+1)a + bn(n+1)/2 = (n+1)(a + bn)/2$

fleablood
  • 124,253
  • Wow this is a super insightful answer. Thank you a lot sir/madam! You answered quite a lot of things which were not really clear to me. By the way I am currently working through "The Art of Computer Programming" from Donald E. Knuth. This is section 1.2.2 – Thomas Christopher Davies Jun 24 '16 at 08:52