A box contains
10 red pills
5 blue pills
12 yellow pills.
What is the least number of pills one must extract to ensure at least
1. one blue pill?
2. two blue pills?
3. one blue and one yellow?
4. two blue and one yellow?
5. two blue and two yellow?
6. at least one of each color?
7. at least 3 of each color?
Soln:
1. one blue pill?
Ans: The worst case is if we pick all 10 red pills and 12 yellow pills and then only pick the first blue pill. So the least number of pills to ensure that atleast one blue pill is taken is 23.
2. two blue pills?
Ans: Similar to first question. Since now we need two blue pills. Thus the answer is 24.10 red pills + 12 yellow pills + 2 blue pills
3. one blue and one yellow?
Ans: 10 red pills + 12 yellow pills + 1 blue = 23
4. two blue and one yellow?
Ans: 10 red pills + 12 yellow pills + 2 blue = 24
5. two blue and two yellow?
Ans: 10 red pills + 12 yellow pills + 2 blue = 24
6. at least one of each color?
Ans: 10 red pills + 12 yellow pills + 1 blue = 23
7. at least 3 of each color?
Ans: 10 red pills + 12 yellow pills + 3 blue = 25