# Banach's Match Problem Simulation

- Author:
- Steve Phelps

Banach's match problem is a classic problem in probability attributed to Stefan Banach. It is said that the problem was inspired by a humorous reference to Banach's smoking habit in a speech honouring him by H. Steinhaus, but that it was not Banach who set the problem or provided an answer.
Suppose a pipe-smoking mathematician carries two matchboxes at all times: one in his left pocket and one in his right. Each time he needs a match, he is equally likely to take it from either pocket. Suppose he reaches into his pocket and discovers for the first time that the box picked is empty. If it is assumed that each of the matchboxes originally contained 25 matches, how many matches will typically be left in the other box?