You go to an island trying to find gold. Every inhabitant of the island is either a knight or a liar. You meet two inhabitants, A and B.

A:B is a knight and there is gold on this island.

B:A is a liar and there is gold on this island.

What are A and B, and is there gold on the island?

(In reply to

Puzzle Answer by K Sengupta)

Since B is calling A a liar, it follows that: (A,B) = (knight, knight) is impossible.

Since A states that B is the knight, this rules out the case: (A, B) = (knight, liar)

If (A, B) = (liar, knight) . Then A as a liar has correctly identified B as a knight. Then, his second part of the statement must be false implying that there is no gold on the island. Then, B's statement that there is gold on the island is false, so that B cannot be a knight, contradiction.

Accordingly, (A,B) =(liar, liar) must be the correct combination. This is consistent with conditions of the problem only when both parts of A's statement are false and the 2nd part of B's statement is false.

Consequently, each of A and B is a liar a no gold exists on the island.

*Edited on ***March 1, 2022, 1:47 am**