Skip to content
Vamshi Jandhyala

Books · The Riddler

Chapter 240

Can You Fool The Bank With Your Counterfeit Bills?

Riddler Express

You have $2,5002{,}500 in genuine $100100 bills (2525 notes) and an unlimited supply of counterfeits that the bank spots only 25%25\% of the time. You deposit a mix of real and fake notes; the bank randomly examines 5%5\% of the deposited notes (rounded up), and if it identifies any fake it confiscates the whole deposit and you flee. How many fakes should you add to the $2,5002{,}500 to maximise the expected value of your account, and how much do you expect to gain?

The Riddler, FiveThirtyEight, August 23, 2019(original post)

Solution

Add ff fakes to the 2525 real notes, for N=25+fN = 25 + f deposited. The bank examines s=0.05Ns = \lceil 0.05 N \rceil randomly chosen notes. You survive only if none of the examined notes is flagged. An examined note is dangerous only if it is fake, and a fake escapes detection with probability 0.750.75, independently, so if XX of the examined notes happen to be fakes, you survive with probability 0.75X0.75^{X}. Averaging over which notes are examined (a hypergeometric draw), P(survive)=E ⁣[0.75X].P(\text{survive}) = \mathbb{E}\!\left[0.75^{X}\right]. If you survive, the genuine $2,5002{,}500 was always yours, so the gain is the $100f\$100 f of fakes you slipped through; if you are caught, you lose the $2,5002{,}500 of real notes used as decoys. The expected gain is G(f)=P(survive)100f(1P(survive))2500.G(f) = P(\text{survive}) \cdot 100 f - \bigl(1 - P(\text{survive})\bigr) \cdot 2500. This rises with ff at first (more free money) and then falls (a bigger fake fraction is more likely to be sampled and flagged). The maximum is at

With 5555 fakes among 8080 notes the bank examines 44, you survive about 47%47\% of the time, and 0.4755000.532500$1,2560.47 \cdot 5500 - 0.53 \cdot 2500 \approx \$1{,}256.

The computation

Encode the deposit and audit exactly: for each ff, the number of examined fakes is hypergeometric, so sum 0.75k0.75^{k} against its probability to get the survival chance, then form the expected gain and scan ff for the maximum.

from math import comb, ceil
def gain(f):
    N = 25 + f; s = ceil(0.05 * N)
    survive = sum(comb(f, k) * comb(N - f, s - k) / comb(N, s) * 0.75 ** k
                  for k in range(min(s, f) + 1))
    return survive * 100 * f - (1 - survive) * 2500, survive

best = max(range(201), key=lambda f: gain(f)[0])
g, p = gain(best)
print(f"best f = {best}: P(survive) = {p:.3f}, expected gain = ${g:.0f}")
# best f = 55: P(survive) = 0.470, expected gain = $1257

The scan picks f=55f = 55, a survival chance of about 47%47\%, and an expected gain near $1,2561{,}256 (the listing prints $1,2571{,}257; the few-dollar difference is rounding in the survival probability).

Riddler Classic

A sauce-dispensing arm fills a 1212-inch circular pizza on a platform spinning at constant speed. The arm moves in a straight line and lays a 0.50.5-inch-wide circle of sauce; once it starts it cannot stop, and sauce may not be poured on sauce. What path and flow rate cover the pizza as fully and evenly as possible?

The Riddler, FiveThirtyEight, August 23, 2019(original post)

Status

The intended answer is an Archimedean spiral: with the platform spinning steadily, move the arm radially at a steady rate so the sauce track advances 0.50.5 inch (one stripe width) per revolution from the centre outward, while increasing the flow rate with radius to keep the areal density even (the dispenser sweeps over more area per unit time as it moves out). The puzzle is specified by a machine and a reference video, asks for coverage “as fully and evenly as possible” (an open optimisation, with edge and centre effects), and depends on equipment details not pinned down in the text.

Because it is a continuous, equipment-referenced optimisation whose statement leans on a video rather than a self-contained problem, the Classic is deferred from the worked-solution standard, in the category of the image- and video-dependent puzzles. The qualitative answer (Archimedean spiral, pitch equal to the stripe width, flow rate rising with radius) is recorded here for completeness.