Suppose in a house there are exactly two types of servants: those who always speak the truth and those who always lie. A visitor arrives at this house to meet the owner and one of the servants says "My master is in the house if and only if I am telling the truth". What should the visitor do in order to reveal the truth?
Is the problem not well posed to arrive at any solution?
It's natural to assume that the visitor is aware of these only two categories of servants, but does not actually know the category of the teller. I am completely stuck in the half part of my approach to the solution. If this servant is of first category (truth saying) then the master is surely in house. But what if it is the other way round? Please help.
You don't need to ask any questions! The master is home!
If the master were out, a truth telling servant couldn't say that. That's obvious.
If the master were out and the servant were a liar then "If I am a truth teller then X" would be true. And "If the master is in then Y" would be true. So "I am a truth teller if and only if the master is in" would be !!!true!!!.
So that statement can only be said if the master is home.
Truth value of "I am truth teller If and only if X": 1)$T \iff T$ is True.
2)$T \iff F$ is false.
3)$F \iff T$ is false.
4)$F \iff F$ is true.
A truth teller can only do 1 or 4 but not 4. A liar can only do 2 or 3 but 2. So only 1 or 3 is possible. In both cases, X is true.
===
More clarification: Suppose a liar.
Liar: "X". We can conclude "not X".
Liar: "Something true and X". If X is true the whole thing is true, so X is false.
Liar: "If Something false then X". As something false isn't true anything can result so the statement is true no matter what X is. The universe just imploded.
Liar: "If Something false then X and Y". As "If something false then X" is true, we must conclude not Y.
Liar: "If I am telling the truth then X and Y." "I am telling the truth" $\subset$ "something false". We conclude not Y.
Liar: "If I am telling the truth then X and If A then B". We must conclude "not(If A then B)". If A is false then anything that follows is true. So A is true. And so to be false, B must be false. We must conclude A and not B.
Liar: "If I am telling the truth then X and If A then I am telling the truth". This is fine as "I am telling the truth" is false. So we conclude X can but either true or false and A is true.
Liar: "If I am telling the truth then (the master is home) and If (the master is home) then I am telling the truth". We must conclude the master is home by the second clause. The first clause is inclusive. So the master is home.
Liar: "I am telling the truth if and only if the master is home". Same as above. The master is home.