I got this riddle in a quiz game and cannot correctly formulate it with first order logic. I am not certain it is even possible with first order logic.
The riddle goes as follows:
Among persons A,B and C one person always lies, one person always tells the truth and one person sometimes speaks the truth, hence being ambiguous. We get the following statements:
1: Person A claims person B always tells the truth.
2: Person B claims person B(himself) sometimes tells the truth.
3: Person C claims person B always lies.
I made an attempt to formulate the 3 statements. The symbols A,B and C refer to the corresponding person telling the truth. $$ A \rightarrow B $$ $$ B \rightarrow (B \newcommand*\xor{\mathbin{\oplus}} \neg B)$$ $$ C \rightarrow \neg B$$
My solution strategy was adding a conjunction between the statements and using a truth table to find > 1 passing combinations. I was hoping the above mentioned prerequisite of one truth teller, one lier and one ambiguous would appear between these combinations. I was not able to achieve the correct answer with this formulations and am fairly certain the problem is with the ambiguous statement 2.
Answer:
Person A sometimes speaks the truth(ambiguous). Person B always lies. Person C always tells the truth.
I think you're right about where the problem is. Since there are three possible states for each person (truth teller, liar, and
amphibiousambiguous), you can't get away with one proposition per person: the negation of "$A$ is the truth-teller" is "$A$ is either the liar or the ambiguous person", which doesn't entirely pin down $A$'s state.If you want to phrase everything in terms of propositional logic, I would go with two separate propositions $L(A)$ ("$A$ is the liar") and $T(A)$ ("$A$ is the truth teller"). So "there is exactly one truth teller" becomes:
"There is exactly one liar" turns into a similar trio of statements.
Then you need some statements to ensure that the liar and the truth teller are different people:
A statement like "$A$ claims $P$" for some proposition $P$ becomes a pair of statements:
So statement 1 becomes
$$(T(B) \implies \neg L(A)) \wedge (\neg T(B) \implies \neg T(A))$$
and statement 2 becomes
$$(\neg L(B) \wedge \neg T(B) \implies \neg L(B)) \wedge (L(B) \vee T(B) \implies \neg T(B))$$
and statement 3 becomes
$$(L(B) \implies \neg L(C)) \wedge (\neg L(B) \implies \neg T(C))$$
and then you could feed all of these into some large truth table or propositional solver and see when they are all true.
But really this is the long way around; you probably wouldn't want to do it unless you already had a propositional solver lying around. Checking the six possible permutations of $\{\text{liar}, \text{truth teller}, \text{ambiguous}\}$ is a lot more straightforward.