A drinks machine offers three selections - Tea, Coffee or Random

(Either tea or Coffee)but the machine has been wired up wrongly

so that each button does not give what it claims. If each drink

costs 50p, how much minimum money do you have to put into the

machine to find out which button gives which selection?

## 19 comments:

Assume the following:

Tap A gave Tea - 50c spent

Tap B gave Coffee - 50c spent

Tap C gave Tea - another 50c spent

So the problem is to find which one of A & C is the tap that gives Tea and which one is random.

Hit Tap A again,(50c spent) if it gives coffee then u have identified all three taps, i.e. A= random, B = Coffee, C = Tea.

If u got tea from Tap A again, it would not mean that Tap A is tea, coz it could just be the 50-50 probability resulted in having tea again.

anyway, 4 x 50c is the minimum u need to spend in order to determine which is which.

It sounded more concise in my head :P

Minimum money spent = Best case.

Best case is the following:

In the first round:

1. First selection gives you C (or T)

2. Second selection gives you same as 1.

You mark the third selection as T if the first and second selections were C (or C, if the first two were T).

Money spent in the first round = 50p+50p = $1.

In the second round:

1. First selection gives you T if it gave C in the first round. (or C, if it gave T in the first round).

So, first selection is marked random.

Money spent in the second round = 50p

Total money spent in first + second round = $1.5

Is it wrong to assume that the "random" button could give out three or more teas before it gave out a coffee? Does it necessarily always alternate between coffee and tea? If not, then it would cost much more than 4*50p

example:

Tap A (tea, tea, tea, tea)

Tap B (tea, tea, tea, coffee)

Tap C (coffee, coffee, coffee)

Tap A gave Tea

Tap B gave Tea, so you know that Tap C only gives Coffee.

But you can't assume that Tap B isn't the random tap if it gives out another tea. What if the next coffee in tap B was behind 7 teas?

Does this make any sense or am I incorrect?

Answer:50 CentsHint:the machine has been wired wrongly so that each button does not give what it claims

Solution:Following the hint above I hit the Random tap first and since it wouldn't actually be random I'll get to know if it gives Coffee or Tea!

If the Random gives Tea, I'll mark the Coffee tap as Random and the Tea tap as Coffee.

If the Random gives Coffee, I'll mark the Tea tap as Random and the Coffee tap as Tea.

So, in 50 cents I'm done. Now, I'm gonna go and have another cup of coffee! :)

There are only 2 cases.

Written-

Tea Coffee Random

Can be-

Coffee Random Tea

Random Tea Cofee

So just check Random..... if it gives Tea the case 1) otherwise case 2)

so only 50 cents.

It'll need 50 Paise Only.

Just look for what you get at Random Button.

There will be wo cases Tea or Coffee for button named Random, (U wont get random at Random button)

Case1: U got Coffee,

Coffee button will give Tea (It wont give Random cuz else Tea will give Tea which is not the case)

Tea button will give Random

Two Cases are as follows, go for random button 1st.

Button --- What U can get

-----------------------------

Random --> Coffee

Coffee --> Tea

Tea --> Random

-----------------------------

Random --> Tea

Tea --> Coffee

Coffee --> Random.

-----------------------------

It will take 50 paise........

In response to Ravi's comment:

That makes sense. I didn't read the question carefully, and instead assumed that the buttons were not initially labeled at all.

it ll take $(50+50) to find out which button gives which selection

50 cents.

Suppose we have the following tags

Tea Coffee Tea&Coffee

and we know all is wrongly tagged.Hence,

I will Click Tea & Coffee, If Tea comes out, I will rename this as Tea. Now Coffee Tag cannot be Coffee and also Tea , hence it has to be Tea & Coffee.Hence, Tea has to be Coffee.

Nice fill someone in on and this post helped me alot in my college assignement. Thank you as your information.

it can be an infinite amount of money because C can consistently give out the same random selection and then spit out the other option.

some people are just plain stupid, the question has been answered and the correct answer is 50p.

read the explanations of many people on top, before confessing your idiocy to the whole world!!!

You hit random. If it gives coffee then it's coffee, if it gives tea then it's tea (because the label is wrong, so those are the only two choices left). Now suppose it's the coffee tap. The tea tap will be random because it's not coffee, and the label is wrong so it is not tea. Therefore, the coffee labeled tap is the tea because it is not random or coffee. You only need to spend 50p.

eventhough i agree that the answer author is/are looking for is 50ps(because otherwise ths wud go on 4 ever) , we must not assume that all 3 buttons are wired wrong. It could also be 2 buttons in which case the answer would take some time to be written down

machine 1 may be tea coffee or random

a)assuming may be random

put two coins one after another =1 p

if not random

b)assuming may be random

*machine1 found may be coffee or tea

machine 2 either gives

if machine2 not same as first

u have to spend one more coin

if it is same as machine 1

then it s random

so got to spend only 1.50p

You pay 50p because I will give you coffee and 1 will give you tea and then the last will either give you coffee or tea, this arrangement can be change if an experiment actually took place.

I meant a 100p my bad. To last comment this is referring to.

Answer: 50 Cents Hint: the machine has been wired wrongly so that each button does not give what it claims Solution: Following the hint above I hit the Random tap first and since it wouldn't actually be random I'll get to know if it gives Coffee or Tea! If the Random gives Tea, I'll mark the Coffee tap as Random and the Tea tap as Coffee. If the Random gives Coffee, I'll mark the Tea tap as Random and the Coffee tap as Tea. So, in 50 cents I'm done. Now, I'm gonna go and have another cup of coffee! :)

Post a Comment