I'm working my way through the Section 5.4 exercises for the Grimaldi textbook, and the book's answer to one of the exercises doesn't make any sense to me. I was hoping someone could help me understand how it reaches its given answer.
Here's the problem: Let $|A| = 5$. How many closed binary operations on $A$ are commutative?
The book gives the answer $5^{10}$, but that makes little sense to me. When I do the problem, I get $5^{15}$.
Here's how I reach $5^{15}$. There are $5$ functions that have double pairs (i.e., $f(a,a),f(b,b),f(c,c),f(d,d),f(e,e)$), and each of those has $5$ possible answers. Thus, there are $5^5$ potential arrangements for those $5$ inputs. For the rest of the inputs (which should be only $20$, since $25-5=20$), each combination of inputs corresponds with another combination if the function is commutative (i.e., $f(a,b) = f(b,a)$). So we only have to match half (i.e., $10$) of the remaining possible combinations with answers. That leaves us with $5^{10}$ potential arrangements for the remaining $10$ possible inputs. The total number of commutative operations should therefore be $5^{5} \times 5^{10} = 5^{15}$, not $5^{10}$.
Given this discrepancy, I thought I'd share my thoughts for scrutiny and see if I'm missing something. Any help or insight on this would be greatly appreciated. Thank you!