Question 2
Lara defines the nonuniformity of a string as the largest frequency of a character minus the smallest frequency among characters that occur. For abacaba it is 4−1=3. Changing two characters can give abbccba, whose nonuniformity is 1. Lara has ababaaaaaaccabc and may replace 6 characters with letters of the alphabet. What is the smallest possible nonuniformity?

Source wording note: the final source sentence says “uniformity”, while the definition and objective concern nonuniformity; use the defined largest-minus-smallest quantity. The illustration circles 2 beside abacaba, but its frequencies 4,2,1 actually give 3; the original graphic is retained.

Source wording note: the final source sentence says “uniformity”, while the definition and objective concern nonuniformity; use the defined largest-minus-smallest quantity. The illustration circles 2 beside abacaba, but its frequencies 4,2,1 actually give 3; the original graphic is retained.