The word $\sa{aab}$ is diverse but $\sa{aa}$ and the empty word are not. The word $\sa{abbccc}$ itself is diverse but the word $\sa{abcabcabc}$ has no diverse factor. The longest diverse factor of $\sa{cbaabacccbba}$ is $\sa{cbaabaccc}$.
Problem 120: Diverse Factors over a Three-Letter Alphabet |
A word $w$ is called diverse if the numbers of occurrences of its letters are pairwise different (some letters may be absent in $w$). The problem deals with diverse factors occurring in a word $x\in\{\sa{a},\sa{b},\sa{c}\}^*$.
Obviously any word of length at most 2 has no diverse factor and a word of length $3$ is not diverse if it is a permutation of the three letters. The straightforward observation follows.
Observation 1. The word $x\in\{\sa{a},\sa{b},\sa{c}\}^*$, $|x|\geq 3$, has no diverse factor if and only if its prefix of length 3 is not diverse, that is, is a permutation of the 3 letters, and is a word period of $x$.