Recently a logic question has become quite popular. Here it is:
Two logicians (A and B) each secretly pick a whole number from 1 to 30 inclusive. Each knows the other has done this.
A: "Is your number double mine?"
B: "I don't know. Is your number double mine?"
A: "I don't know. Is your number half mine?"
B: "I don't know. Is your number half mine?"
A: "I don't know."
B: "I know your number."
All the statements are true. What is A's number and how did B know?
My though process is outlined below.
1. Assume for the sake of contradiction that A is a number between 16 and 30. Then, A knows that double their number cannot be B, as B is between 1 and 30. However, assuming A is a logical logician, why would they ask such a question they already know the answer to? This implies A's number is between 1 and 15.
2. B first replies with "I don't know". Assume for the sake of contradiction that B has an odd number. Then, they would know that their number cannot be double any value of A, and would thus reply with "No". Thus, a contradiction, and B must be an even number. B then asks if A's number is double B. By the previous section, this implies that B's number is between 1 and 15. So, the possible values of B are 2, 4, 6, ..., 14. However, if B's number is 8, 10, ..., 14, then B already know that A cannot be twice B's number, since A is between 1 and 15. Thus, B's number must be 2, 4, or 6.
3. Here's my first problem with this logic puzzle. By saying "I don't know", A is implying that their number is 4, 8, or 12; otherwise, A would reply with a definitive "No". Then, A asks if B's number is half of A's. Why would A ask this? The only answer to A's question from B's side is "I don't know"; if B answered "Yes" or "No", that indicate that B knows A's number, which I don't think is possible with just the first 3 statements.
4. And here's where I'm just confused. B says "I don't know", as expected. Then B asks if A's number is half of B's number. Wouldn't this be asking if A's number is 1, 2, or 3? Isn't this a contradiction with the previous statement where A implies their number is 4, 8, or 12? So shouldn't A reply with "No"? Instead, A replies once again with "I don't know", which makes no sense to me.
I likely made a silly error somewhere, please correct me if so! Thanks in advance.
We will call A's number $a$ and B's number $b$. From the first three statements we know $a$ is a multiple of $4$ and $b$ is even. From B's second we know $b \le 14$ then from A's third we know $a \le 7$, so $a=4$