On this page
A smoker keeps one matchbox in each pocket, each starting with N matches. Every time he wants a match he picks a pocket at random, left or right with equal chance. Sooner or later he opens a box and finds it empty. How many matches are left in the other box? That is Banach's match problem, and the answer is a neat exercise in careful counting.
What is the Banach match problem?
The standard statement, as given on Wikipedia's page on Banach's match problem: each box holds N matches at the start, each choice of pocket is equally likely, and we ask for the probability that exactly k matches remain in the other box at the moment one box is first found empty.
The name has a story behind it. Wikipedia, citing William Feller's probability textbook, says the problem was inspired by a humorous reference to Stefan Banach's smoking habit in a speech by Hugo Steinhaus honouring him, and that Banach himself neither set the problem nor solved it.
How do you derive the formula?
Suppose the left box is the one found empty and the right box has k matches left. Count the pocket choices:
The left pocket is chosen N + 1 times, and the last choice of the whole sequence is a left one (the moment he finds it empty).
The right pocket is chosen N − k times, since N − k of its matches are gone.
So there are 2N − k + 1 choices in all. The final one is fixed as left; the other 2N − k can be arranged in C(2N − k, N) ways, choosing which N of them are the left ones.
Each particular sequence has probability (1/2)^(2N − k + 1).
The right box could just as well be the empty one, so multiply by 2.
That gives the result: P(k matches remain) = C(2N − k, N) × (1/2)^(2N − k), for k = 0, 1, …, N. This is the formula on both Wikipedia and MathWorld, and both note it is a relative of the negative binomial distribution: the number of right-pocket picks before the (N + 1)th left-pocket pick.
What does the answer look like for N = 5?
With 5 matches in each box, apply the MathWorld formula and put everything over 2^10 = 1024 so the numbers are easy to compare:
k = 0: C(10, 5)/2^10 = 252/1024 ≈ 0.246
k = 1: C(9, 5)/2^9 = 126/512 = 252/1024 ≈ 0.246
k = 2: C(8, 5)/2^8 = 56/256 = 224/1024 ≈ 0.219
k = 3: C(7, 5)/2^7 = 21/128 = 168/1024 ≈ 0.164
k = 4: C(6, 5)/2^6 = 6/64 = 96/1024 ≈ 0.094
k = 5: C(5, 5)/2^5 = 1/32 = 32/1024 ≈ 0.031
Two checks are worth making every time. First, the numerators add up: 252 + 252 + 224 + 168 + 96 + 32 = 1024, so the probabilities sum to 1. Second, k = 0 and k = 1 come out exactly equal. That is no accident: C(2N, N) = 2 × C(2N − 1, N) for every N, so the two most likely outcomes always tie.
The expected number left for N = 5 is (0×252 + 1×252 + 2×224 + 3×168 + 4×96 + 5×32)/1024 = 1748/1024 ≈ 1.71 matches.
Why does the expected leftover grow like √N?
The same sum, done for general N, collapses to a closed form: E = (2N + 1) × C(2N, N)/2^(2N) − 1. For N = 5 that is 11 × 252/1024 − 1 = 1748/1024, the same 1.71 as above.
For large N, the Wikipedia article gives the approximation E ≈ 2√(N/π) − 1, which comes from Stirling's approximation for n! (it cites page 238 of Feller's textbook). The approximation is rough for small boxes: it gives 1.52 for N = 5 against the exact 1.71. By N = 50 the two agree closely: the exact value is about 7.04 and the approximation about 6.98.
The intuition: the difference between left and right picks behaves like a random walk, and a fair random walk typically strays a distance of order √(steps) from its start. So doubling the matches does not double the leftover; for large boxes you need roughly four times as many.
How should you practise this for exams?
The method transfers well beyond matchboxes. Try these in order:
Redo the derivation for N = 3 and check the four probabilities add to 1.
Change the rule so a box counts as empty when its last match is struck. Which step of the count changes?
Make the pockets unfair, left with probability p, and rewrite step 4.
If you get stuck on which choices to count, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. For a similar counting-to-the-end argument, see who rolls a six first, and why the first player wins 6/11.



