Problem

Source: China MO 2024, Day 1, Problem 3

Tags: combinatorics



Let $p \geqslant 5$ be a prime and $S = \left\{ 1, 2, \ldots, p \right\}$. Define $r(x,y)$ as follows: \[ r(x,y) = \begin{cases} y - x & y \geqslant x \\ y - x + p & y < x \end{cases}.\]For a nonempty proper subset $A$ of $S$, let $$f(A) = \sum_{x \in A} \sum_{y \in A} \left( r(x,y) \right)^2.$$A good subset of $S$ is a nonempty proper subset $A$ satisfying that for all subsets $B \subseteq S$ of the same size as $A$, $f(B) \geqslant f(A)$. Find the largest integer $L$ such that there exists distinct good subsets $A_1 \subseteq A_2 \subseteq \ldots \subseteq A_L$. Proposed by Bin Wang