6

I have a type of expression for a sum of distances between particles, which is as follows for four particles $$ d_{12} + d_{13} + d_{14} + d_{23}+d_{24} + d_{34}, $$ where $d_{12}$ is the distance between particles $1$ and $2$.

I am trying to write this in double summation notation. I checked some online notes on classical mechanics and it suggested for $N$ particles one should have $$ \sum_{i=1}^N \sum_{j \neq i} d_{ij}, $$ but when I expand this I get $$ d_{12} + d_{13} + d_{14} + d_{21} + d_{23} + d_{24} + d_{31} + d_{32} + d_{34} + d_{41} + d_{42} + d_{43}. $$

Can someone explain how my expression should actually be written concisely with a sum and index notation? So you only have distance between particle $1$ and all the other $N-1$ particles, then next step you only have distance between particle $2$ and the other particles apart from particle $1$, and so on.

Edit: I just realised that $$ \sum_{i=1}^N \sum_{j>i} d_{ij} $$ would work instead, but might have to be careful specifying if we run over $N$ or $N-1$ and what the index set runs over.

Sammy Black
  • 28,409
Tom
  • 3,135

2 Answers2

6

You've got the right idea in your edit. As long as it's clear from context that $1 \leq i \leq N$ and $1 \leq j \leq N$, then the only thing that needs to be emphasized is that $i < j$. I prefer the simple notation $$ \sum_{i<j} d_{ij}. $$

Essentially, for $N = 4$ we have these $\binom{4}{2} = 6$ index pairs $$ (1, 2),\, (1, 3),\, (1, 4),\, (2, 3),\, (2, 4),\, (3, 4) $$ and we want to sum over all of them. Presumably, the distances $d_{ij}$ are real numbers, and addition of real numbers is associative and commutative, so it doesn't matter much in which particular order they're summed.

We can imagine the indices arranged in an array, say with $i$ denoting row and $j$ denoting column. So instead of a linear list, we have $$ \begin{array}{ccc} (1, 2) & (1, 3) & (1, 4) \\ & (2, 3) & (2, 4) \\ & & (3, 4) \end{array} $$

If we read across rows, then the explicit notation is $$ \sum_{i=1}^3 \sum_{j=i+1}^4 d_{ij}. $$ Whereas, if we read down columns, then the notation is $$ \sum_{j=2}^4 \sum_{i=1}^{j-1} d_{ij}. $$

This is by no means exhaustive, and there are even situations where a seemingly more exotic ordering of the terms might be called for. For example, we might be interested in summing down the diagonals of the array that have constant difference between indices, say $k = j - i$ so $1 \leq k \leq 3$: $$ \sum_{k=1}^3 \sum_{i=1}^{4-k} d_{i,i+k}. $$

It's a good exercise to figure out what these look like for an arbitrary $N$.

Sammy Black
  • 28,409
4

A more abstract idea I've seen is to sum by indices represented as subsets from an indexing set. For example, define $[4] = \{1,2,3,4\}$. Then you could write

$$\sum_{\{i,j\} \subseteq [4]} d_{ij}$$

(You could also write $\{i,j\} \in \binom{[4]}{2}$, where the choose notation is generalized to picking size 2 subsets from the set $[4]$.)

This seems overkill for two indices, but generalizes well to arbitrary number of indices. In particular, a compact way to write the principle of inclusion-exclusion over finite sets $A_1, \dots, A_n$ is $\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}$ $$\abs{\bigcup_{i=1}^n A_i} = \sum_{\emptyset \ne J \subseteq [n]} (-1)^{-\abs{J}+1} \abs{\bigcap_{j \in J} A_j}$$

While this looks abstract and complicated, it is actually a neat way of specifying all non-empty indexing subsets $J \subseteq [n] = \{1, \dots, n\}$, then taking intersections over the sets $A_j$ for $j \in J$. The simpler alternative using ellipsis and specifying each subset size $k$ is

$$\abs{\bigcup_{i=1}^n A_i} = \sum_{k=1}^n (-1)^{-k+1} \left( \sum_{1 \le i_1 < \cdots < i_k \le n} \abs{A_{i_1} \cap \cdots \cap A_{i_k}} \right)$$

The purpose of putting $i_1 < \cdots < i_k$ in order is so that we choose exactly one "canonical" permutation of $\{i_1, \dots, i_n\}$. If you want to use unique orderings where indices could be equal, that becomes harder. Burnside's Lemma can be used for counting problems. I asked about enumerating these a while ago: What is the connection between sum of tuple products and permutations by cycle?

qwr
  • 11,362