Current location - Training Enrollment Network - Mathematics courses - Mathematical logic problem
Mathematical logic problem
There are two people, A and B, each with a card. Natural numbers are written on both cards. It is known that the difference between two numbers is 1. But everyone can only see the numbers in each other's hands, not their own. The following is the dialogue between them.

A: I don't know what number I took.

B: I don't know what number I took.

A: I still don't know what number I took in the exam.

B: I still don't know what number I took in the exam.

A: I still don't know what number I took in the exam.

B: Now I know what number I have.

A: I also know what number I took.

Answer: Natural numbers begin with 1 The answer is that A is 6, B is 7 or A is 5 and B is 6.

Reason: 1, "A: I don't know what number I have." It means that B has at least 2 in his hand. (If it is 1, A is 2)

2. "I don't know which bus I took." It means that A has at least 3 in his hand. (If 1, b is 2; If 2, b is 3).

3. "A: I still don't know what number I got in the exam." It means that B has at least 4. (If it is 2, A is 3, if it is 3, A is 4)

4. "I still don't know what number I took." It means that A has at least five cards in his hand. (If it is 3, B is 4; If it is 4, b is 5).

5. "A: I still don't know what number I got in the exam." It means that B has at least 6. (If it is 4, A is 5; If it is 5, A is 6)

6. "Now I know what I took." It means that A has 6 or 5. (If it is greater than 7, B doesn't know what it is. ) 7. "A: I also know what I got." Because if B takes 7, A must be 6, and if B takes 6, A must be 5.