I’m writing an algorithm that needs to be put in formal notation. It takes two inputs and iterates over:
- $(1, 2), (1, 3), (1, 4), ..., (1,n)$,
- then $(2, 3), (2, 4), (2, 5), ..., (2,n),$
- then $(3, 4) (3, 5), (3, 6), ... (3,$n$),$
- … and all the way to ($n - 1$, $n$).
The items are taken from a table of size $n^2$, but the operations performed on them will be commutative. They need to be performed in a strict order to avoid duplicates. The results of the process will be added to a list, each of which will be checked against all previous results in order, again, to avoid duplicates. However, within the results list order doesn’t matter.
I’m imagining something that looks like a nested big-sigma “sum from $1$ to $n$”, but this isn’t addition; it’s iterating over the top-right half of a square table to produce the members of a list. How do I formally write this?