Given five sets:
[A, B, C, D] [M, N, O, P, Q, R] [W, X, Y, Z] [1, 2, 3, 4, 5] [7, 8, 9]
Five combinations are determined at random, e.g. A N Y 1 8 and C Q W 4 9. Each answer is distinct (A is only in one answer, X is only in one answer, etc).
Given only yes or no questions, what is the most efficient way to find all answers?
A simple way of solving this is to start asking questions to halve the possible answers, e.g. Does the first answer contain A or B? If yes, you know A or B from the first set, if no, you know C or D from the first set. It seems like there should be a way to use OR and AND to combine questions (does the first answer contain A or B and does it contain M, N, or O) to resolve a total solution faster, but my brain can't figure it out.
In my actual situation, the number of sets can change and the number of elements in each set is variable.
PS: I didn't know what tag to put on this question, so please feel free to change it.