Reposting this riddle from
Tanya Khovanova's Math Blog, so that I can put the solution behind a link:
Four wizards, A, B, C, and D, were given three cards each. They were told that the cards had numbers from 1 to 12 written without repeats. The wizards only knew their own three numbers and had the following exchange.
A: "I have number 8 on one of my cards."
B: "All my numbers are prime."
C: "All my numbers are composite. Moreover, they all have a common prime factor."
D: "Then I know the cards of each of you."
Given that every wizard told the truth, what cards does A have?
Solution: There are five primes {2, 3, 5, 7, 11} in the set, so D must have two of them to deduce which remaining three B has.
C could have some subset of {4, 6, 10, 12} (composites with a factor of 2, excluding 8) or {6, 9, 12} (composites with a factor of 3). ({5, 10} doesn't have enough cards, and there aren't composites with a higher prime factor.)
One card can't eliminate "factors of two" from consideration, so it needs to be a card that eliminates both one of the factors of three (ruling out that C has those) and one of the factors of two (making it clear exactly which ones C has). That could be 6 or 12.
Either way, the last three players have the primes and the factors of two (except for 8) between the three of them, leaving A with 1, 8, 9.
This entry was originally posted
on Dreamwith.
comments are there.