The answer given by Bass has a worst case which takes 19 questions to identify the hybrid. With some difficulty I managed to prove that this is pretty close to the best possible worst-case performance for this problem. For the problem given, any strategy has a worst case that takes at least 18 questions. More generally, if we have n aliens, the worst case for any particular strategy is at least 2n-2 questions.
Since asking an alien how it feels about itself never gives useful information, I will ignore that kind of question in the following discussion; all questions are assumed to be between two different aliens.
The "solution" is identification of the genders of all aliens.
A "network" is a group of aliens who are all linked to one another, directly or directly, by a chain of questions, such that none of the aliens is linked to anybody outside that network. (The direction of the questions doesn't matter. If we ask A about B and B about C, then A, B, and C form a network; likewise if we ask C about both A and B.)
Initially, each of our n aliens forms a tiny network of size 1. As we ask questions, we will start merging small networks together into bigger networks. Any question asked between two aliens in different networks will merge those networks together; this kind of question will be termed a "network merging question" or NMQ for short.
Note that as long as we have a network N that does not contain the hybrid, it will not be possible to identify the gender of the aliens in that network. For any solution that's consistent with the answers for N, we could find another, different solution by switching the genders of all the aliens within N (female to non-hybrid male and vice versa).
Hence, in order to identify all aliens, we must merge all the networks together into one big network containing all n aliens. Since every NMQ reduces the count of networks by 1, it follows that we will need to ask exactly n-1 NMQs as part of getting all the information required.
With that out of the way, let's assume you have a strategy that would give you the solution in 2n-3 questions. Because the worst case depends on what questions you're asking, I'll define it as you go along, based on the questions that you ask. (You can think of it as playing against a jerk who gets to choose the answers as you go, subject only to the requirement that they're consistent with what you already know.)
Before we start, let's obtain n reversible hats, each with red on one side and blue on the other. We give each alien a hat and ask them to put it on (doesn't matter which way out, just pick one). The hats don't actually do anything, they're just a handy way of tracking what information we've obtained within each network.
You may now start asking questions, one at a time. When you ask Alien X whether they love Alien Y, the answers follow these rules:
- If X and Y have opposite-coloured hats, the answer will always be "Yes".
- If X and Y have same-coloured hats, and they are already within the same network, the answer is "No".
- If X and Y have same-coloured hats, and they are in different networks, all the aliens in Y's network reverse their hats (so X and Y now have opposite-coloured hats), and the answer is "Yes".
Three things to note:
- Any time you ask a NMQ, the answer will be "Yes".
- If X has answered "No" about Y, they must have same-coloured hats. (You only get a "No" from two same-hatted aliens who are already in the same network, and once they're in the same network, any hat reversals affect both of them, so they end up with the same colour again).
- If X has answered "Yes" about Y, they must have opposite-coloured hats. (Again, a "Yes" only happens between aliens with opposite-coloured hats, and any future reversals would affect both of them, so they remain opposite.)
Suppose that you have asked 2n-3 questions and connected all the aliens into one network (as noted above, this is a prereq for finding the required information). This means you've asked exactly n-1 NMQs; since NMQs will always be "Yes", that means there will be at most n-2 "No" answers.
From this, it follows that there must be at least two aliens in your network who have never given a "No" answer - let's call them Pat and Lee.
There are at least two different solutions that are consistent with all the questions you've asked:
1: Pat is the hybrid. Everybody else who has the same hat colour as Pat is male; everybody who has the other hat colour is female.
2: Chris is the hybrid, everybody who has the same hat colour as Chris is male, everybody who doesn't is female.
Hence the worst case requires at least 2n-2 questions (18 for the case where n=10).
Also, thanks for a very challenging and interesting puzzle!