# 100 Prisoner Problems Mar 2024

Specific and General Solutions
Despite my lifelong interest in math, I had not heard of this problem until it was introduced by my 12-year-old grandson, Nicholas Lawley.

The director of a prison offers 100 death row prisoners, who are numbered from 1 to 100, a last chance.

A room contains a cupboard with 100 drawers. The director randomly puts one prisoner’s number in each closed drawer.

The prisoners enter the room, one after another. Each prisoner may open and look into 50 drawers in any order. The drawers are closed again afterwards.

If, during this search, every prisoner finds their number in one of the drawers, all prisoners are pardoned. If even one prisoner does not find their number, all prisoners die.

Before the first prisoner enters the room, the prisoners may discuss strategy — but may not communicate once the first prisoner enters to look in the drawers.

What is the prisoners’ best strategy?

Solution from the Wiki (spoiler alert)

The solution is provided in this wiki article about the 100 prisoners problem.

The brilliant approach involves probability, integer partitions, and permutations of cycles within the integer partitions.

My Specific Solutions

After reading the wiki solution above, I wanted to work through the problem by hand, step-by-step. Of course, the 100-prisoner hand solution, with , would be long and tedious; therefore, I started with the 4-prisoner problem with and I followed that with the 6-prisoner problem with .

See my calculation PDF here

Or here

The chance of success (all prisoners released), is as follows:

Referring to Page 5 of the PDF
For , the probability of success is

Referring to Page 6 of the PDF
For , the probability of success is

In summary

According to the wiki article, the solution for the general case of prisoners is as follows:

The probability of success for the prisoners is

where is a harmonic number.

My calculations verify the solution shown in the wikipedia.

, therefore:

It follows that:

For : checks ✓

For : checks ✓

Reference and Related Interest

100 Prisoner Problems Mar 2024