Google

  www.google.com
  www.google.com

Interview Question

Product Manager Interview Zürich (Switzerland)

15 minutes of the second interview were spent on a coin

  brainteaser: You have 1 coin and 3 doors. How to pick one of the three doors by tossing a coin? What is the probability for picking each of the doors in the suggested algorithm? Can it be made equal for each door? The interviewer seemed to not accept an algorithm that differed from his (or book? :)) answer. Suggested algorithm: H==head of the coin T==tail of the coin Toss the coin 2 times: HH or TT --> pick door #3 otherwise use result of the very first toss: if (H1) --> pick door #1 if (T1) --> pick door #2 I have to admit that I wasn't particularly impressed with this question and amount of time we spent on it. In my personal opinion we could have spent the very limited time addressing more real-life issues applicable for the position, so I tried to explain my algorithm as a "quick-dirty" solution and hoped to move on, but apparently for the interviewer it was a much more of principle to get the same answer that they had in mind/book.
Answer

Interview Answer

5 Answers

1

toss the coin 2times for each door think that H to open the door and T to not open the door

yaswanth babu on Jul 31, 2012
0

I think it not always equal, everything we take a choice there is a new probability shown up, so I always chose my best way to pick that choice if there is an error or disagree from My Boss, I take the risk.

Yunan Yusmanto on Aug 3, 2012
0

Toss the coin 2 times! H = 0, T=1 or vice versa.
Result:
00 = 1st door
01= 2nd door
11 = 3nd door

Manolis Samarakis on Aug 6, 2012
12

I think all the previous answer are somehow incomplete (and the one given by the author of this post is wrong, for this reason he kept asking you the question trying to help).

Toss the coin 2 time. Here the possible outcomes:

HH => try again
HT => Door 1
TH => Door 2
TT => Door 3

This way the probability to choose a door is evenly distributed. And you cover all the possible outcomes.

Ciao!

Claudio on Aug 8, 2012
2

Since you are tossing a coin, the number of outcomes will never be divisible by 3. Thus, no matter how many times you toss the coin, you can never divide the number of outcomes into 3 equal probability groups. This also means that if you MUST choose a door, then one of them will be chosen more often than the others, or NOT choosing must be a possibility. In the latter case, you have to come up with an alternative, like flip two times (4 possible outcomes to match the 4 choices...3 doors + 1'flip again' option). The problem with flipping again option is that you 'leave the door open' to the possibility that you might never choose a door. What if you keep getting the HH option and never open a door?? Thus, a better alternative is needed: Choose two of the doors first (doesn't matter which ones) then flip between them. Winner gets to compete against the third door with the second coin toss. In both cases any door has a 50% chance of being chosen, and the probability does not change for the second try. So, each door has an equal probability of being chosen, AND a door WILL be chosen.

Anonymous on Jul 20, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.