Three prisoners problem
The Three prisoners problem is a classic probability paradox that demonstrates the counterintuitive nature of conditional probability and information revelation. First introduced by Martin Gardner in his 1959 Scientific American column on mathematical games, it involves three prisoners (A, B, and C) sentenced to death, with one secretly pardoned at random by the governor, and a warden who, upon request from prisoner A, names another prisoner doomed to die, prompting a reevaluation of survival odds that defies initial intuition.[1] In the setup, the pardon is equally likely for any of the three prisoners, giving each an initial 1/3 probability of survival. Prisoner A, unaware of the outcome, asks the warden—who knows the pardoned identity—to reveal the name of one other prisoner (B or C) who will be executed, with the stipulation that if both B and C are doomed (i.e., if A is pardoned), the warden selects randomly between them with equal probability. The warden responds that B will die. At this point, the problem poses: what is the updated probability that A is the pardoned prisoner?[1][2] The paradox emerges from the intuitive but incorrect reasoning that the revelation eliminates B, leaving A and C as equally likely candidates for pardon, thus raising A's survival chance to 1/2. In reality, the conditional probability that A is pardoned remains 1/3, while C's jumps to 2/3; this holds because the warden's choice is not independent of the underlying pardon but always reveals a doomed prisoner other than A, skewing the probabilities without providing new information about A's fate specifically.[1][2] To resolve it formally, consider the sample space of equally likely pardon outcomes: if C is pardoned (probability 1/3), the warden must name B; if B is pardoned (1/3), the warden must name C; if A is pardoned (1/3), the warden names B or C each with probability 1/2. Conditioning on the warden naming B yields four scenarios with prior probabilities 1/3 (C pardoned), 1/3 (B pardoned, but impossible here), 1/6 (A pardoned, names B), and 0 (A pardoned, names C, but not this case)—normalizing gives A's probability as (1/6) / (1/3 + 1/6) = 1/3, and C's as 2/3.[1] The problem is structurally analogous to the later-popularized Monty Hall problem, serving as an earlier variant that highlights errors in probabilistic reasoning under partial information revelation, and it has been widely analyzed in probability education to teach Bayesian updating and the importance of defining events carefully.[3][2]Background and Problem Statement
Historical Origins
The three prisoners problem originated as a riddle posed by Martin Gardner in the October 1959 issue of his "Mathematical Games" column in Scientific American, where it was presented as a counterintuitive probability puzzle involving conditional information.[1] Martin Gardner, a prolific writer and skeptic who authored over 70 books, played a pivotal role in popularizing recreational mathematics through his 25-year tenure at Scientific American from 1956 to 1981, introducing puzzles that bridged amateur enthusiasts and professional mathematicians while emphasizing logical reasoning and intellectual play.[4] His column reached a wide audience, fostering interest in mathematical curiosities and influencing generations of readers to engage with abstract concepts in an accessible manner.[5] The puzzle received its first formal analysis and explicit naming as the "three prisoners problem" within probability literature in the early 1960s, notably appearing in Frederick Mosteller's 1965 collection Fifty Challenging Problems in Probability with Solutions, where it was adapted to illustrate Bayesian updating and the pitfalls of intuitive probability assessment.[6] This academic treatment solidified its status as a canonical example in statistical education. Over subsequent decades, the problem evolved in its presentation across probability textbooks and pedagogical resources, often reframed to emphasize conditional probability and information revelation, thereby influencing the teaching of these topics by providing a memorable narrative that highlights common misconceptions in probabilistic reasoning.[7]Detailed Setup and Query
In the three prisoners problem, three prisoners labeled A, B, and C are held in separate cells under sentence of death. The governor selects one of them at random to pardon, with each having an equal probability of 1/3, by placing their names on slips of paper in a hat and drawing one secretly; the other two are to be executed.[1] The warden, who knows the identity of the pardoned prisoner, is instructed to keep this information confidential for several days. Prisoner A, having heard a rumor of the impending pardon, asks the warden to name one other prisoner who will be executed. The warden agrees under the following protocol: if B is pardoned, the warden must name C; if C is pardoned, the warden must name B; and if A is pardoned, the warden will randomly choose to name either B or C by flipping a coin. This ensures the warden always truthfully identifies at least one non-pardoned prisoner other than A, without revealing whether A is pardoned.[1] The next day, the warden informs A that B will be executed. At this point, A wonders whether this revelation changes his own chances of being pardoned, initially believed to be 1/3, or if it now implies a 1/2 probability between A and C surviving.[1]Core Solution
Probabilistic Formulation
The probabilistic formulation of the three prisoners problem employs conditional probability to model the uncertainty surrounding the pardon decision and the guard's revelation. Define the events P_A, P_B, and P_C as the events that prisoners A, B, and C are pardoned, respectively. The prior probabilities are uniform, with P(P_A) = P(P_B) = P(P_C) = \frac{1}{3}, reflecting the random selection of one prisoner for pardon.[8][9] Let G_B denote the event that the guard names prisoner B as one to be executed when queried by prisoner A. The guard's behavior is formalized under the following assumptions: the guard always names a prisoner other than A who is not pardoned; if both B and C are to be executed (i.e., under P_A), the guard selects B with probability \frac{1}{2}. Thus, the conditional probabilities are P(G_B \mid P_A) = \frac{1}{2}, P(G_B \mid P_B) = 0 (since B cannot be named if pardoned), and P(G_B \mid P_C) = 1 (since B must be named if C is pardoned).[10][8] The objective is to compute the posterior probability P(P_A \mid G_B), which represents prisoner A's updated probability of being pardoned given that the guard names B. This is obtained via Bayes' theorem: P(P_A \mid G_B) = \frac{P(G_B \mid P_A) P(P_A)}{P(G_B)}, where the marginal probability P(G_B) is given by the law of total probability: P(G_B) = P(G_B \mid P_A) P(P_A) + P(G_B \mid P_B) P(P_B) + P(G_B \mid P_C) P(P_C). Analogous expressions apply for the posteriors P(P_B \mid G_B) and P(P_C \mid G_B).[9][8]Step-by-Step Calculation
To derive the posterior probabilities using Bayes' theorem, first compute the likelihood P(G_B \mid P_A), the probability that the guard names B given that A is pardoned. In this case, both B and C are to be executed, so the guard selects one at random to name, yielding P(G_B \mid P_A) = \frac{1}{2}.[10] Next, compute P(G_B \mid P_B), the probability that the guard names B given that B is pardoned. Here, the guard cannot name B (the pardoned prisoner) and also avoids naming A (the asker), so must name C instead, resulting in P(G_B \mid P_B) = 0.[10] Then, compute P(G_B \mid P_C), the probability that the guard names B given that C is pardoned. With B to be executed and the guard avoiding naming A, B is the only option, so P(G_B \mid P_C) = 1.[10] The prior probabilities are equal: P(P_A) = P(P_B) = P(P_C) = \frac{1}{3}. The marginal probability P(G_B) is found using the law of total probability: P(G_B) = P(G_B \mid P_A) P(P_A) + P(G_B \mid P_B) P(P_B) + P(G_B \mid P_C) P(P_C) = \left( \frac{1}{2} \right) \left( \frac{1}{3} \right) + (0) \left( \frac{1}{3} \right) + (1) \left( \frac{1}{3} \right) = \frac{1}{6} + 0 + \frac{1}{3} = \frac{1}{2}. [10] Applying Bayes' theorem gives the posterior P(P_A \mid G_B) = \frac{P(G_B \mid P_A) P(P_A)}{P(G_B)} = \frac{ \left( \frac{1}{2} \right) \left( \frac{1}{3} \right) }{ \frac{1}{2} } = \frac{1/6}{1/2} = \frac{1}{3}. Similarly, P(P_C \mid G_B) = \frac{P(G_B \mid P_C) P(P_C)}{P(G_B)} = \frac{ (1) \left( \frac{1}{3} \right) }{ \frac{1}{2} } = \frac{1/3}{1/2} = \frac{2}{3}, and note that P(P_B \mid G_B) = 0 since the guard named B to be executed. These posteriors sum to 1 (\frac{1}{3} + 0 + \frac{2}{3} = 1), confirming consistency.[10]Building Intuition
Scenario Enumeration
To build intuition for the Three prisoners problem, consider the possible underlying realities—or "worlds"—in which one prisoner is pardoned, each equally likely with prior probability \frac{1}{3}. These worlds are: (1) A is pardoned (B and C executed), (2) B is pardoned (A and C executed), or (3) C is pardoned (A and B executed). In each world, the warden, when asked by A to name another prisoner who will be executed, follows the rule of naming one who is not pardoned; if both B and C are to be executed (i.e., A pardoned), the warden chooses randomly between them with equal probability \frac{1}{2}.[1] In the first world (A pardoned, probability \frac{1}{3}), the warden names B with probability \frac{1}{2} (subcase probability \frac{1}{3} \times \frac{1}{2} = \frac{1}{6}) or C with probability \frac{1}{2} (subcase probability \frac{1}{6}). In the second world (B pardoned, probability \frac{1}{3}), the warden must name C (since B cannot be named as executed), yielding probability \frac{1}{3} for this subcase. In the third world (C pardoned, probability \frac{1}{3}), the warden must name B, yielding probability \frac{1}{3} for this subcase.[1] Suppose the warden names B as to be executed. The relevant scenarios are then those where the warden names B: the subcase of A pardoned and warden names B (probability \frac{1}{6}), and the case of C pardoned and warden names B (probability \frac{1}{3} = \frac{2}{6}). The total probability of these scenarios is \frac{1}{6} + \frac{2}{6} = \frac{3}{6} = \frac{1}{2}, so the conditional probability that A is pardoned given the warden names B is \frac{\frac{1}{6}}{\frac{1}{2}} = \frac{1}{3}. This enumeration aligns with the core probabilistic result that A's chance remains \frac{1}{3}.[1] The following table summarizes the scenarios, their probabilities, and the conditional outcomes when the warden names B:| Scenario | Pardoned Prisoner | Warden Names | Probability of Scenario | Probability Given Warden Names B |
|---|---|---|---|---|
| 1a | A | B | \frac{1}{6} | \frac{1}{3} (for A pardoned) |
| 1b | A | C | \frac{1}{6} | N/A (names C, not B) |
| 2 | B | C | \frac{1}{3} | N/A (names C, not B) |
| 3 | C | B | \frac{1}{3} | \frac{2}{3} (for C pardoned) |