Dear Student,
Define the following set T = {(i,j) : i <= j}
If f : T ---> S, then we can define a commutative binary operation g from f as follows:
g(i,j) = f(i,j) if i <= j
g(i,j) = f(j,i) if i > j
It is not hard to see that any commutative binary operation can be defined this way, and if f_1, f_2 are distinct functions from T to S, then they define distinct commutative binary operations.
Therefore the number of commutative binary operations is the same as the number of functions from T to S. This number is |S|^|T|. We know |S| = n. What about |T|?
To count the elements of T first count the elements beginning with 1:
(1,1), (1,2), (1,3), ....., (1,n). There are n of them.
Now the ones that begin with 2:
(2,2), (2,3), ...., (2,n). There are n-1 of them.
Continue this process and finally count the ones that begin with n:
(n,n). There is only 1.
So the number of elements of T is 1 + 2 + 3 + ... + n = n(n+1)/2
Thus |S||T| = n[n(n+1)/2], as desired.
This here the same is 23=8
Regards