How do I succinctly note the sum of $(n-1)+(n-2)+...$?

202 Views Asked by At

I was playing with numbers and wanted to see how many possible connections there are in a network of $n$ nodes. I found that the answer was equal to the number of nodes minus one, plus the number of nodes minus two, until zero because each node can connect to every other node ($n-1$ other nodes), but then since this is undirected, each subsequent node already defined that connection, so the second node can only connect to $n-2$ nodes.

So, a network of $5$ nodes has $10$ connections — $\quad4+3+2+1$. This looks very similar to factorials, and I figured there was some simplified form for representing this. If not, how would I express this in sigma notation?

Forgive my ignorance and also note I've found that the interconnectivity of a network can be defined with $n(n-1)/2$ (or not divided by 2 for directed edges), and my question is about notation, not graphs.

5

There are 5 best solutions below

0
On

You want $$(n-1)+(n-2)+\ldots+(n-n)=\sum_{k=1}^n(n-k)\;,$$

which can be simplified to $\displaystyle\sum_{k=1}^{n-1}k$ (or to $\displaystyle\sum_{k=0}^{n-1}k$ if you insist on keeping the $0$ term).

0
On

$$\sum\limits_{i=1}^{n-1} i$$ where n was your number of nodes.

0
On

You have already noticed that $\sum_{i=1}^{n} i = n(n-1)/2$. Notice this is also the binomial coefficient: $\binom{n}{2}$.

The network you are describing is called a complete graph $K_{n}$. So the binomial coefficient counts the number of subsets of $\{1, ..., n\}$ of size $2$. Notice each such subset is an edge.

Also, note that $\binom{n}{k}$ reads "n choose k", and $\binom{n}{k} = n!/k!(n-k)!$.

0
On

$$ 1+2+3+\cdots+(n-1) = \sum_{k=1}^{n-1} k. $$

Similarly $\displaystyle 1^2+2^2+3^2+4^2+\cdots+n^2 = \sum_{k=1}^n k^2$, etc. That is how the "$\displaystyle\sum$" notation is used.

0
On

This "factorial with adding" can be expressed with triangular numbers.

N-th triangular number is the sum of all whole numbers up to n. It's notation is $$T_{n}$$.

Therefore, the whole answer to your question:

$$T_{n}=\sum^{n}_{k=1}k=n+(n-1)+(n-2)+\dots+1$$