wu :: forums
« wu :: forums - Vending machine problem. »

Welcome, Guest. Please Login or Register.
May 6th, 2024, 5:06am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: SMQ, Icarus, towr, Grimbal, william wu, ThudnBlunder, Eigenray)
   Vending machine problem.
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Vending machine problem.  (Read 1619 times)
sateesp
Newbie
*





   


Gender: male
Posts: 35
Vending machine problem.  
« on: Feb 27th, 2010, 1:18am »
Quote Quote Modify Modify

There is a one milk vending machine, which has three buttons. Each button has limits called min and max. These limits indicates that when you press that button , min and max milk that you can get. Given this information, how would you find, is it possible to get the milk in the range of given min and max by pressing any combination of vending machine 3 buttons.
IP Logged
R
Senior Riddler
****



Addicted!!!

   


Gender: male
Posts: 502
Re: Vending machine problem.  
« Reply #1 on: Mar 5th, 2010, 9:00pm »
Quote Quote Modify Modify

Can anyone explain clearly on what is being asked and what is given?
IP Logged

The first experience seems like Magic, but the second tells you the Trick behind it.
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Vending machine problem.  
« Reply #2 on: Mar 6th, 2010, 3:37am »
Quote Quote Modify Modify

If I had to guess, I'd say we are given intervals [a,b], [c,d], [e,f], and want to add them together in some way such that the resultant interval you get lies in [g,h].
So we want to find x,y,z such that xa+yc+ze >=g and xb+yd+zf <=h
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Ant_Man
Newbie
*






   


Gender: male
Posts: 23
Re: Vending machine problem.  
« Reply #3 on: Mar 8th, 2010, 2:21pm »
Quote Quote Modify Modify

I believe we just need g<=xa+yc+ze<=h or g<=xb+yd+zf<=h. He just wants to know if it is possible at all.
 
It seems like the best strategy could potentially change after each button press, too.
« Last Edit: Mar 8th, 2010, 2:22pm by Ant_Man » IP Logged
sateesp
Newbie
*





   


Gender: male
Posts: 35
Re: Vending machine problem.  
« Reply #4 on: Mar 17th, 2010, 10:01am »
Quote Quote Modify Modify

That would be a brute force technique. Is there any better way to solve this ?
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Vending machine problem.  
« Reply #5 on: Mar 17th, 2010, 11:46am »
Quote Quote Modify Modify

Let's first settle on what problem you want to solve. Is Ant_Man's interpretation correct, or mine?
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
sateesp
Newbie
*





   


Gender: male
Posts: 35
Re: Vending machine problem.  
« Reply #6 on: Mar 20th, 2010, 10:25pm »
Quote Quote Modify Modify

Ant_Man's interpretation correct. we just need  find the x,y, z such that it  satisfies the following condition.
g<=xa+yc+ze<=h or g<=xb+yd+zf<=h.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board