39

I've seen how nesting works with a simple $(i+j)$ but this problem below is tripping me up. It's either because of the multipliers or because they each start at zero but I get 60, and the answer I believe is 78. Not sure where I'm missing the last 18.

$$\sum_{i=0}^2\sum_{j=0}^3(2i+3j)$$

For the inner sum, I come up with $18$ $((0+0) + (0+3) + (0+6) + (0+9))$

I plug that into the outer sum $((0+18) + (2+18) + (4+18))$

What am I doing wrong? This discrete math book is horribly short in it's explanation (it only speaks of double sums in product form) and it throws curve balls right off the bat. It doesn't do much to build confidence in the material.

Thanks for the help and the place to vent!

Blue
  • 83,939
hobbes131
  • 671
  • 10
    I don't think this was a dumb question at all, either in form or in content. – MJD Jul 21 '12 at 12:53
  • Breaking it up into separate sums $\sum_{i=0}^2\sum_{j=0}^{3}2i$ and $\sum_{i=0}^2\sum_{j=0}^{3}3j$ would simplify matters. – NovaDenizen Nov 22 '13 at 20:16

5 Answers5

50

What you are doing wrong is that you need to do the inner sum three times, once for each value of $i$. And when $i$ changes, the value of the inner sum changes by more than just $2i$: you add $2i$ four times (once for each of $j=0$, $1$, $2$, and $3$), so you end up adding $8i$, not just $2i$.

When $i=0$, the inner sum is $18$, as you compute. Then, when $i=1$, the inner sum is $(2+0) + (2+3) + (2+6) + (2+9) = 8+18 = 26$, not $2+18=20$, as you compute.

Then when $i=2$, the inner sum is $(4+0)+(4+3) +(4+6) + (4+9) = 16+18 =34$ (not, as you compute, $22$).

So the total value is the sum of these three quantities, $18+26+34 = 78$.

To do it correctly symbolically, you can proceed as follows: the inner sum is: $$\begin{align*} \sum_{j=0}^3(2i+3j) &= \sum_{j=0}^32i + \sum_{j=0}^33j\\ &= 2i\sum_{j=0}^31 + 3\sum_{j=0}^3 j\\ &= 2i(4) + 3\left(0+1+2+3\right)\\ &= 8i + 18. \end{align*}$$ So then the outer sum is: $$\begin{align*} \sum_{i=0}^2\left(\sum_{j=0}^3(2i+3j)\right) &= \sum_{i=0}^2(8i+18)\\ &= \sum_{i=0}^28i + \sum_{i=0}^218\\ &= 8\sum_{i=0}^2i + 18\sum_{i=0}^21\\ &= 8(0+1+2) + 18(3)\\ &= 24 + 54\\ &= 78. \end{align*}$$

Arturo Magidin
  • 417,286
  • 4
    That is 1000% better that the textbook. Thank you, that is exactly what I needed to get these problems done! – hobbes131 Jul 21 '12 at 05:25
6

Just grind away:

$((0+0)+(0+3)+(0+6)+(0+9))+((2+0)+(2+3)+(2+6)+(2+9))+((4+0)+(4+3)+(4+6)+(4+9)) = 78$

copper.hat
  • 178,207
3

$$\sum_{i=0}^2\sum_{j=0}^3(2i+3j)=2\sum_{i=0}^2i\sum_{j=0}^3 1+3\sum_{j=0}^3j\sum_{i=0}^21 \\~~~~~~~~~~~~~~=8\sum_{i=0}^2i+9\sum_{j=0}^3 j\\~~~~~~~~~~~~=8\times 3+9\times 6\\\!\!\!\!\!=78.$$

pshmath0
  • 11,208
3

I hope maybe a related presentation familiar to programmers helps readers "see" the double summation better. With double summation, I imagine a 2d matrix with i=rows 0,1,2 and j = columns 0,1,2,3:

\begin{matrix} & j=0 & j=1 & j=2 & j=3 \\ i=0 & 0 & 3 & 6 & 9 \\ i=1 & 2 & 5 & 8 & 11 \\ i=2 & 4 & 7 & 10 & 13 \end{matrix}

With each row, the value of i is fixed, and j varies. Then our problem is just, how do we reduce this to a single number? Well, we sum it... twice! One pass in each dimension. First we can sum across each row's columns to "smoosh" into one column (you could equally add down each column instead to produce [6,15,24,33]):

\begin{matrix} 0+3+6+9&=18\\ 2+5+8+11&=26\\ 4+7+10+13&=34 \end{matrix}

Finally we sum down that column to get to the shape we expect, a single number: 78

0

If in a double summation there involves a finite sum, then the order of the summation can be interchanged.

Indeed,

$$∑_{i=0}^2\;∑_{j=0}^3 \;(2i+3j)=∑_{i=0}^2\;∑_{j=0}^3\;2i+∑_{i=0}^2\;∑_{j=0}^3\;3j$$ $$=∑_{j=0}^3\;∑_{i=0}^2\;2i+∑_{i=0}^2\;∑_{j=0}^3\;3j$$ $$=∑_{j=0}^3\;(0+2+4)+∑_{i=0}^2\;(0+3+6+9)$$ $$=∑_{j=0}^3\;6+∑_{i=0}^2\;18$$ $$=4×6+3×18=78$$

Myo Nyunt
  • 317