Monti Hall in Introduction to Algorithms

Source: Internet
Author: User
One prison guard randomly chooses one of the three criminals to release them, and the other two will be killed. The guard knows whether a person will be released, but does not allow the criminal to have any information about his/her status. Let's name the criminals X, Y, and Z respectively. Criminal X privately asked the guard Y or Z which would be killed because he knew that at least one of them would die, and the guard could not disclose any information about his own status. The guard told X that Y would be killed. X is very happy because he thinks that he

Appendix C.2 of Introduction to Algorithms has such an exercise:

One prison guard randomly chooses one of the three criminals to release them, and the other two will be killed. The guard knows whether a person will be released, but does not allow the criminal to have any information about his/her status. Let's name the criminals X, Y, and Z respectively. Criminal X privately asked the guard Y or Z which would be killed because he knew that at least one of them would die, and the guard could not disclose any information about his own status. The guard told X that Y would be killed. X is very happy because he thinks that he or Z will be released, which means that he is released with a probability of 1/2. Is he correct? Or is his chance still 1/3? Please explain.

This section describes probability, conditional probability, and Bayesian theorem. So I solved the problem like this:

Event A is released, and event B is killed.

Assuming that X is released, the probability of Y being executed is P (B | A) = 1.

According to Bayesian theorem, the probability of X being released is

P (A | B) = P (A) * P (B | A)/P (B) = (1/3) * 1/(2/3) = 1/2. (1) type

Intuitively, after knowing that Y will die, X and Z will have half the chance to be released, and the answer seems to be 1/2. But from another perspective, Y or Z will definitely die. no matter which one the guard tells X, it will not change whether X will be released, therefore, the probability of X being released is the same, and the probability is 1/3.

At that time, I felt that this question was a bit tangled, and 1/3 seemed to be correct, but 1/2 was calculated using the formula. Later, because I couldn't find the answer, I lost it. (the answer to the Introduction to Algorithms found on the Internet does not include the appendix. some people who know it can give it a link ^_^ ). Today, I happened to see a post about it on the internet to know that this question is quite promising. This is called the Monti hall question and three more questions. it is said to be a "paradox" and many people are confused. However, the original question was changed to the background where the TV program won the car. If you are interested, you can check it out.

According to the Internet, the answer is indeed 1/3. I thought about it and thought it should be analyzed as follows:

The sample space itself has three basic events:

E1: X is released, Y is dead, and Z is dead;

E2: X dead, Y released, Z dead;

E3: X, Y, and Z are released.

The problem lies in the guard. X asks which of the guards will die. no matter what the basic events are, the guard will always tell X a person who will die. Therefore, the probability calculation should be calculated as follows:

Note that event A' is: X released; event B 'is: Y and Z, where someone will die. If the guard tells X that someone in YZ will die, the probability that X will be released

P (a' | B ') = P (A') * P (B' | a')/P (B ') = 1/3*1/1 = 1/3. (2)

Many people (including me) come up with the (1) answer because they did not analyze the problem clearly. If the question is changed to: X asks the guard whether he or she is released or killed, and the guard replies that he or she will be killed, then the answer is 1/2 in the (1) format. (Note the difference between YZ and YZ ).

The answer to the three questions on the Internet is also critical to the host. if he knows what is behind the three doors, there is always a door for the goat to open to the winners, the winner should choose to change the door. if the host opens a door at will, and the door is right behind the door, the winner can choose not to change.

Thoughts on this problem:

  • Mathematics is a good tool to solve real-world problems. if you use language expressions or logical thinking to solve a bad problem, or even cause endless debate, you cannot use mathematics as a tool to solve it.
  • The key to solving problems with mathematics is to establish a correct model. For example, I initially took it for granted the (1) answer because I did not analyze the nature of the problem and did not build a correct model.

Address of this article: http://www.nowamagic.net/librarys/veda/detail/781,welcome here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.