Dice Question Streamline Icon: https://streamlinehq.com

Counting fair words over arbitrary alphabets

Determine, for each alphabet size k and each length n, the number of fair words of length n over a k-letter alphabet A; that is, count the words w in A^n such that for all distinct letters a and b in A the scattered subword counts satisfy binom(w, ab) = binom(w, ba).

Information Square Streamline Icon: https://streamlinehq.com

Background

Fair words are defined as those words w over an alphabet A for which, for every pair of distinct letters a and b, the number of occurrences of the scattered subword ab equals the number of occurrences of ba. Equivalently, for binary alphabets {a,b}, fair words satisfy binom(w, ab) = binom(w, ba) = |w|_a |w|_b / 2, a property that admits a geometric interpretation via areas under the word’s path representation. The paper develops several structural and geometric characterizations of fair words (including links to binomial equivalence classes, partitions, and balanced words) and proves new results such as that balanced fair words are exactly palindromes and connections to least-squares fitting.

For binary alphabets, enumerative aspects have been studied: Prodinger (1979) derived an asymptotic formula for the number of binary fair words of length n and provided methods based on sums of positions, while Černý (2009) tabulated counts for small n and k. However, a general enumeration for arbitrary alphabet sizes (k ≥ 2) remains unresolved. The present paper highlights this as the main outstanding problem concerning fair words.

References

To end with questions, perhaps the main problem about fair words which stays open is the original {C}'s question : count the number of fair words over an arbitrary alphabet.