$$\dif(\sa{aaa})=0 \mbox{ and } \dif(\sa{cabbcadbeaebaabec})=4.$$ In the second word, $\sa{a}$ and $\sa{b}$ are the most frequent letters, with five occurrences and $\sa{d}$ the least frequent letter, with one occurrence.
Problem 111: Letter-Occurrence Differences |
For a non-empty word $x$, $\dif(x)$ denotes the difference between the numbers of occurrences of the most frequent letter and of the least frequent letter in $x$. (they can be the same letter.)