The Three Prisoners Puzzle: How To Really Solve It? - An illustration/cartoon showing a warden wearing sunglasses and smirking on the left. On the right, are three puzzled prisoners: A, B, and C. A is wearing a smile on his face, B is wearing a poker face, whereas C is plain surprised. Between the warden and the prisoners is a hanging rope. Who will be hung using this rope?

The three prisoners puzzle is a fun and engaging mathematical puzzle that shows how counterintuitive the notion of probability can be. I love and work with mathematics day in and day out.

Of all the sub-fields mathematics offers, I feel that probability theory is the one that is the most demanding and rewarding at the same time.

Before we proceed with this puzzle, be warned that it appears deceptively simple and easy on the surface. However, this puzzle has historically even caught out experts in the field of probability. So, bring your best brains with you to solve this one. Let us begin.

This essay is supported by Generatebg

A product with a beautiful background featuring the sponsor: Generatebg - a service that generates high-resolution backgrounds in just one click. The description says "No more costly photographers" and displays a "Get Started" button beneath the description.

The Three Prisoners and the Warden

Our story begins with three prisoners: ArunBen, and Cayleb (AB, and for short throughout the rest of the puzzle). All three prisoners were sentenced to death a while back.

However, the Governor in charge started coming increasingly under pressure to reduce the death sentence count for the state. So, he came up with a very unfair but convenient plan: the city would pardon random prisoners who were sentenced to death.

It turned out that the Governor’s pardon list contained one of the names among A, B, and C. In other words, one of the three men would get a lucky pardon. The Governor shared his list with the jail’s Warden.

The Three Prisoners Puzzle: How To Really Solve It? — An illustration/cartoon showing a warden wearing sunglasses and smirking on the left. On the right, are three puzzled prisoners: A, B, and C. A is wearing a smile on his face, B is wearing a poker face, whereas C is plain surprised. Between the warden and the prisoners is a hanging rope. Who will be hung using this rope? The Warden says, “Boys, one of you is the lucky one!”
The lucky prisoner — Illustrative art created by the author

So, the Governor and Warden were the only ones who knew who the lucky prisoner was. However, the rumour had already reached all the prisoners in the prison. They did not know who the lucky prisoner was, but they all knew that there was one among them.

Arun and the Warden

One fine day, as the Warden was making his rounds, Arun chatted him up. After some casual banter, Arun playfully asked the Warden if he could reveal if he was the lucky prisoner who would get the pardon.

The Three Prisoners Puzzle: An illustration showing Arun asking the Warden the following with a smile on his face, "Hey Warden, how about you and I cut a deal?" The Warden responds as follows: "I am not so sure..."
The deal with the Warden — Illustrative art created by the author

Being a duty-driven fellow, the Warden refused to answer this question. But Arun, being the sly crook he was, did not give up; he approached the same theme from a different angle. He said to the Warden:

“I respect your dutifulness. If you cannot tell me if I am the one to be pardoned, then tell me the name of one of the other prisoners (other than myself) who will be executed.”

The Warden was puzzled by this request. Yet, it drew him in; he wanted to listen to what Arun had to say. As the Warden continued to listen suspiciously, Arun continued:

“If Ben is to be pardoned, tell me Cayleb’s name. If Cayleb is to be pardoned, then tell me Ben’s name.

If I am to be pardoned, then flip a coin between Ben and Cayleb and tell me a name based on the coin toss.”

The Warden thought for a moment, and responded:

“Hang on a second. If you saw me flip the coin, you would know that you are not pardoned. And if I don’t flip the coin, you would know that the lucky one one is either you or the person I am about to name.”

With a confident smirk on his face, Arun replied:

“Well, you don’t have to do any of this in front of me. Do what you have to do in private, and tell me the name tomorrow.”

The Three Prisoners Puzzle — Challenge

That night, the Warden thought long and hard about Arun’s request. Unfortunately, the Warden had no exposure to probability theory. After going through all possible scenarios, the Warden concluded that if he followed Arun’s request, it would not help him assess his survival chances any more than now.

The next day, as the Warden was making his rounds, Arun chatted him up again. This time, the Warden told with a smirk on his face:

“Ben will not be pardoned; he will be executed.”

After sharing this information, the Warden left. Having learnt this information, Arun was overjoyed. Having a little exposure to probability theory, Arun realised that by knowing that Ben will be executed, the sample space for the pardon had reduced from three to two.

Therefore, his survival chances had increased form one-third (1/3) to one-half (½). Arun did not stop there though. Being the clever operator that he was, he had established a secretive way to communicate with Cayleb by tapping his finger nails on a water pipe that their cells shared.

Arun communicated to Cayleb that Ben is to be executed. Having heard this information, Cayleb was equally overjoyed as he realised that his own survival chances increased from one-third (1/3) to one-half (½).

I hope you enjoyed the story thus far. Now, it is your turn. The challenge that the puzzle poses to you is the following:

Did Arun and Cayleb apply probability theory correctly? Are their computations correct?

If you think not, how should they have computed their respective survival chances?

Spoiler Alert

If you wish to solve this puzzle on your own, now is the time. Beyond this section, I will be explicitly discussing the solution to this puzzle.

So, I suggest that you pause reading this essay during your attempt. After you complete your attempt, you may continue reading this essay and compare solutions. All the best!


Ambiguity in Probability Calculations

Probability theory is one of those bizarre fields that is very context-dependent. If you are not careful, the same numbers would lead to completely different answers based on different contexts.

The first thing to note about Arun’s computation of his survival chances is the fact that it leads to a contradictory situation. To help imagine why this happens, imagine a scenario in which the Warden had somehow gotten sick on the night before, and never showed up for his rounds.

In such a scenario, Arun could reason as follows:

“If the Warden would say that Ben was to be executed, the sample space is reduced to two prisoners (myself and Cayleb). So, my chances of survival are ½.”

But then again, Arun could also reason as follows:

“If the Warden would say that Cayleb was to be executed, the sample space is reduced to two prisoners (myself and Ben). So, my chances of survival are ½.”

The problem here lies in the fact that Arun explicitly requested one of the other prisoner’s names (that is, other than Arun’s) from the Warden. So, the Warden is bound to say either Ben or Cayleb.

This means that regardless of the Warden’s answer, Arun could use his present logic to establish that his survival chances are ½ instead of 1/3. In simpler terms, Arun could say that his survival chances are ½ without even hearing from the Warden again.

With his current logic, he essentially learns no new information from the Warden’s answer. This can only mean that his logic is flawed. So, how should he have calculated his survival chances instead?


The Solution to the Three Prisoners Puzzle

Consider a hypothetical scenario where there are ‘3n’ number of parallel universes (where 3n is a very large number). In each of these universes, there is a trio of prisoners (A, B, and C) among whom, one would get the lucky pardon.

In all ‘3n’ universes, let ‘A’ (Arun) be the prisoner who chats the Warden up. In total, there are 3n trios of prisoners. Based on equal probability distribution, in ‘n’ universes, Arun would be pardoned. Similarly, in ‘n’ universes, Ben would be pardoned, and in ‘n’ universes, Cayleb would be pardoned.

As I had mentioned previously, because of Arun’s explicit request for a name other than his own, the Warden HAS to necessarily tell him either Ben’s name or Cayleb’s name. So, in (3n/2) universes, the Warden would tell Ben’s name and in (3n/2) universes, the Warden would tell Cayleb’s name.

In our universe, the Warden told Ben’s name. So, we can narrow our focus down to the (3n/2) universes where the Warden told Ben’s name. Within these (3n/2), Cayleb would get the pardon in ’n’ universes. This is because of the following reasons:

1. The original equal probability distribution asserts that each prisoner gets the pardon in ’n’ universes each.

2. In the other (3n/2) universes, the Warden mentions Cayleb’s name. So, he necessarily cannot be pardoned.

To compute Arun’s survival chances, you just subtract ‘n’ (Cayleb’s survival chances) from (3n/2). This leads to (n/2). In other words Cayleb’s survival chances (n) are twice that of Arun’s (n/2).

Considering the fact that these probabilities necessarily need to add to 1, we directly arrive at the solution to this puzzle:

1. Arun’s chances of survival are (1/3).

2. Cayleb’s chances of survival are (2/3).

The Three Prisoners Puzzle: How To Really Solve It? — An illustration/cartoon showing a warden wearing sunglasses and smirking on the left. On the right, are three puzzled prisoners: A, B, and C. A is wearing a smile on his face, B is wearing a poker face, whereas C is plain surprised. As the Warden looks at the prisoners, A has a survival chance of 2/3, whereas C has a survival chance of 2/3. B is surely to be executed.
The solution — Illustrative art created by the author

Epilogue – The Three Prisoners Puzzle

The interesting thing to note in this puzzle is why exactly Arun learns nothing about his survival chances from the Warden.

Essentially, the Warden’s choice of name is no random event. Therefore, it does not change the probabilities involved directly. If the Warden drew a random name out of a lot and communicated that to Arun, then Arun’s computation would have been correct.

Cayleb, on the other hand, learns the information from Arun. The Warden could have said Cayleb’s name, but he did not. This enables Cayleb to learn new information about his situation as opposed to Arun.

Another way to see how Arun learns no new information is to say that he would be executed if a random draw from a deck of 52 cards yields the ace of spades.

In this scenario, let us say that someone peeked into the cards, and deliberately drew 50 cards that were not ace of spades and placed them open on the table. Only two cards remain closed, out of which one is the ace of spades.

This does not mean that Arun’s survival chances are ½; they remain as 51/52. This is because the person choosing the cards did not choose randomly; he or she chose the cards deliberately with the aim of avoiding ace of spades. So, opening up those cards provides no new information and hence does not affect the probabilities at all.

Final Thoughts

I hope you enjoyed solving this puzzle as much as I enjoyed writing about it. If you found it very challenging, don’t be disheartened.

As I had mentioned briefly before, I have read several accounts of even established probability theory experts who got this puzzle wrong. It just goes to show that probability theory really is a very tricky field (even for the experts).

I will be continuing to write about interesting and engaging puzzles in the future. So, watch this space if you are interested in more such puzzles!


References and credit: Martin Gardner and Sheila Bishop.

If you’d like to get notified when interesting content gets published here, consider subscribing.

Further reading that might interest you:

If you would like to support me as an author, consider contributing on Patreon.

Street Science

Explore humanity's most curious questions!

Sign up to receive more of our awesome content in your inbox!

Select your update frequency:

We don’t spam! Read our privacy policy for more info.