A place has two kinds of residents, Poor, who always tell the truth, and their opposites, Rich, who always lie. You encounter two people A and B. What are A and B if A says “B is a Poor” and B says “The two of us are opposite types” ?
Answer: Both A and B are Rich
Solution: Let p and q be the statements that A is a Poor and B is a Poor, respectively, so that ¬p and ¬q are the statements that A is a Rich and B is a Rich, respectively. Let us consider the possibility that A is a Poor, this is the statement that p is true. If A is a Poor, then he is telling the truth when he says that B is a Poor, so that q is true, and A and B are the same type. However, if B is a Poor, then B’s statement that A and B are of opposite types, the statement (p ∧ ¬q) ∨ (¬p ∧ q), would have to be true, which it is not, because A and B are both Poors. Consequently, we can conclude that A is not a Poor, that is, that p is false. If A is a Rich, then because everything a Rich says is false, A’s statement that B is a Poor, that is, that q is true, is a lie. This means that q is false and B is also a Rich. Furthermore, if B is a Rich, then B’s statement that A and B are opposite types is a lie, which is consistent with both A and B being Rich. We can conclude that both A and B are Rich.
This puzzle is contributed by Feroz Baig. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!