2nd January 2026

AMM Problem 12548 Solution

Abstract Algebra: Counting a family of discrete functions

In this article, I provide the solution to AMM Problem 12548. This article is being published a day after the AMM deadline!
This is part of my December 31st 2025 deadline, of which I solved 5/7 problems that I'm sharing here! This is the 3rd such article.

This problem is about counting, for all $n \in \mathbb{N}$, the number of functions $f: [n^2] \rightarrow [n]$ such that $\exists g: \mathbb{Z} \rightarrow [n]$ surjection such that for every $a+b$ even:

\[ f(g(a), g(b)) = g(\frac{a+b}{2}) \]

This problem taught me many interesting properties of medial operations. It's quite a lot of abstract algebra hidden in this problem. Despite the constraint appearing simple, it is very tricky to combine the several observations about $f,g$ into a whole proof.

I hope you enjoyed reading the article

Any feedback is greatly appreciated!