# Order of operations / Precedence in Sigma notation

given this equation:

$$A^t_j=f(k^i_1 \sum_{i=0,i\neq j}^n A^{t-1}_i W_{ij}+k^j_2 A^{t-1}_j)$$

and these two infos:

Notation: What is the scope of a sum?

It seems to me that the subscript determines the scope of sigma, e.g.:

+Aj: $$\sum_{i,j}^n A_i + A_j = \sum_{i,j}^n (A_i + A_j)$$

+A: $$\sum_{i,j}^n A_i + A = (\sum_{i,j}^n A_i) + A = A+\sum_{i,j}^n A_i$$

However, in the article* where I got this equation from they "sigma" Ai * W and then add k * Aj to the sum - ie doing b) instead of a).

Is what they did still valid and not wrong?

*Stylios, C. D. and Groumpos, P. P. (2004) "Modeling Complex Systems Using Fuzzy Cognitive Maps", IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART A: SYSTEMS AND HUMANS, VOL. 34, NO. 1, JANUARY 2004, pp. 155-162.

Edit (29-Mai-17): FYI, I got lucky this time because they provided example calculations. But this is not always the case. In fact, I have a bunch of other papers where I am left puzzled. This is why I kind of hope they did it wrong since otherwise you technically need to contact every author and ask for the intended meaning of his sigma equation.

A word of warning. The subscript $i,j$ in

\begin{align*} \sum_{i,j} A_i+A_j \end{align*}

does not tell anything about the scope of the sigma operator $\Sigma$.

The scope of the sigma operator $\Sigma$ is solely defined via arithmetic precedence rules. The scope is given by the expression that follows immediately the $\Sigma$ and is valid respecting the arithmetic precedence rules up to an operator with precedence level equal to '$+$' or up to the end if no such operator follows.

This implies that \begin{align*} \sum_{i,j}A_i+A_j=\sum_{i,j}(A_i)+A_j=\left(\sum_{i,j}A_i\right)+A_j \end{align*}

It also shows the calculation using \begin{align*} A^t_j&=f(k^i_1 \sum_{i=0,i\neq j}^n A^{t-1}_i W_{ij}+k^j_2 A^{t-1}_j)\\ &=f(k^i_1 \sum_{i=0,i\neq j}^n \left(A^{t-1}_i W_{ij}\right)+k^j_2 A^{t-1}_j) \end{align*} in the referred paper is valid.

Hint: You might find chapter 2: Sums in Concrete Mathematics by R.L. Graham, D.E. Knuth and O. Patashnik helpful. It provides a thorough introduction in the usage of sums.