Also, the manhole cover question was considered déclassé as early as 1999. One that was still making the rounds was...let's see if I can remember this... You have a soda machine that has three buttons, Coke, Pepsi, and Random (Coke or Pepsi). You know that your trickster coworker has swapped all of the button labels, so none of them are correct. What's the optimal strategy for getting a Coke out of the machine?
Its why I hate those things. They aren't testing analytical or creative ability, they are testing grace under pressure - a quality I have found is gained through experience.
- The highest likelihood of getting your choice with a single pick
- The least amount of money spent to guarantee getting your choice
- pepsi is coke or random
- coke is pepsi or random
- random is coke or pepsi
If you want Coke and you start with Pepsi, you'll get back Coke (1/2 + 1/2x1/2) or Pepsi (1/2x1/2). However, you could pick it and get back Pepsi 10 times in a row.
If you start by picking Random, you get back Coke (1/2) or Pepsi (1/2). If you get back Pepsi, you know
1. Random = Pepsi 2. Coke = Random (since it can no longer be Pepsi, since Random is) 3. Pepsi = Coke
So, you get back Coke on your first attempt (1/2), or you get back Coke on your second attempt (1/1).
So picking random first, then the correct one, optimizes for lowest upper bound on the number of choices to get what you want. Which is _actually_ what I meant by "The least amount of money spent to guarantee getting your choice", but didn't actually express correctly.
Why would you push it ten times in a row? If you get a Pepsi from it on your first press, you now know:
- The button labeled Pepsi is actually Random (it can't be the actual Pepsi button, since none of the labels are correct, and it's also not the Coke button)
- Therefore, the button labeled Coke is actually Pepsi (it can't be Coke by rule, and it's also not Random since we know where Random is now)
- Therefore, the button labeled Pepsi is actually Coke (elimination)
So the max is still 2 steps, but you have 75% chance of getting a Coke on the first try instead of just 50% chance. Same lower bounds, but better expected value.
I agree, and didn't mean to suggest otherwise. I was just referring to the specific probability computations being made.
I prefer Pepsi to Coke, so I wouldn't attempt to get a Coke. The optimal strategy is, of course, to get a crowbar, pry the machine open and take what you want.
That's the optimal, least expensive strategy -- assuming you have access to a crowbar.
rot13:
Bcgvzny fgengrtl vf gb fryrpg "enaqbz", gura vs lbh trg n Crcfv, fryrpg "Crcfv". Gjb cerffrf znk
Nsgre fryrpgvat "Enaqbz":
* lbh trg n Pbxr (1 cerff)
* Lbh trg n Crcfv
Vs lbh trg n Crcfv, lbh xabj gung "enaqbz" vf gur ohggba juvpu nyjnlf cebqhprf n "Crcfv" (bayl "Crcfv" be "Enaqbz" pna cebqhpr n Crcfv, naq lbh xabj gur ynoryf ner jebat).
Sebz urer, lbh xabj gung gur ohggba ynoryyrq "Pbxr" pna'g cebqhpr n "Pbxr", nf gur ynoryf ner fjvgpurq. Vg pna'g cebqhpr n "Crcfv", nf jr'ir sbhaq gung ohggba, fb vg zhfg or "enaqbz".
Gurersber, cerffvat "Crcfv" ba gur frpbaq gel jvyy nyjnlf trg lbh n "Pbxr"
Regarding the other two buttons, one is random and the other is coke but their labels are pepsi and coke, giving us only two possible (order-independent) states which I'll illustrate with the format drink(label)/drink(label):
Coke(Pepsi)/Random(coke)
Coke(Coke)/Random(Pepsi)
The second case is invalid because it would require for the coke label to be correct, leaving only one possible case: the button labeled pepsi would have to give out coke.
Let's say you press the Random button first. If it is actually the Coke button, you get a Coke, and you can stop. Otherwise it's actually the Pepsi button, then you press the Pepsi button since that is actually the Coke button. So you get a Coke in one or two button presses.
Basically there are only two permutations of buttons possible, because all other permutations are disqualified by the "not the same as before" rule. Since the goal is specifically to get a Coke in the fewest button presses, you just have to not start with the Coke button since that is the least likely to produce a Coke.
I also at no point got the impression that this fictional Feynman was very convincing, charming or anything like that. Just a bit of a talky wise-ass, really. Obviously he knows his stuff, but he's not direct enough to just say that outright, he tries to lord his intellect over the interviewer.
So I really wasn't sure what the punchline ("let's hire you in marketing") was all about. Is the interviewer saying this guy is a bad engineer since he doesn't get to the point? That he's a good marketer because he can talk lots and lots of bullshit?
Is the implication that being offered a position in marketing would be better than in engineering? It's definitely not what the candidate came in for, and the interviewer also doesn't mention if they would hire him for engineering, just for marketing.
That much, at least, actually sounds like Feynman. But for the most part, no, it didn't really sound much like him.