Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 233

Can You Win The Superstring Scrabble Challenge?

Riddler Express

You have two buckets and 100100 ping-pong balls, 5050 red and 5050 blue. You arrange the balls into the two buckets however you like, with each bucket holding at least one ball. A friend picks a bucket blindly, then picks a ball at random from it. How should you arrange the balls to maximise the chance the friend draws red, and what chance do you get? Extra credit: the same with 2525 of each colour, and with 200200 of each colour.

The Riddler, FiveThirtyEight, June 28, 2019(original post)

Solution

The friend picks a bucket with probability 12\tfrac12 each, so the chance of red is the average of the two buckets’ red fractions. To push that average up, make one bucket a sure thing while barely diluting the other.

Put a single red ball alone in the first bucket and everything else in the second. The first bucket then yields red with certainty, and the second holds 4949 red among 9999 balls. The chance of red is 121+124999  =  7499    74.7%.\tfrac12 \cdot 1 + \tfrac12 \cdot \tfrac{49}{99} \;=\; \tfrac{74}{99} \;\approx\; \boxed{74.7\%}. Why this beats everything else: any ball you move into the lone-red bucket either dilutes its perfect fraction (if blue) or is a red ball that would have raised the big bucket’s fraction more than it helps a bucket already at 11. The lone red ball is the cleanest way to “bank” one full half of the probability while keeping the leftover bucket as red-rich as possible.

For the extra credit the recipe is identical, one red ball alone against the rest: 25 each:12+122449=739874.5%,200 each:12+12199399=29939974.9%.\begin{aligned} 25\text{ each}&: \tfrac12 + \tfrac12\cdot\tfrac{24}{49} = \tfrac{73}{98} \approx 74.5\%,\\ 200\text{ each}&: \tfrac12 + \tfrac12\cdot\tfrac{199}{399} = \tfrac{299}{399} \approx 74.9\%. \end{aligned} As the pile grows, the dilution from removing one red ball shrinks, so the chance creeps up toward 34\tfrac34 but never reaches it.

The computation

Encode the arrangement directly: for every way to split the balls into two non-empty buckets (how many balls in bucket one, and how many of them red), compute the friend’s exact chance of red and keep the maximum. The optimum should be the lone-red-ball split, at 74/9974/99 for 5050 of each.

from fractions import Fraction as F
def best(R, B):                          # R red, B blue of each colour
    best_v, arg = F(0), None
    for n1 in range(1, R + B):           # bucket 1 holds n1 of the R+B balls
        for r1 in range(max(0, n1 - B), min(R, n1) + 1):   # reds in bucket 1
            r2, n2 = R - r1, (R + B) - n1
            v = F(1, 2) * F(r1, n1) + F(1, 2) * F(r2, n2)
            if v > best_v: best_v, arg = v, (r1, n1, r2, n2)
    return best_v, arg

for R in (50, 25, 200):
    v, arg = best(R, R)
    print(f"{R} each: P={float(v):.4f}={v}  (r1,n1,r2,n2)={arg}")
# 50 each: P=0.7475=74/99  (r1,n1,r2,n2)=(1, 1, 49, 99)
# 25 each: P=0.7449=73/98  (r1,n1,r2,n2)=(1, 1, 24, 49)
# 200 each: P=0.7494=299/399  (r1,n1,r2,n2)=(1, 1, 199, 399)

The exhaustive search confirms the lone-red-ball arrangement is optimal in every case, with chances 74/9974/99, 73/9873/98, and 299/399299/399.

Riddler Classic

The Superstring Scrabble Challenge: using all 100100 Scrabble tiles (two of them blank wildcards), lay them in one 100100-letter string. Each distinct valid word you can find in the string scores its Scrabble points (a word scores once however often it appears; overlapping words all count). Which ordering of the tiles scores the most?

The Riddler, FiveThirtyEight, June 28, 2019(original post)

Status

This is a participatory optimisation contest, not a problem with a derivable answer. There are more than 1011510^{115} tile orderings and nearly 200,000200{,}000 valid words, and the column crowns whichever solver’s string scores highest rather than proving an optimum. The inaugural “Wordsmiths Extraordinaire” (Álvaro Begué Aguado and Vince Vatter) submitted strings built from dense, high-value clusters such as ADOZERO (yielding ADOZE, DOZE, DOZER, ZERO) and QUARTERNS (QUA, QUART, QUARTE, QUARTER, QUARTERN, QUARTERNS), and the editor’s own reference string scored 1,0761{,}076 points. No method certifies any string as the global maximum.

Because the answer is the outcome of a submission contest with no provable optimum, the Classic is deferred from the worked-solution standard, in the same category as the Battle for Riddler Nation and the other participatory contests. A bounded version with a fixed word list and a small tile budget would be a well-posed search; the puzzle as posed over the full bag is open by design.