29
$\begingroup$

On a job interview, I got this question:

Monty placed a car and two goats behind three identical doors (and the things do not move during the game). You receive the prize which is behind the door you picked in the second round.

You choose door number 1. Then, Monty opens door number 3 and you see a goat there. If you want to win a car, should you change your guess from door no 1 to door no 2?

I answered: YES and was told I was wrong. The interviewer explained me, that the difference between classical MH problem and this problem is that this problem clearly states, that Monty opens door number 3, which reduces the state space and after that my chance is 50/50.

I still believe chance of picking right door at first attempt is 1/3 and this probability is not changed by the information that Monty opens door number 3.

Am I missing something or was the interviewer wrong?

$\endgroup$
  • 15
    $\begingroup$ How exactly does that differ from classical MH? Does Monty always open door #3 in the interviewer's scenario regardless of what's behind it? $\endgroup$ – tilper Aug 31 '17 at 15:35
  • 7
    $\begingroup$ There's not enough information to form a complete answer, which may have been intentional. The question was likely to encourage discussion, not a yes or no answer. A decent interviewer won't quiz you, they want to see how you think. $\endgroup$ – Reuben Crimp Aug 31 '17 at 16:09
  • 2
    $\begingroup$ If that is classical MH problem, then interviewer made a standart mistake, which is described on wikipedia. $\endgroup$ – rus9384 Aug 31 '17 at 22:46
  • 7
    $\begingroup$ There's a bigger point here, which is you probably don't want to work for a company that makes hire-no-hire decisions on the basis of your knowledge of silly standard puzzles. Unless of course the job is writing silly puzzles. $\endgroup$ – Eric Lippert Aug 31 '17 at 23:22
  • 4
    $\begingroup$ What would Monty have done if you had chosen door number 3? Monty ALWAYS opens a door. So the interviewer was wrong. He has not given you enough information to draw the conclusion he states. Was he simply ignorant, or did he want to see how you would react when someone gave you incorrect facts? $\endgroup$ – Klas Lindbäck Sep 1 '17 at 14:16
43
$\begingroup$

The interviewer is wrong in stating that Monty "clearly" picked door 3 and that therefore the chances are 50-50. Monty picked door number 3 in this particular case but he didn't say why.

The interviewer is correct that if we do not know why Monty showed door number 3 (does he always show door number 3 no matter what is behind it or what you pick-- does he always pick a door at random that you did not pick no matter what is behind it-- does he always show a door with a goat you did not pick?) then the question can not really be answered. (But he is wrong in assuming that it is 50-50). We have to make an assumption but... what assumptions are valid and which aren't?

Here are several possible rules Monty could be played by:

Classic: Monty always shows you a goat you do not pick. Strategy: switch. 2 out of 3 in your favor.

Random: Monty picks a door you did not pick and this time it just randomly happened to be a goat. Strategy: doesn't matter. 2 out of 4 whether you switch or stay.

Devious: If you pick the car Monty will show you a goat in the hopes that you will assume a classic game. If you pick a goat he won't give you a choice. Strategy: stay. 100% in your favor.

Tough luck: Monty will always show you the car if he can. He'll only show you a goat if you pick the car. Strategy: stay. 100% in your favor.

Warped: There is one goat with a spotted tail. Monty will always show you a door you did not pick that does not have the spotted tail goat. Strategy: stay. If you switch it is 2 in 3 that you will get the goat with the spotted tail. So it is 2 in 3 if you don't switch you get the car.

Hierarchical: If you pick the goat with spotted tail, Monty will show you the goat without the spotted tail. If you pick the goat without the spotted tail Monty will show you the car. If you pick the car Monty will show you the goat without the spotted tail. Strategy: 50-50.

etc.

Which is the more likely one he is playing? We can't tell. And obviously these are not the only strategies.

====

Actually what would be fair is if it were worded like this:

You are an a game show and where you have a chance to pick a car or two goats. The hosts goal is to give you a goat and keep you from picking a car. You pick door 1 and he shows you door 3 has a goat and offers you a chance to switch to door 2. Should you?

Answer: it doesn't matter. Whichever door you pick he will put the goat behind it after you pick it.

$\endgroup$
  • 3
    $\begingroup$ Hang on, if Monty picked randomly and still showed you a goat, you should still switch (to go from 1/3 initial guess to 2/3 based on the new information which Monty's random choice revealed). It's only if you know Monty is picking deviously that you should stay. $\endgroup$ – Peter Cordes Aug 31 '17 at 17:52
  • 2
    $\begingroup$ Oh, I guess the fact that Monty's random choice revealed a goat gives you new information that your initial guess is more likely to be the car, like @tilper's answer says. $\endgroup$ – Peter Cordes Aug 31 '17 at 18:09
  • 2
    $\begingroup$ No. If you pick door 1 and Monty shows randomly from door 2 or 3. There are six equally likely cases. The car was behind door 1, 2 or 3. And monty shows door 2 or 3. As we are given that monty showed 3. The leaves three equally likely option. Car is behind door 1 or 2 or 3. As we are given that a goat is behind 3 and have two equally likely options. Car is behind door 1 or 2. $\endgroup$ – fleablood Aug 31 '17 at 18:13
  • 1
    $\begingroup$ Right, that's what I meant. Raising the probability from 1/3 initial guess to 1/2 after the new information from Monty's random choice. Not "more likely than door #2", just "more likely than before the new info". Sorry, didn't notice the ambiguity. $\endgroup$ – Peter Cordes Aug 31 '17 at 18:15
  • 1
    $\begingroup$ Hey! You want math? Or you want to count? Ya can't have both. ... Okay, I went overboard but I kind of like coming up with alternative strategies to counter the argument "well, it might be random or it might be that he will always show you a goat; better switch just in case". $\endgroup$ – fleablood Aug 31 '17 at 22:54
29
$\begingroup$

I'd say the interviewer was at least misleading.

the rules need to be made clear. the standard rule is: Monty opens a worthless door from the two you didn't choose, in the scenario that both of the unchosen doors are worthless, he chooses between them with equal probability.

Perhaps your interviewer had different rules in mind. It's different, for example, if Monty himself has no idea which doors are worthless. It's different if he always opens door $3$ regardless of its contents (though what does he do if you have chosen door $3$?).

In any case, if the rules are not clear then there is no way to answer the question.

$\endgroup$
  • $\begingroup$ it's also different if you don't always use one strategy if repeated over time. $\endgroup$ – user451844 Aug 31 '17 at 16:00
  • $\begingroup$ @RoddyMacPhee Ok, though I would just call that a different strategy (strategies can, after all, be probabilistic or path dependent in nature). $\endgroup$ – lulu Aug 31 '17 at 16:05
  • $\begingroup$ well that's where the usual 1/3, 2/3 probabilities come from is always sticking with the same strategy. $\endgroup$ – user451844 Aug 31 '17 at 16:08
  • 4
    $\begingroup$ There could be a devious strategy: If you pick a goat, Monty gives you a goat and the game is over. If you pick the car Monty will show you a goat. If that were the strategy the the probably that the car is behind the door you picked is 100. Of course there could be bizzaro rules, If you pick a goat he shows you the other goat. If you pick the car you get it right away. $\endgroup$ – fleablood Aug 31 '17 at 16:19
  • 1
    $\begingroup$ Anyone who has actually seen the game knows that Monty has no such strategy. There are various games. The closest to this is you have three games of various prizes of various values. You are given an option of cash or a door. If you choose a door, he reveals another door and gives you an option of a different amount of cash or to stick to your door. What door he reveals and how much cash he offers varies based on what he thinks would make for good television. $\endgroup$ – fleablood Aug 31 '17 at 18:20
8
$\begingroup$

Here is what I believe is happening.

In the classical MH problem, you pick a door, let's say door #1, and then Monty opens some other door which definitely has a goat behind it. This table from the Wiki page, which assumes you picked door #1 and that Monty always reveals a goat, summarizes the scenarios very nicely:

\begin{array}{|c|c|c|c|c|} \hline \textbf{Behind door 1} & \textbf{Behind door 2} & \textbf{Behind door 3} & \textbf{Result if stay} & \textbf{Result if switch}\\ \hline \text{Car} & \text{Goat} & \text{Goat} & \text{Win} & \text{Lose}\\ \hline \text{Goat} & \text{Car} & \text{Goat} & \text{Lose} & \text{Win}\\ \hline \text{Goat} & \text{Goat} & \text{Car} & \text{Lose} & \text{Win}\\ \hline \end{array}

Suppose instead that you choose door #1 and Monty always picks door #3, regardless of what's behind door #3. If door #3 opens and you see the car, that means you lose. But that's not the scenario the interviewer gave. The interviewer said the door was opened and a goat was revealed. That means that the only applicable scenarios from the table above are rows 1 and 2 (where row 1 is the first row after the header row), because only those rows correspond to a goat being behind door #3. Based on that, do you see how it becomes 50/50?

If this is really what the interviewer intended then I do believe that the interviewer should've been more clear that Monty always opens door #3 regardless of what it's hiding.

$\endgroup$
  • $\begingroup$ Thanks for this, that's exactly what he meant! However, we cannot infer probability from just one single case, if we do not know, why this particular door was open (what was Monty's strategy). $\endgroup$ – Bohuslav Koukal Sep 1 '17 at 11:09
  • $\begingroup$ What does Monty do if the OP picks door #3? $\endgroup$ – Eric Duminil Sep 1 '17 at 21:17
  • $\begingroup$ @EricDuminil, I don't know. That's a question for the interviewer. I was just assessing the scenario that was given. I suppose one possible solution is if OP picks door $n \in \{0, 1, 2\}$ then Monty picks door $(n + 2) \bmod 3$ $\endgroup$ – tilper Sep 1 '17 at 22:24
7
$\begingroup$

The motivations of Monty matter: why Monty picks the door to open, and even why Monty chose to open a door, matter.

If Monty always opens door #3 regardless of it containing a goat or a car, and this time you happen to see a goat, your chances after swapping remain 50-50.

If Monty only opens door #3 and offers a swap only if it contains a goat (if it contains a car, Monty doesn't open a door or offer a swap), your chances after swapping remain 50-50.

If Monty only opens door #3 and offers a swap only if it contains a goat and your door contains a car, your chances after swapping are 0%.

If Monty only opens door #3 and offers a swap only if it contains a goat and your door contains a goat, your chances after swapping are 100%.

If Monty always open a door, and it always contains a goat, and this time Monty opens door #3, your chances after swapping are 2/3. This is equivalent to the "classic" Monty question.

Every single one of the above situations are consistent with the question as you described. It is possible that the person asking the question was more specific than you where, and the omitted details make one of the above possibilities more or less likely.

But given the vague situation you described, any probability from 0% to 100% could result from swapping. Your puzzle is under specified.

It is possible the questioner was being clever and offering an underspecified puzzle with an overly certain argument afterwards to see how you handled it. It is more likely that they have a poorly written puzzle and over certainty about how it is different than standard Monty and there is nothing clever going on.

$\endgroup$
  • $\begingroup$ The last sentence is probably the best explanation. $\endgroup$ – Eric Duminil Sep 1 '17 at 21:19
0
$\begingroup$

Monty's reason for opening door number #3 (or any door) in the second round does not matter. With the problem as stated (1 car/2 goats and the locations can't change) then if you see a goat on round 2, you should always switch.

In the first round you have a 2/3 chance of picking a goat. Equivalently, you have a 2/3 chance of there being a car and a goat behind the other two doors.
Monty's choice in the second round doesn't change that. If you picked a goat in the first round (2/3 chance), you will always win if you switch (since the other goat has now been eliminated). If, for any reason, you are shown a goat in the second round then you should switch.

Switching gives you a 100% chance of winning in the case of picking a goat in round 1 and seeing a goat in round 2. Switching gives you a 100% chance of losing in the case of picking the car in the first round and seeing a goat in round 2. Since the problem states that we see a goat in round 2, pick the scenario with the highest likelihood (2/3 chance of picking a goat in round 1).

Monty's reason for picking the door doesn't matter because it has no effect on the probability you picked a goat in the first round. And, as long as he shows you a goat in the second round, it doesn't matter why he did that. (The only alternative would be Monty showing you a car, in which case your choice doesn't matter, unless you care about which goat you get, since you can't win the car in that case.)

Now, as a systems engineer, I would quibble with the way the second sentence of the question was worded: "If you want to win a car, you should switch". If this is read as "Should you switch to obtain a 100% chance of winning?", then there is no answer to the question, neither choice will produce that outcome. A better wording would be, "Will switching your choice increase your chances of winning the car?", in which case you were correct and the answer should be "Yes".

Were I to have this situation occur during an interview, since I believe you are also interviewing your new boss, I would calmly walk through my reasoning (as above) and see how they react. The best possible reaction would be, "Huh, I think you might be right. I'll have to look into this some more." I would be very concerned if they seemed upset at being challenged, or refused to consider the possibility they could be wrong. A good manager wants to hire people smarter than they are and should be willing to hear them out without being threatened.

$\endgroup$
0
$\begingroup$

I think there are two separate issues here.

One is related to the mathematical problem. There are many answers on this already so I won't say more.

The other is related to the objective of the question in the context of the interview. As most answers point out, there is missing information to make a decision. Perhaps the interviewer was expecting you to point that out and specify what kind of information is needed. In many decision making and problem solving positions is as important to understand the problem than to solve it. The interviewer may have been fishing for critical reasoning skills, the ability to properly formulate a problem, or identifying missing information, not really a simple Yes or No answer.

$\endgroup$
-1
$\begingroup$

This answer is based on statistics and variable change if the person changes his decision and choses door number two instead of door number one the probability changes from 66.6% to 33.33% ...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.