Subscribe via feed.

Out of order

Posted by Chris on November 26, 2010 – 6:53 pm

A drink machine has three options Coke, Pepsi and Random (i.e. Pepsi or Coke).  Each drink is $1.  A friend tells you that the machine is faulty and that all the buttons are incorrect.

How much money would you need to spend to know which buttons deliver which drinks?


This post is under “Logic, Tom” and has 37 respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

37 Responds so far- Add one»

  1. 1. Drew Hawks Said:

    $3.50 you use 50.C for each option but you use 50.c 3 times for random just in case and if that option gives you a persistant coke or pepsi or it changes you got the coke, pepsi, or random.

  2. 2. Drew Hawks Said:

    sorry, for the others you use 50.c twice and 50.c 3 times for random

  3. 3. Chris Said:

    Hi Drew. Nope. (I’ll ignore the 50¢ stuff as I had allowed for inflation and changed the price/drink to $1 from 50¢).

  4. 4. Wizard of Oz Said:

    One dollar is all you need.
    Assume the three buttons are labelled C, P and R for Coke, Pepsi and Random respectively.
    Then for all three buttons to be wrong the only possible combinations are PRC and RCP.
    Your first dollar and pressing the first button will tell you which one of these it is.

  5. 5. BearSprite Said:

    Wizard’s answer seems right, except that you would have to press the ‘Random’ button. That would be the only button that could tell you for certain which of the other two combinations it is, as it is the only button that is certainly not going to be the random dispensing option.

  6. 6. Wizard of Oz Said:

    Yes that’s right, BS.

  7. 7. Chris Said:

    Oh well, that didn’t last long. I’ve seen several problems like this. One involves piggy banks with either 1,2 or 5p or even 1, 2 or mixed 1+2p. Another involves three people wearing the wrong clothes.

    Yep, $1 does it. Use it with the button labelled Random. That’ll spit out e.g. Coke. Then the buttons labelled Coke and Pepsi must correspond to Random and Pepsi. As Pepsi is wrong, it must be the Random button leaving the Coke button actually being Pepsi. If Random had spat out Pepsi, you’d realise that the Coke button was Random and the Random button was Coke.

  8. 8. Karl Sharman Said:

    You don’t need to spend any money. Just watch Drew Hawks, Wizard of Oz and BearSprite. You can work it out from there. No cost involved.

    Or you could ring up the vending machine supplier, name and telephone number just underneath the coin insert, and tell them to come along and get it sorted….

    Was this one on Old ToM? it looks familiar…

  9. 9. Chris Said:

    Hi Karl. All the one’s I’ve posted lately are old ToM’s.

  10. 10. Zoe Said:

    nope, you guys are ALL WRONG! You’d need 3 dollars, because, if the machine is faulty, it wont give you money back, so, if you want to find out which button delivers the drink, then you have to try each button and there are 3 buttons so that would be $3 if one drink costs $1

  11. 11. Chris Said:

    Hi Zoe. I guess you are in write-only mode tonight.

  12. 12. shade Said:

    The only issues I have with the above answers is that if you put in a dollar and press the first button and you get a pepsi, you may, like wizard, think that the buttons must be P R C, but how would you know that the first button wasn’t just the random? Even if you inserted a second bill for the first button, receiving another pepsi still wouldn’t tell you anything; random is random, and nothing says that you wouldn’t get four pepsi or coke for that matter from it.

    We know that they are labeled incorrectly, so the button labeled random should be the first that you try– if you get a coke or a pepsi, you KNOW that that button is C or P. So there’s $1.

    So hypothetically, you put in a buck and press the random and get a coke. To figure out the remaining buttons labeled P and C, you’ve got to try the P. Insert $1, get a P, and then you would know that (since they are labeled incorrectly), that the pepsi button is actually random. The remaining button must be P.

    So minimally, that’s $2 to find out.

    BUT– if you put in your second dollar and try the P, and get a C, you’re still in the dark as to whether it is dispensing coke or if it is random. You would have to put a dollar into the other button (labelled C), and see what you get. If you get a C from the C, then you would know that THAT button was random, and problem solved; but if you put a buck into C and get a P, you just *still* don’t know if you’ve got the random or not.

    Random is just that, random, and there is the potential that the random dispenser could dispense five cokes in a row. So in the hypothetical, at a minimum, if all things are going your way and you’ve got luck on your side, $2, but there is also the potential that you could spend far more before you clearly have a distinct amount…

  13. 13. Chris Said:

    H shade. See my post (#7). That is the complete solution: $1 is all you need – you use it with the button labelled Random, as that cannot be the actual Random button because all of the buttons are mislabelled, not just some of them.

  14. 14. lewis Said:

    all u need is $4 the one u get the same u put it in and if its the same u got out of it then the other would be more the likeley the Random but thats still 50% right $5 would be 100%

  15. 15. Chris Said:

    Hi lewis. You can do it with $1 as shown above (in post #7).

  16. 16. akhtar Said:

    will need $2 to know which button work for what drink.

  17. 17. Chris Said:

    Hi akhtar, why do you say $2?

  18. 18. Spencer Said:

    Just break the machine and see where the sodas go; 1 penny will do it, just enough for a lock-breaking paper clip

  19. 19. ftawil Said:

    I agree that 1$ is enough, but don’t on the random button.
    If you press Random & only Random it will give you either Pep or Coke by definition, hence it is of no use, instead I will press on Coke & if I get a pepsi then the machine is faulty.

  20. 20. Chris Said:

    Hi ftawil. ALL the buttons are wrong. So the button marked Random is Pepsi or Coke only. It is the only buton guaranteed not to be random.

  21. 21. ftawil Said:

    Thks Chris. Now I got the real English meaning

  22. 22. zmxme Said:

    i say 3 dollars.

    (labeled random) you can assume that this one is either coke or pepsi, and not a random dispenser.

    (labeled coke.) put a dollar in here. you get a pepsi.

    (labeled pepsi.) put a dollar in here, you get a coke.

    put another dollar in the one labeled pepsi, and if you get a pepsi, then you can assume its the random dispenser, and be on your way knowing that the one labeled pepsi is indeed coke.

  23. 23. zmxme Said:

    sorry, i confused myself. here’s the correction.

    put another dollar in the one labeled pepsi, and if you get a pepsi, then you can assume its the random dispenser, and be on your way knowing that the one labeled coke is indeed pepsi.

  24. 24. Chris Said:

    I think doing it with $1 is cheaper. Your first $1 in the one labelled Random was a good start. But you don’t need to spend more money as you can now deduce the other two buttons immediately. But you can’t do that before spending the $1.

  25. 25. POOF Said:

    idk wat the answer is, but im sure that chris is wrong cuz the question is aking….How much money would you need to spend to know which buttons deliver which drinks?…meaning u need to find out wat each button dispenses, not just one of them

  26. 26. Chris Said:

    Hi POOF. It’s very simple. It is crucial to realise that all three buttons are mislabelled. Wiz (post 4) showed the only two possible ways that can happen. You need to spend $1 to determine which of those two ways it actually is.

    Try to see if you can come up with a third way of fully mislabelling – you’ll find it can’t be done.

  27. 27. Your name Said:

    $2 only.
    the first dollar you get, and you rule out one (Pepsi for ex.)
    The second dollar you insert rules out the next(Random for ex.)
    The third option is obviously Coke..

  28. 28. Chris Said:

    Hi Your name. The first 3 of your statements have a problem.

  29. 29. Spencer Said:

    Being a particle physicist, I have no idea.
    Ohhh, $2!
    No, $3
    Yes defiantly $3
    MORAL CONFLICT!!!!!
    was that your plan?

  30. 30. Spencer Said:

    My next puzzle is comming out in a few days, when ever in gets approved.

  31. 31. Chris Said:

    OMG it’s so simple. I only posted it to keep things alive.

    Let the three buttons be R, P and C. As all the buttons are mislabelled, we can be certain that R is either really the Pepsi or the Coke button. Feed it a $1 to find out which.

    If it delivers Coke, then we know that the remaining buttons (which are labelled P and C) must correspond to Pepsi and Random. The P button can’t be Pepsi (as it is mislabelled), so it must deliver Randomly. So that leaves the C button, which must deliver Pepsi.

    Now repeat the previous paragraph, but interchanging P with C, and Pepsi with Coke.

  32. 32. Nicky Said:

    You need $2

  33. 33. Lane Said:

    I disagreed with Chris on another question that he posted and insisted on a certain answer, but this time, he is right. You need $1.

    You put $1 in the machine and press the Random button. If you get a Coke, the button is for Coke. It is 100% impossible to be Pepsi because you got a Coke. It is 100% impossible to be Random because you pressed the Random button and ALL buttons are wrong.

    You now have buttons left: Coke and Pepsi. Since you are already 100% certain the Random button give Cokes, it is impossible for the Pepsi button to give Coke. It is also impossible for the Pepsi button to give Pepsi since ALL buttons are wrong. Therefore, the Pepsi button is Random.

    The only button left is Coke. The only drink unassigned is Pepsi, Therefore the Coke button gives Pepsi.

    If on the other hand the Random button gave Pepsi, you take the above explanation and replace all mentions of Coke with Pepsi and all mentions of Pepsi with Coke.

  34. 34. Chris Said:

    Hi Lane. Which problem was it that you disagreed with my solution?

  35. 35. Lane Said:

    To Chris,

    I disagreed with your answer about the three cards:
    Black/Black, Black/White, and White/White.

  36. 36. Chris Said:

    Hi Lane. You must have used a different name on that blog.

    I’ll post another comment there: http://trickofmind.com/?p=506#comments

  37. 37. Chris Said:

    Hi Lane. In response to your condescending and barbed comment in the introduction of your post 33 above: I was right on the Black or White problem too. I didn’t “insist” I was right; I (and others) proved the result many times; we didn’t simply make fallacious and unjustified assertions to arrive at the conclusion.

    It’s OK if you are unable of following my analysis (and see the correct result), it is out of order to do so in the way you did. For your benefit, I have now ripped many of the arguments and counter arguments (by Anthony) on that page to shreds. Can you do the same for any of mine?

Post a reply




PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0