David, Charles, Edwin and Fred are four candidates who have turned up for an interview. This is for a position in software testing. David has just started reading about Epistemology. Charles has practiced several puzzles passively(tries a little, but then simply memorizes the solutions). Edwin is a guy who is Sociable and his friendly demeanor helps him out in “situations”. Frey never hesitates to ask for help from anyone
One typical question, asked in a testing interview is about the 3 vending machines. One has orange juice, the second has grape and the third has both (it vends alternatively). The problem is all the machine labels are wrong. How many coins do you need to label all of them correctly.
Here is the answer provided by each candidate:
David: “I would go close to each and every machine and sniff. I’ ll start with the machine labeled orange, If the vending machine smells like grape juice, I note it down I try to open the lid of the machine and see what is stocked inside, remove the jug taste a little and if it feels like grape juice I would change the label immediately. Just repeat this step for the other two machines. This way I may never have to use even one coin.”
Charles: Thinks for a while (I think I have read this somewhere) and then responds ” Since the labels are wrong, I would use that coin on the machine labeled (falsely) Grape/Orange and whatever juice comes out I will label accordingly. i.e. if grape comes out I’ll remove the label from the grape juice machine and exchange it. I will use 2 coins consecutively on the other machine and if it simply gives the same juice (Orange) consecutively I would label that as Orange, and this would make the other machine get the label Orange/Grape.”
Edwin: “I would get friendly with the housekeeping staff and ask them what juice was loaded in which machine and if necessary use one coin to eliminate other possibilities”
Fred: “I would simply use the coin on any machine and label it. For finding about other machines I would ask a few friends to lend me 2-3 coins and get the juice and finally label all of them. This way I am not using more coins from you”
The interviewer, is happy with Charles as they believe he figured out the right answer as it’s been on the web and he also thinks similarly.
This puzzle is basically about the misleading labels one would encounter in complex systems. However, I would give credit to everyone. Situations differ and scarcity of coins can be handled in different ways.