28
$\begingroup$

You decided to buy 2 birds from a pet shop and went to a pet shop for it. There are 12 budgerigars at the pet shop and you want a male and a female for your home. You cannot distinguish the gender of birds by just looking at them. So you ask for 2 birds with different genders to the shopkeeper and the shopkeeper is actually a good math teacher in a school and tells you that

I have 6 male and 6 female budgerigars in my shop. You can choose as many birds as you want among them, every time I will tell you how many males there are among the birds you choose.

So tell me at least how many times I need to tell you how many males there are in the chosen group of birds to guarantee to find a male and a female budgerigar? I will give you the birds for free if you answer correctly!

$\endgroup$
13
  • 2
    $\begingroup$ I think keeping two birds with different gender is not a good idea... $\endgroup$ Mar 21, 2017 at 12:34
  • 5
    $\begingroup$ Actually you CAN distinguish the gender of budgerigars just by looking at them: just look at the cere. $\endgroup$ Mar 21, 2017 at 12:40
  • $\begingroup$ @randal'thor our guy cannot :) thanks for the tip though... $\endgroup$
    – Oray
    Mar 21, 2017 at 12:43
  • 1
    $\begingroup$ u need only 1 question… if u can … well u know… cut. ("now you have 3.1415 males") $\endgroup$
    – Jan Ivan
    Mar 21, 2017 at 13:57
  • 1
    $\begingroup$ @user2357112 What's the difference between identifying a male and a female and identifying a pair of opposite genders? What exactly is not clear? a) The description above the riddle says you want a male and a female for your home. b) The riddle itself wants you to find a male and a female budgerigar with the least amount of answers from the shopkeeper. $\endgroup$ Mar 22, 2017 at 9:00

3 Answers 3

35
$\begingroup$

You need to ask

twice.

Choose 4 birds.
1. No Males: Pick 2 other birds.
1.1 No Males: Pick one bird from the 6 remaining and one from the first 6.
1.2 One Male: You found a pair.
1.3 Two Males: Pick one of them and one from the original 4.

2. One Male: Divide the group in half. Check one of them.
2.1 No Male: The other group is a pair.
2.2 One Male: You found the pair.

3. Two Males: Divide the group in half. Check one of them.
3.1 No Males: Take one bird from each group.
3.2 One Male: You found a pair.
3.3 Two Males: Take one bird from each group.

Finding one female is the same as finding one male, just swap the gender.
Finding no females is the same as finding no male, just swap the gender.

$\endgroup$
1
  • $\begingroup$ How did you realize that 4 birds should be chosen the first time ? Did you try all possibilities one by one ( choosing 1 bird the first time, choosing 2 birds the first time , etc ) and realised that choosing 4 birds the first time is the optimal way ? $\endgroup$ Dec 1, 2020 at 16:26
11
$\begingroup$

Imagine you have 4 birds, and you know how many of them are male and how many female (both of these numbers being nonzero). How would you go about finding a pair of opposite sex?

Simple. Pick any two birds - either they're one male and one female (done), or they're both of the same sex, say male. If your original set of 4 had two males and two females, you now know which is which (done); otherwise, the two you didn't pick must be a pair (done).

Thus, you only need one question for an arbitrarily mixed group of 4 birds.


Now go back to the 12-bird case, with six male and six female. Pick any four birds.

  • If this set has at least one of each gender, you only need one more question to finish, by the above.
  • If they're all of the same sex, say male, then you've got your male and just need to find a female.

    Pick two of the remaining eight birds (of which you know six are female). If both are male, all the rest must be female; if both are female, you're done; otherwise, you've found a pair.

Thus, you need a maximum of two questions to solve the case of 12 birds.

$\endgroup$
2
  • $\begingroup$ How did you realize that 4 birds should be chosen the first time ? Did you try all possibilities one by one ( choosing 1 bird the first time, choosing 2 birds the first time , etc ) and realised that choosing 4 birds the first time is the optimal way ? $\endgroup$ Apr 6, 2022 at 0:12
  • $\begingroup$ @HemantAgarwal This answer is 5 years old and I really don't remember, sorry :-) $\endgroup$ Apr 6, 2022 at 5:22
4
$\begingroup$

I think...

3

Because..

You have 12 budgerigars, divide them to 3 equal groups of 4 budgerigars. Then, pick one group. If the male number is 0 or 4, choose another group, and go ahead. If not, go ahead. Pick two random birds. If those two are one male and one female, good. If not, if the male count (of the previous 4-group) is 1 or 3, pick the other two, and if it is 2, keep one and pick another one. Now the maximum is 1(if your first male count is 0 or 4) + 2 = 3.

(Correct me if I'm wrong, this is my first puzzling answer.)

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.