A function f applied is applied to the Cartesian product of the set $ s = \{a,b\} $ :
f(a,a) , f(a,b) , f(b,a) , f(b,b)
I think it's ok to ignore the output of the function f except to say that the output of f is commutative in terms of its arguments : f(a,b) == f(b,a)
for a set $ s = \{a,b,\,c\} $
the possible functions are :
f(a,a),f(b,b),f(c,c),f(a,b),f(a,c),f(b,a),f(b,b),f(c,a),f(c,b)
Of interest here is f(a,b) , (f(a,c) , f(b,c) -> 3 comparisons
Is there a theorem or proof that describes
if n=2 then 1 comparison required, if n=3 then 3 comparison required ?
This is my approach so far but I'm unable to show number of comparisons required for set of size n :
For set s of size n there exists $n^2$ pairs, to find 'unique' comparison remove self comparisons. A self comparison is one where a pair contains same elements such as (a,a) , (b,b) .
If $s = \{a,b\}$ there are $2^2$ = 4 pairs. Remove self comparisons , self comparisons are of size n. In this case n=2 so $4^2-2=2$. There are two pairs but just one is of interest as f(a,b) , f(b,a) will yield the same result. I'm struggling how to describe that I can remove f(a,b) or f(b,a).