# Programmer logic questions - three questions

Programmer logic questions - three questions

Introduction

Three questions (Monty Hall problem), also known as Monty Hall Problem , Montejo question or Monty Hall paradox, roughly from the American television game show Let's Make a Deal. The name comes from the issue of the program's host Monty Hall (Monty Hall).

Participants will see three closed doors, behind which there is a car, check the back of a car that can win the car door, the other two doors behind the possession of a goat each. When participants selected a door, but to open it, show host (know the correct answer) that an open door in the remaining two did not win. Thereafter the participants will ask the host or want to change the door still shut on another fan.

The question is: whether it will increase the chances for the other contestants to win door car?

A Solution

Excerpt from Baidu Encyclopedia:

There are three possible scenarios, all have an equal likelihood (1/3):

(1/3) One contestant pick goat, goat moderator pick number two. Conversion will win the car.

(1/3) Contestants pick number two goats, pick the host goats One. Conversion will win the car.

(1/3) contestants pick the car, pick sheep One presenter. Conversion fails.

Apparently the conversion success rate by two-thirds

Solution two

There are confusing host of operation, it is better imagine host is another operation:

The new operation: you choose a door, the host to take with you for the other two doors. You have chosen to change (obviously programmed probability 2/3), after that exchange is completed, the host then you have two doors did not open the car door.

Contrast difference between the two operations:

Old operation: the user selects a door -> host open another two in the wrong answer -> user conversion

New operation: the user selects a door -> a two-for-user -> host turned on two of the wrong answer

The difference between the two acts take place in the host to open the door before and after conversion or conversion, this does not affect the final probability, so these two acts are equivalent. Bluntly said: the original title is equivalent to host two doors to take with you for a door. Obviously the probability becomes 2/3 from 1/3

Confused lift

While it is easy to come by exhaustive answer, but always felt a little dissatisfied, because we always feel three are equivalent.

ABC three doors, suppose you select A, host open B.

A third has been, but when the host turned B, C has become a 2/3 from 1/3, and why B is turned on, the probability is not A is also 50% C 50%?

That is because the only authority to exclude BC host of wrong answers, no wrong answers A's permission to exclude. So there is no probability of A winning host has not been "optimized", and C have.

Guess you like

Origin www.cnblogs.com/gxhunter/p/11306017.html