Maximum Number of Distinct Frequency Counts in an Array
Context
You are given an array of length n ≥ 1 whose elements are arbitrary integers (values may repeat). For each distinct value, compute its frequency (number of occurrences). Among these frequencies, some values may coincide. We ask:
-
What is the maximum possible number of distinct frequency values that can appear?
-
Give a tight expression in terms of n, prove it is optimal, and present constructions that achieve the bound.
Task
-
Define the function m_max(n): the maximum number of distinct frequency counts achievable by any length-n array.
-
Derive a closed-form expression for m_max(n) in terms of n.
-
Prove optimality (upper bound and matching construction).
-
Provide small illustrative examples.