You are given four balloons: red, blue, green and yellow. Some (or all) of the balloons might be counterfeit.
A detector box can display the quantity of counterfeit balloons inside the box.
Your task is to detect all the genuine balloons using the detector box not over three times.
How would you do it?
Source: Russian Kvantik.
Letter the balloons A,B,C,D
1st detection: A,B,C
2nd detection: A,B,D
3rd detection: A,C,D
The ordered triple of numbers of counterfeit balloons can uniquely identify which balloons are counterfeit.
The one-one correspondence between Counterfeits and Triple is
So for example if the first detection says 2 counterfeits and the second and third each say 1. We know that only B and C are counterfeits.
I don't know if this solution - test 3 every time - is the only one.
Edited to fix an error in the example.
Edited on January 13, 2016, 7:22 am
Posted by Jer
on 2016-01-12 10:45:41