Chapter 240
Can You Fool The Bank With Your Counterfeit Bills?
Riddler Express
You have $ in genuine $ bills ( notes) and an unlimited supply of counterfeits that the bank spots only of the time. You deposit a mix of real and fake notes; the bank randomly examines 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 $ 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 fakes to the real notes, for deposited. The bank examines 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 , independently, so if of the examined notes happen to be fakes, you survive with probability . Averaging over which notes are examined (a hypergeometric draw), If you survive, the genuine $ was always yours, so the gain is the of fakes you slipped through; if you are caught, you lose the $ of real notes used as decoys. The expected gain is This rises with 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 fakes among notes the bank examines , you survive about of the time, and .
The computation
Encode the deposit and audit exactly: for each , the number of examined fakes is hypergeometric, so sum against its probability to get the survival chance, then form the expected gain and scan 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 , a survival chance of about , and an expected gain near $ (the listing prints $; the few-dollar difference is rounding in the survival probability).
Riddler Classic
A sauce-dispensing arm fills a -inch circular pizza on a platform spinning at constant speed. The arm moves in a straight line and lays a -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 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.