This summation came up because I wanted to calculate the number of terms in this set $$\{(i,j) | i > j; i,j = 1,...n\}$$
The summation is equivalent to the number of terms right?
This summation came up because I wanted to calculate the number of terms in this set $$\{(i,j) | i > j; i,j = 1,...n\}$$
The summation is equivalent to the number of terms right?
On
Let $A=\{(i,j) | i > j; i,j = 1,...n\}$, $B=\{(i,j) | i < j; i,j = 1,...n\}$ and $C=\{(i,j) | i = j; i,j = 1,...n\}$.
$A$, $B$ and $C$ are mutually disjoint and $A\cup B\cup C=\{(i,j) | i,j = 1,...n\}$.
By symmetry, We have $|A|=|B|$.
\begin{align*} |A|+|B|+|C|&=|\{(i,j) | i,j = 1,...n\}|\\ 2|A|+n&=n^2\\ |A|&=\frac{n^2-n}{2} \end{align*}
On
Just change the order of your summation: $$\sum_{i=1}^n \sum_{j=i+1}^n 1= \sum_{j=2}^n \sum_{i=1}^{j-1} 1 = \sum_{j=2}^n {(j-1)}=\sum_{j=1}^{n-1}j=\frac{n(n-1)}{2}$$
$$\sum_{j=i+1}^n1=n-(i+1)+1=n-i$$
$$\sum_{i=1}^n(n-i)=\sum_{k=1}^{n-1}k=?$$ setting $n-i=k$