Ambiguous Teller Riddle
I was reading various riddles and puzzles on the internet. One of the formulations of the riddles state: formulate it [the riddle] with first-order logic. Is it possible to formulate it using 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:
I made an attempt to formulate the 3 statements:
A ? B. A is true because B is true.
B ? = ¬B. B says the truth or not but not both.
¬(C ? B). C says the truth as a negation of B.
My first inquiry is if I accurately formulated the statements. If you see any errors or hiccups, please correct me.
Secondly, I want to solve this riddle. Who is the liar?
Statement like "A claims P" for some proposition P becomes a pair of statements:
P ? ¬A. if P is true, A cannot be the liar.
¬P ? ¬A. if P is false, A cannot be the truth teller.
But here we have some contradictions. Assume A is true always, but he says b is true always.
On the other hand, assume B is true always, but he himself admits that he is ambiguous. This is all contradictory.
How would you formulate this riddle?
I think the statements of A and B are contradictory. Do you agree?
Please help me.
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:
- Person A claims person B always tells the truth.
- Person B claims person B (himself) sometimes tells the truth.
- Person C claims person B always lies.
I made an attempt to formulate the 3 statements:
A ? B. A is true because B is true.
B ? = ¬B. B says the truth or not but not both.
¬(C ? B). C says the truth as a negation of B.
My first inquiry is if I accurately formulated the statements. If you see any errors or hiccups, please correct me.
Secondly, I want to solve this riddle. Who is the liar?
Statement like "A claims P" for some proposition P becomes a pair of statements:
P ? ¬A. if P is true, A cannot be the liar.
¬P ? ¬A. if P is false, A cannot be the truth teller.
But here we have some contradictions. Assume A is true always, but he says b is true always.
On the other hand, assume B is true always, but he himself admits that he is ambiguous. This is all contradictory.
How would you formulate this riddle?
I think the statements of A and B are contradictory. Do you agree?
Please help me.
Comments (84)
When person B says he "sometimes tells the truth", is that consistent with the statement "person B always tells the truth"? I just want to get that question clarified first, because it could be a weird technicality - when he says he sometimes tells the truth, is he saying he's definitely not the guy who always tells the truth?
Because there's an interpretation of "sometimes" that's consistent with "always". If "some" just means more than one, then "always" counts as a possible validation of "sometimes".
C tells the truth
B is the liar
A sometimes tells the truth
If they aren't mutually exclusive there's another possible answer (maybe more than one)
B says the truth or not but not both. B says the truth often. B also lies often. B doesnt say both. The ambiguity of B is the core of this riddle. I copied and pasted it as it is written on the internet. I havent altered anything. We can conclude he is not definitely the person who always tell the truth, yes. Nonetheless, A claims B always tells the truth.
This is a clear contradiction to the riddle. Right?
Quoting flannel jesus
Exactly.
Quoting flannel jesus
Yes.
B definitely CANNOT be the guy who always tells the truth, since that would make Bs statement about himself a lie
A definitely CANNOT be the guy who always tells the truth, since that would mean B always tells the truth, which we know is false
That only leaves C as the guy who always tells the truth
The rest naturally follows.
I had the same thoughts about C. A is a liar, and B is ambiguous , so I believe C is the lone truth-teller. But I was wondering if I had properly written those in logic language because the riddle statement requested if it could be formulated in first-order logic or not. Since you did not criticise my initial question, I assume I formulated it correctly.
Quoting flannel jesus
The liar is B, but also A. Is it contradictory or ambiguous?
A sometimes tells the truth, and his statement in this riddle just happens to be a lie. Presumably one can imagine a has told the truth at some other occasion.
Exactly. That is why I questioned whether A contradicts his own assertion or if A, like B, is simply ambiguous. At least, we both believe that C is the lone truth-teller.
Then B is always false and ambiguous. But what happens to A?
No, just false
Quoting javi2541997
He sometimes lies, and sometimes tells the truth.
Assume A is true always, but he says B is true always. Is A still ambiguous or contradictory?
Assume B is always true, but he himself admits that he is ambiguous (because B stated that he sometimes tells the truth). Then B is the liar, though not always. He is ambiguous in this context.
If "sometimes tells the truth" entails "sometimes lies" then:
If Person A is the person who always tells the truth then Person B is the person who always tells the truth. This is a contradiction. Therefore, Person A is not the person who always tells the truth.
If Person A is the person who always lies then Person C is the person who always tells the truth. If Person C is the person who always tells the truth then Person B is the person who always lies. This is a contradiction. Therefore, Person A is not the person who always lies.
Therefore, Person A is the person who sometimes tells the truth, Person B is the person who always lies, and Person C is the person who always tells the truth.
Assuming either one of them is the truth teller leads to contradiction, so we don't.
In first-order logic, you may want a predicate is(person,identity). Example, is(A,liar) evaluating to true if A is liar.
In fact, the solution space is very small, just 3! = 6 possibilities. Therefore, brute force is a perfectly viable solution strategy:
(truth,random,liar)
A B C
0 truth random liar
1 random truth liar
2 liar random truth
3 random liar truth
4 truth liar random
5 lair truth random
Brute force evaluation:
0 truth random liar
(1) truth says about random that he is truth -> false, abort
1 random truth liar
(1) random says about truth that he is truth -> consistent
(2) truth says about truth that he is random -> false, abort
2 liar random truth
(1) liar says about random that he is truth -> consistent
(2) random says about random that he is random -> consistent
(3) truth says about random that he is liar -> false, abort
3 random liar truth
(1) random says about liar that he is truth -> consistent
(2) liar says about liar that he is random -> consistent
(3) truth says about liar that he is liar -> consistent
-- this is a legitimate solution --
4 truth liar random
(1) truth says about liar that he is truth -> false, abort
5 liar truth random
(1) liar says about liar that he is truth -> consistent
(2) truth says about truth that he is random -> false, abort
solution predicate:
is(person,identity) ? (person=A ? identity=random) ? (person=B ? identity=liar) ? (person=C ? identity=truth)
For me, it is like pulling a rabbit out of the hat. It is surprising that A is actually the problem and not B. Or did you see the point from the beginning?
Thats what I tried to argue! If A is contradictory, then C is the truthteller, and B is ambiguous. I mean, according to this context, B could be the one who sometimes tells the truth.
A is the person who sometimes tells the truth.
Quoting javi2541997
That depends on whether or not "I sometimes tell the truth" entails "I sometimes lie". If it does then B is not the truth-teller. If it doesn't then the answer is undecidable.
Quoting javi2541997
No, B is the ambiguous person given the ambiguity of the phrase "I sometimes tell the truth".
He's using unclear wording, but when he says "ambiguous person" he means "the person who sometimes tells the truth". He doesn't mean "the person whose role is ambiguous".
Gotcha, thanks.
Person A claims person B always tells the truth. Person B claims person B (himself) sometimes tells the truth. Okay, then, A tells the truth and B always lies. A is the ambiguous person here. I tried to explain that he is just contradictory and B is ambiguous.
But I am starting to realise that A is dragged down by the ambiguity of B. And then I asked myself: does this make A ambiguous or just contradictory with his statement?
I've made a few edits to my first comment since I first posted it. If you haven't already, refresh the page and check it out. It should answer everything very clearly.
That seems pretty simple and straight forward to me. Which part of that logic do you disagree with?
Am I missing something in that attempt to use logic? As I asked at the beginning of the OP I wonder whether I am correctly formulating the logic or not.
Who claims these things? As far as I can tell, everyone here except you has understood that b must be the liar. Who else do you see claiming a might be the liar?
Yes, you're overcomplicating something very simple. C tells the truth. C says B is the liar. Therefore, B is the liar.
Quoting javi2541997
You keep asking this, and everyone else keeps giving the same answer. A sometimes tells the truth.
Yes, I understood it at the first glance, but:
Quoting flannel jesus
If Person A is the person who sometimes tells the truth, then it means he sometimes lies. Person A could be a liar as well. Yes or no?
I agree with @flannel jesus that A sometimes tells the truth, B always lies and C always tells the truth. (admittedly my solution is more convoluted).
Presumably, a person who always tells the truth is different to a person who sometimes tells the truth, and in this sense are mutually exclusive.
IF A always lies - B always tells the truth - C sometimes tells the truth
THEN B would not say of himself "B sometimes tells the truth"
IF A always lies - B sometimes tells the truth - C always tells the truth
THEN C would not say about B "B always lies"
IF A always tells the truth - B always lies - C sometimes tells the truth
THEN A would not say about B - "B always tells the truth"
IF A always tells the truth - B sometimes tells the truth - C always lies
THEN A would not say about B - "B always tells the truth"
IF A sometimes tells the truth - B always tells the truth - C always lies
THEN B would not say about himself - "B sometimes tells the truth"
The only remaining possibility is - A sometimes tells the truth - B always lies - C always tells the truth.
On the occasion that A was lying rather than telling the truth, A would say one of two things about B, either "B always tells the truth" or "B sometimes tells the truth"
B would say one of two things about himself, either "B always tells the truth" or "B sometimes tells the truth".
C would say of B, "B always lies"
The three statements work on the understanding that A happened to be lying rather than telling the truth.
Person c always tells the truth, and he says B is the liar. Therefore a can't be the liar. I can't tell if you're trolling.
A can sometimes tell lies, but he can't be the person who always lies.
Otherwise, B cannot only tell the truth sometimes because that would make both A and C liars. This makes B the liar, because they stated that they sometimes told the truth.
Therefore, A must sometimes tell the truth but isnt in this situation, because A cannot be the truth teller, having lied. This makes C the truth teller.
A=can both lie and tell the truth
B=liar
C=truth teller
Quoting Igitur
Thank you so much for your posts. You explained very well what I tried to explain, but I couldnt find the correct premises due to my lack of wording and logic skills.
Do you see it now, @flannel jesus? Because you claim A cant be a liar emphatically. While, as Igitur noted, if A sometimes tells the truth, A can be both a truth teller and a liar. Therefore, there is the possibility for A to be a liar as well as B.
I think you are confusing matters by being imprecise with your descriptions.
There are three types of person:
1. The person who always tells the truth
2. The person who always lies
3. The person who sometimes tells the truth
Person A can tell the truth but cannot be the person who always tells the truth.
Person A can lie but cannot be the person who always lies.
Person A is the person who sometimes tells the truth. If Person C is the person who always tells the truth then Person A is lying. If Person B is the person who always tells the truth then Person A is telling the truth.
I think this is what was trying to say. That A is lying, but doesnt always lie (because B always lies). A only sometimes lies, and has the capacity to tell the truth.
A: Sometimes tells the truth. Therefore, he can lie often.
B: always lies.
C: Always tells the truth.
Therefore, A and B are liars and C is the only truth teller. If A sometimes tells the truth it means he can also lie as well as B.
I think you're confused about what I've claimed. I've only claimed he can't be THE liar, as in, the one who always lies. He can lie, I've said that explicitly
Dude
Quoting flannel jesus
The answer is apparently obvious to everyone but you.
:clap:
I couldnt have said it better. Michael, frame that post please because @flannel jesus is not capable of seeing that A can actually be a liar too.
You edited your posts after reading the arguments of Michael and Igitur :lol:
That is unclear. Prima facie these might mean two different things:
1. I sometimes tell the truth
2. I only sometimes tell the truth
Strictly speaking (1) might be true even if I always tell the truth. It is ambiguous as to whether or not (1) entails (2).
If it doesn't then the question is even more problematic as the person who sometimes tells the truth might always tell the truth, and so we have two people who always tell the truth.
I agree. Thats about what happens to A.
Quoting Michael
Yes. And reaching (more or less) that conclusion, we can (perhaps) say that A is the ambiguous here. Right?
No, because if "sometimes tells the truth" doesn't mean "only sometimes tells the truth" then "sometimes tells the truth" is consistent with "always tells the truth", and so there may in fact be two people who always tell the truth.
In such a scenario it would be that both A and B always tell the truth and C always lies.
What I was getting at is that if "sometimes tells the truth" doesn't mean "only sometimes tells the truth" then the original claim "one person sometimes tells the truth and one person always tells the truth" is consistent with the claim "two people always tell the truth".
So our initial setup is that two people always tell the truth and one person always lies.
You're saying "I sometimes tell the truth" and "I always tell the truth" can be simultaneously true - which I brought up in the second comment in this thread, I get the idea.
You're saying, that means A and B could both always tell the truth, and C always lies - that's good, that's one possibility.
Another possibility the is, A sometimes tells the truth and B always tells the truth. Test out the validity of everyone's statements in that case and let me know what you think.
I think its clearer to phrase it like this:
Scenario 1
A sometimes lies (and is lying)
B always lies
C always tells the truth
Scenario 2
A sometimes lies (and is telling the truth)
B always tells the truth
C always lies
Scenario 3
A always tells the truth
B always tells the truth
C always lies
For the record, I did in fact edit exactly one post, but I edited it within a minute of making it and it had nothing to do with the arguments of Michael and Igtur - I had already made my initial answer, which was entirely the same as theirs, back at the very start of page 1.
The only post I edited was this one: https://thephilosophyforum.com/discussion/comment/917024 I slightly misworded something, and I edited it very shortly after posting.
Person A claims person B always tells the truth.
Person B claims person B (himself) sometimes tells the truth.
Person C claims person B always lies.
Knowing that person A sometimes lies, person B always lies and person C never lies.
Perhaps in order to formulate in First Order logic, one should start with a set of statements, where each statement is either a lie or not a lie, and where the variable x stands for a statement.
?x (Lie (x) ? ¬ Lie (x))
Perhaps one should also try to avoid the problem of Russell's Barber Paradox, where the person is named after their occupation. If someone always barbers, they can be called a "Barber". If someone never barbers, they can be called "Not a Barber". But if someone at one moment barbers and at a later moment doesn't barber, they can neither be called a "Barber" nor "Not a Barber"
Similarly, it seems that a problem with First Order Logic would arise if someone who always lies is called a "Liar" and someone who never lies is called "Not a Liar". Within the logic of First Order Logic, a "Liar" is not "Not a Liar". There is no middle ground to account for person A , who is neither a "Liar" nor "Not a Liar".
Therefore, given a set of statements, some of which are lies and some aren't:
Person A is someone whose statements are sometimes lies and sometimes not lies, not that person A makes every possible statement within the set that is a lie and every possible statement that is not a lie.
Person B is someone whose statements are always lies, not that person B makes every possible stalemate within the set that is a lie
Person C is someone whose statements are never lies, not that person C makes every possible statement within the set that is not a lie
How First Order Logic achieves this is beyond my pay grade.
Quoting RussellA
This is the core of the riddle, indeed. I tried to pin As state, but it turned out to be more difficult than I expected. If I am not mistaken, we need some statements to ensure that the truth-teller and the liar are different people. "There is exactly one liar" turns into a similar trio of statements. if x is true, A cannot be the liar. if x is false, A cannot be the truth teller.
But the debate on A is that he is able to be three different positions: truth teller, liar, and ambiguous. Can I get away with one proposition for A? No, I cant. Since A sometimes tells the truth, it means he can also lie. Therefore, A can be in another position (liar/person who sometimes lies). Then I asked yesterday if A was ambiguous or just contradictory. The debate remains.
I would rather say: A?B, B?(B?¬B), C?¬B.
Each variable here must be understood as True, so A?B is not a formula where A and B can take either value but a proposition stating "If A is true, B is true". Saying "A" amounts to saying "A is true".
The "or" operator must not be traditionally understood, rather it should be understood as "It can be one or the other, both are possible". So A?¬A means A can be True or False. Otherwise B?¬B is a tautology, but here it means the variable can take either values.
Assumption: A tells the truth.
There is only one scenario where A?B is True and A is True: when both A and B are True. So in this case none of these two would be the liar. That leaves us with C as the liar. So C?¬B is False, this is only ever true when B and C are True. So we have a contradiction. The assumption is therefore wrong.
Assumption: A lies.
The only scenario where A?B is False is when A is True and B is False. This is a contradiction.
We are left with A sometimes tells the truth.
Now on to the other two. Since B talks about itself, let's go with C.
Assumption: C lies.
C?¬B is False only when B and C are True. Contradiction.
So C must tell the truth, as A sometimes tells the truth, and B is the liar.
Let's check for consistency:
B?(B?¬B)
B is False. So (B?¬B) is False, it is always the case that ¬B.
C is True. So C?¬B is True, that is the case when C is True and B is false. So far so good.
A is either True or False, so A?¬A. Therefore, A?B can be either True or False (in this case False). No inconsistency in the solution presented.
I have an odd feeling about my solution, but the result agrees with others.
@flannel jesus @Michael
Check it out
There are multiple solution strategies possible, none of which, however, naturally translate to first-order logic, because the problem is most naturally expressed by using three-tuples, which therefore require second-order logic.
---------------------------------------------------------
- three persons (A,B,C)
- three identities (truth,liar,random)
- three constraints:
a) A says that B=truth
b) B says that B=random
c) C says that B=liar
---------------------------------------------------------
There are 3!, i.e. 6 ways of assigning the three identities to the three persons.
(A,B,C) must be one of { 1:(truth,liar,random), 2:(liar,truth,random), 3:(random,truth,liar), 4:(random,liar,truth), 5:(truth,random,liar), 6:(liar,random,truth) }
The following is a very simple solution strategy.
Check each three-tuple one by one, and verify if it is compatible with the three constraints:
Example:
1:(truth,liar,random)
a) truth says that liar=truth => false, abort
It cannot be 1:
2:(liar,truth,random)
a) liar says that truth=truth. => false, abort
It cannot be 2:
... and so on ...
Eventually, there will only be one three-tuple that survives scrutiny. There are obviously other solution strategies, i.e. algorithms, possible but they are in my impression not particularly faster or easier.
What do you mean by no inconsistency? That A is coherent but ambiguous or what?
The problem with A is:
B -> A ? B = ¬A.
I dont know whether is coherent or not. But the negation of A is the truth-teller" means that A is either the liar or the ambiguous person" Therefore, you are claiming he is the ambiguous and not B. Agree?
A's statement can be either True or False. Since it can be either True or False, we can choose whichever value agrees with the other others. So the inconsistency has to be somewhere else if there is one. But there isn't any.
Quoting javi2541997
Not sure what that means.
The output:
It is not limited to first-order logic, because that would disallow the use of the arrays and objects in the solutionSpace and constraints variables. So, it makes use of second-order logic.
Suppose Person A says "the Tower Bridge is in London and the Taj Mahal is in Spain".
When he says "the Tower Bridge is in London", we describe them as a "Truth Teller", and when he says "the Taj Mahal is in Spain", we describe them as a "Liar".
Person A can only have two positions, either that of a "Truth Teller" or that of a "Liar", but only at different times, in that he cannot be a "Truth Teller" and "Liar" at the same time.
Similarly, that a train may be in Paris at one moment in time and in Lyon at another moment in time doesn't make the train either contradictory or ambiguous.
Honestly it just doesn't seem like he gets it. He says the debate remains, but to everyone else it's really clear.
A sometimes tells the truth, but he's lying in this case. No ambiguity about the answer, it's clearly solvable in just a minute.
I'm personally amazed that he's made such a simple riddle last 3 pages, when nobody else has any question about what the answer is.
I just saw this in your post above and classically that's not how logic goes. B v ~B is true even if we know the answer is ~B
I kinda see what you were going for but I don't think the symbolic logic application made it work properly, which is I guess what you're saying here
https://thephilosophyforum.com/discussion/comment/917298
Quoting Lionino
Quoting Lionino
Be honest, you're having as much fun with this thread as a child in the park with a big red balloon. :smile:
I still don't get why the answer everyone else is giving isn't satisfying to you.
Of course their answers (including yours) please me. But I'm keeping up with postings and questions because I want to learn how to apply logic. We are all welcome to ask questions. I promise that I am not trolling any of you.
What's left in the base scenario to figure out?
Basically, it was my first attempt to put logic into practice. I decided to start with a basic riddle. My intention is to level up in the future.
I gave another try, without using a third-value (ie classical first-order logic).
I used A?(B?¬C), B?((A?¬C)?(¬A?C)), C?(¬B), (A?¬B)?(¬A?B)?(A?¬C)?(¬A?C)?(B?¬C)?(¬B?C)
Where :
Unfortunately, all that does not entail C, which is the right answer. I wonder why.
A?(B?¬C), ¬A?((¬B?C)?(¬A?C)), B?((A?¬C)?(¬A?C)), ¬B?((A?¬B)?(C?¬B)), C?(¬B), ¬C?((A?¬C)?(¬A)?(¬C)) (not informative), (A?¬B)?(¬A?B)?(A?¬C)?(¬A?C)?(B?¬C)?(¬B?C) does not entail C
Tried it with if and only if instead
A?(B?¬C), ¬A?((¬B?C)?(¬A?C)), B?((A?¬C)?(¬A?C)), ¬B?((A?¬B)?(C?¬B)), C?(¬B), ¬C?((A?¬C)?(¬A)?(¬C)), (A?¬B)?(¬A?B)?(A?¬C)?(¬A?C)?(B?¬C)?(¬B?C) does not entail C
Replacing my post above with if and only if does not work either.
I tried Claudius 3.5, nothing useful came out.
ChatGPT 3.5 after some back and forth gave me:
T(A)?T(B), T(B)?Z(B), T(B)?¬T(B), T(C)?L(B), ?x(T(x)?¬L(x)?¬Z(x)), ?x(L(x)?¬T(x)?¬Z(x)), ?x(Z(x)?¬T(x)?¬L(x)), ?x(T(x)??y(T(y)?y=x)), ?x(L(x)??y(L(y)?y=x)), ?x(Z(x)??y(Z(y)?y=x)), but it does not entail T(C).