Banach Matchbox Problem

A smoker has two matchboxes, one in the left pocket and one in the right pocket, with each box initially containing matches. The smoker selects a box at random each time he lights a new cigarette, and the problem is to calculate the probability that, when the smoker first discovers that the box he has just selected is empty, there are exactly matches in the other box ().
This Demonstration shows
• simulated sample paths of the numbers of matches in the two boxes
• histograms of the number of matches left in the other box
• exact probabilities of the number of matches left in the other box.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


Snapshot 1 illustrates the case that when the smoker finds a box empty, the other box may also be empty. On the other hand, the other box can also contain all the original matches. In the second snapshot, where we originally have 40 matches in each box, the other box contains, at the end, 18 matches. The histogram in the third snapshot is based on 1000 simulations; the number of matches left in the other box varied from 0 to 23 when we originally had 40 matches.
The fourth snapshot shows the exact probabilities of the number of matches in the other box at the end. We see that small numbers of matches in the other box have the highest probabilities. The two highest probabilities are for the cases where there are finally no matches or one match is in the other box; in addition, these two probabilities are equal.
Note that when the smoker takes the last match out of a box, he puts the box back into the pocket it came from, and he only becomes aware that the box is empty when he next selects that box.
According to Feller [1, p. 166], this problem was inspired by a humorous reference to Banach's (1892–1945) smoking habits made by H. Steinhaus in an address honoring Banach; see also problem 7 in [2].
Feller [1, p. 167] gives the exact probabilities of the number of matches left in the other box. In [1, p. 238] we can find the expected number of matches left in the other box.
[1] W. Feller, An Introduction to Probability Theory and Its Applications, Vol.1, 3rd ed., New York: Wiley, 1968.
[2] P. J. Nahin, Digital Dice: Computational Solutions to Practical Probability Problems, Princeton: Princeton University Press, 2008.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+