<pre>
The answer depends upon how the warden chooses the name given to the prisoner.

Each prisoner had an equal chance of being the one chosen to be
executed.  So we have three cases:

<pre>
Prisoner executed:         A    B    C
Probability of this case: 1/3  1/3  1/3
</pre>

Let A be the prisoner that is being told the name of the other prisoner that will go free and B is the name that is given to the A.
Let's look at three possibilities for the warden's method of choosing the name to give to A.

1.  The warden chooses randomly between B and C when both will go free. So now we have:

<pre>
Prisoner executed:  A    A    B    C
Name given to A:    B    C    C    B
Probability:       1/6  1/6  1/3  1/3
</pre>

When the warden says B will not be executed, we eliminate the middle two
choices above.  Now, among the two remaining cases, C is twice
as likely as A to be the one executed.  Thus, the probability that
A will be executed is still 1/3, and C's chances are 2/3.

2.  The warden always chooses B when B and C will go free.  We have:

<pre>
Prisoner executed:  A    A    B    C
Name given to A:    B    C    C    B
Probability:       1/3   0   1/3  1/3
</pre>

Again we eliminate the middle two choices above.  Now, among the two remaining cases, C is just
as likely as A to be the one executed.  Thus, the probability that
A will be executed jumps to 1/2, and C's chances are 1/2.

3.  The warden always chooses C when B and C will go free.  We have:

<pre>
Prisoner executed:  A    A    B    C
Name given to A:    B    C    C    B
Probability:        0   1/3  1/3  1/3
</pre>

Again we eliminate the middle two choices above.  Now, among the two remaining cases, C is sure
to be the one executed.  Thus, the probability that
A will be executed drops to 0, and C's chances are 100%.

So we see that the prisoner needs to know something about the warden's thinking in order to conclude anything.

see also [[Monty Hall]]
</pre>
