Ambiguous Teller Riddle

javi2541997 July 13, 2024 at 12:42 7125 views 84 comments
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:

  • 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)

flannel jesus July 13, 2024 at 12:47 #916961
Quoting javi2541997
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.


Secondly, I want to solve this riddle. Who is the liar?


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".
flannel jesus July 13, 2024 at 12:52 #916962
But if "b always tells the truth" and "b sometimes tells the truth" are interpreted to be mutually exclusive statements, the riddle has an immediate solution.

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)
javi2541997 July 13, 2024 at 12:57 #916963
Quoting flannel jesus
when he says he sometimes tells the truth, is he saying he's definitely not the guy who always tells the truth?


B says the truth or not but not both. B says the truth often. B also lies often. B doesn’t 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 haven’t 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
B is the liar


Exactly.
flannel jesus July 13, 2024 at 12:58 #916964
Reply to javi2541997 I'm not sure you answered my question. Can you give me a yes or no?
javi2541997 July 13, 2024 at 13:00 #916965
Reply to flannel jesus Okay. I will be more clear.

Quoting flannel jesus
is he saying he's definitely not the guy who always tells the truth?


Yes.
flannel jesus July 13, 2024 at 13:02 #916966
Reply to javi2541997 okay, then if they're mutually exclusive, we can use the following logic:

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.
javi2541997 July 13, 2024 at 13:09 #916968
Quoting flannel jesus
That only leaves C as the guy who always tells the truth


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 rest naturally follows


The liar is B, but also A. Is it contradictory or ambiguous?

flannel jesus July 13, 2024 at 13:11 #916969
Reply to javi2541997 if we know c is the truth teller, and c says b is the liar, then b is the liar. Easy as that.

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.
javi2541997 July 13, 2024 at 13:25 #916971
Quoting flannel jesus
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?
flannel jesus July 13, 2024 at 13:32 #916972
Quoting javi2541997
Then B is always false and ambiguous


No, just false

Quoting javi2541997
But what happens to A?


He sometimes lies, and sometimes tells the truth.
javi2541997 July 13, 2024 at 13:56 #916975
Reply to flannel jesus Are you suggesting that A is actually ambiguous and not B?
flannel jesus July 13, 2024 at 13:59 #916976
Reply to javi2541997 I've been saying that consistently since my second post in this thread, yeah
flannel jesus July 13, 2024 at 14:09 #916978
Reply to javi2541997 do you think it could be some other way?
javi2541997 July 13, 2024 at 14:17 #916980
Reply to flannel jesus I back up your argument, and I also see A as ambiguous. A claims person B always tells the truth. B claims that person B (himself) sometimes tells the truth. Then, A tells the truth (ambiguous). But consider for a second this:

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.
Michael July 13, 2024 at 14:20 #916982
Quoting javi2541997
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.


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.
flannel jesus July 13, 2024 at 14:29 #916986
Reply to javi2541997 you've just laid out two scenarios we already know aren't the case. I'm not really sure what the point of assuming they are the truth tellers, when we already know they can't be the truth teller.

Assuming either one of them is the truth teller leads to contradiction, so we don't.
Tarskian July 13, 2024 at 14:57 #916989
(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.


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)

javi2541997 July 13, 2024 at 14:58 #916991
Reply to Michael Yes. I agree and I see the point. But what happens to A then? B is the only one who says he tells the truth sometimes. Nonetheless, it seems the riddle turned out with A being the ambiguous person, and this is very tricky to me. B cannot be the truth-teller. Therefore, A did not speak the truth  and therefore, A is not the truth-teller either. We all agree that C is the truth-teller. Then, is A the contradictory, ambiguous, or unreliable person here?

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? 
javi2541997 July 13, 2024 at 15:01 #916992
Quoting flannel jesus
Assuming either one of them is the truth teller leads to contradiction, so we don't.


That’s 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.
Michael July 13, 2024 at 15:01 #916993
Quoting javi2541997
But what happens to A then


A is the person who sometimes tells the truth.

Quoting javi2541997
B cannot be the truth-teller.


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
Nonetheless, it seems the riddle turned out with A being the ambiguous person


No, B is the ambiguous person given the ambiguity of the phrase "I sometimes tell the truth".
flannel jesus July 13, 2024 at 15:02 #916994
Reply to javi2541997 according what context? No b couldn't
flannel jesus July 13, 2024 at 15:06 #916996
Quoting Michael
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".
Michael July 13, 2024 at 15:08 #916997
Quoting flannel jesus
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.
javi2541997 July 13, 2024 at 15:09 #916998
Reply to Michael I thought B was ambiguous at first glance, but consider this, Michael:

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?
unenlightened July 13, 2024 at 15:11 #917000
Interested puzzlers are recommended to search out the books of Raymond Smullyan.
Michael July 13, 2024 at 15:12 #917001
Reply to javi2541997

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.
javi2541997 July 13, 2024 at 15:12 #917002
Reply to flannel jesus The context where A is always true and not sometimes.
flannel jesus July 13, 2024 at 15:13 #917003
Reply to javi2541997 But that's not the context. A doesn't always tell the truth. So... why are you saying that's the context? We know he can't be the one who always tells the truth, because that would lead to a contradiction.
javi2541997 July 13, 2024 at 15:14 #917005
Reply to Michael Excellent! :up: Thanks to your contribution to this thread. Also, to @flannel jesus for keeping the discussion alive. I am enjoying this.
javi2541997 July 13, 2024 at 15:20 #917008
Reply to flannel jesus I am trying to make an approach. I claim that A is just contradictory in his statement, but you are defending that A is precisely the ambiguous here because he ‘sometimes tells the truth’ and B is always the liar. I defend the opposite: B is ambiguous and A is contradictory for always telling the truth. It is B who often says the truth and others not, but not both. Then, when B tells the truth, A tells the truth as well. B is the ambiguous.
flannel jesus July 13, 2024 at 15:21 #917009
Reply to javi2541997 I don't know why you're defending that. If C always tells the truth, and C says B always lies, then B always lies.

That seems pretty simple and straight forward to me. Which part of that logic do you disagree with?
javi2541997 July 13, 2024 at 15:34 #917012
Reply to flannel jesus We already know C is the truth-teller. But I was wondering what happened to A. Some claim he is ambiguous, others he is contradictory. If he is ambiguous, A sometimes tells the truth and sometimes lies. If he is contradictory, A always tells the truth because B is always true.

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.
flannel jesus July 13, 2024 at 15:38 #917014
Quoting javi2541997
Some claim he is ambiguous, others he is contradictory.


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?
flannel jesus July 13, 2024 at 15:39 #917015
Quoting javi2541997
Am I missing something in that attempt to use logic?


Yes, you're overcomplicating something very simple. C tells the truth. C says B is the liar. Therefore, B is the liar.

Quoting javi2541997
But I was wondering what happened to A.



You keep asking this, and everyone else keeps giving the same answer. A sometimes tells the truth.
javi2541997 July 13, 2024 at 15:57 #917021
Quoting flannel jesus
Yes, you're overcomplicating something very simple. C tells the truth. C says B is the liar. Therefore, B is the liar.


Yes, I understood it at the first glance, but:

Quoting flannel jesus
A sometimes tells the truth.


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?

RussellA July 13, 2024 at 15:58 #917022
Quoting javi2541997
Who is the liar?


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.
flannel jesus July 13, 2024 at 16:03 #917024
Reply to javi2541997

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.
Igitur July 13, 2024 at 16:12 #917032
Reply to javi2541997 If the statement that B sometimes tells the truth could also mean that they always tell the truth (sometimes be a subset of always) then there are multiple solutions.
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 isn’t 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
javi2541997 July 13, 2024 at 16:26 #917037
Quoting RussellA
The three statements work on the understanding that A happened to be lying rather than telling the truth.


Quoting Igitur
A=can both lie and tell the truth


Thank you so much for your posts. You explained very well what I tried to explain, but I couldn’t find the correct premises due to my lack of wording and logic skills.

Do you see it now, @flannel jesus? Because you claim A can’t 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.
Michael July 13, 2024 at 16:30 #917040
Reply to javi2541997

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.
Igitur July 13, 2024 at 16:33 #917041
Quoting Michael
Person A cannot be the person who always lies.

I think this is what Reply to javi2541997 was trying to say. That A is lying, but doesn’t always lie (because B always lies). A only sometimes lies, and has the capacity to tell the truth.
javi2541997 July 13, 2024 at 16:36 #917043
Reply to Michael I have never said that A always lies. It is obvious and that would make the riddle senseless. As far as I can understand the relationship between the three, my statement goes as follows:

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.
flannel jesus July 13, 2024 at 16:37 #917044
Quoting javi2541997
Because you claim A can’t be a liar emphatically.


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
javi2541997 July 13, 2024 at 16:38 #917045
Quoting flannel jesus
He can lie, I've said that explicitly


Dude…

Quoting flannel jesus
everyone here except you has understood that b must be the liar. Who else do you see claiming a might be the liar?


flannel jesus July 13, 2024 at 16:56 #917051
Reply to javi2541997 ok you must be trolling at this point

The answer is apparently obvious to everyone but you.
javi2541997 July 13, 2024 at 17:03 #917052
Quoting Michael
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.


:clap:

I couldn’t 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.

Reply to flannel jesus You edited your posts after reading the arguments of Michael and Igitur :lol:
Michael July 13, 2024 at 17:03 #917053
Quoting javi2541997
If A sometimes tells the truth it means he can also lie as well as B.


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.
flannel jesus July 13, 2024 at 17:08 #917056
Reply to javi2541997 I didn't edit my posts. What edit do you think I made?
javi2541997 July 13, 2024 at 17:13 #917057
Quoting Michael
Prima facie these might mean two different things:

1. I only sometimes tell the truth
2. I sometimes tell the truth


I agree. That’s about what happens to A.

Quoting Michael
Strictly speaking (2) might be true even if I always tell the truth.


Yes. And reaching (more or less) that conclusion, we can (perhaps) say that A is the ambiguous here. Right?
Michael July 13, 2024 at 17:17 #917058
Quoting javi2541997
Yes. And reaching (more or less) that conclusion, we can 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.
flannel jesus July 13, 2024 at 17:24 #917059
Reply to Michael Or one of a and B sometimes, and the other one always tells the truth
Michael July 13, 2024 at 17:28 #917060
Quoting flannel jesus
Or one of a and B sometimes, and the other one always tells the truth


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.
javi2541997 July 13, 2024 at 17:31 #917061
Reply to Michael Gotcha. :up:
flannel jesus July 13, 2024 at 17:31 #917062
Reply to Michael yes I'm actually talking about the same interpretation, and what I'm saying is a possibility within that interpretation
flannel jesus July 13, 2024 at 17:39 #917065
Reply to Michael just to be fully clear:

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.
Michael July 13, 2024 at 17:44 #917067
Reply to flannel jesus

I think it’s 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
flannel jesus July 13, 2024 at 17:47 #917068
Reply to Michael yeah, scenario 1 is the more obvious one, scenario 3 was what you came up with with the alternative interpretation of sometimes, and scenario 2 is what I was offering as another alternative.

flannel jesus July 13, 2024 at 19:10 #917072
Quoting javi2541997
You edited your posts after reading the arguments of Michael and Igitur :lol:


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.
RussellA July 14, 2024 at 10:44 #917219
Quoting javi2541997
Is it possible to formulate it using first-order logic?


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.
javi2541997 July 14, 2024 at 12:17 #917244
Reply to RussellA A very well written and informative reply. Every kind of help is appreciated here. Thank you, lad.

Quoting RussellA
There is no middle ground to account for person A , who is neither a "Liar" nor "Not a Liar".


This is the core of the riddle, indeed. I tried to pin A’s 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 can’t. 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.
Lionino July 14, 2024 at 12:42 #917249
Quoting javi2541997
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.


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.
Lionino July 14, 2024 at 12:45 #917251
Tarskian July 14, 2024 at 12:49 #917253
Quoting RussellA
How First Order Logic achieves this is beyond my pay grade.


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.
javi2541997 July 14, 2024 at 13:36 #917271
Quoting Lionino
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.


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 don’t 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?
Lionino July 14, 2024 at 13:47 #917275
Quoting javi2541997
That A is coherent but ambiguous or what


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
B -> A ? B = ¬A


Not sure what that means.
Tarskian July 14, 2024 at 13:56 #917280
For the afficionados, a simple solution strategy implemented in javascript:


#!/usr/bin/env qjs

//it is possible to generate the solution space automatically
//but it is so small that it is easier to just supply it manually
var solutionSpace= [
{"A":"truth", "B":"liar","C":"random"},
{"A":"liar","B":"truth","C":"random"},
{"A":"random","B":"truth","C":"liar"},
{"A":"random","B":"liar","C":"truth"},
{"A":"truth","B":"random","C":"liar"},
{"A":"liar","B":"random","C":"truth" }
];

//constraint.index is just for the purpose of reference
var constraints = [
{"index":"a","who_says":"A","B_is":"truth"},
{"index":"b","who_says":"B", "B_is":"random"},
{"index":"c","who_says":"C", "B_is":"liar"}
];

//we iterate over every potential solution in the solution space
for(var solution of solutionSpace) {
var B=solution["B"];
console.log("--------------------------");
//A and C are just for printing the potential solution
//they are not needed for the algorithm
var A=solution["A"];
var C=solution["C"];
console.log("checking: "+A+" "+B+" "+C);
//we assume that the solution is valid, until it isn't anymore.
var abort_solution=false;
//now we check every constraint for the current potential solution
for(var constraint of constraints) {
var index=constraint["index"];
var who_says=constraint["who_says"];
var B_is=constraint["B_is"];
//check 1: truth is not allowed to lie about B
if(solution[who_says]=="truth" && B!==B_is) {
console.log("violation of constraint ("+index+
"); truth is not allowed to lie and say that "+B+" is "+B_is);
abort_solution=true;
break;
}
//check 2: liar is not allowed to tell the truth about
if(solution[who_says]=="liar" && B==B_is) {
console.log("violation of constraint ("+index+
"); liar is not allowed to tell the truth and say that "+B+" is "+B_is);
abort_solution=true;
break;
}
//we cannot check random; so, no check for that one
}
if(!abort_solution) console.log("found legitimate solution");
}
console.log("--------------------------");


The output:

$ ./truth-liar-random.js
--------------------------
checking: truth liar random
violation of constraint (a); truth is not allowed to lie and say that liar is truth
--------------------------
checking: liar truth random
violation of constraint (a); liar is not allowed to tell the truth and say that truth is truth
--------------------------
checking: random truth liar
violation of constraint (b); truth is not allowed to lie and say that truth is random
--------------------------
checking: random liar truth
found legitimate solution
--------------------------
checking: truth random liar
violation of constraint (a); truth is not allowed to lie and say that random is truth
--------------------------
checking: liar random truth
violation of constraint (c); truth is not allowed to lie and say that random is liar
--------------------------


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.
RussellA July 14, 2024 at 13:58 #917283
Quoting javi2541997
Then I asked yesterday if A was ambiguous or just contradictory. The debate remains.


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.
flannel jesus July 14, 2024 at 14:02 #917285
Reply to Lionino

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.
Lionino July 14, 2024 at 14:19 #917298
Using first-order logic is really improductive for this purpose. Even in my attempt I had to change the definition of an operator. Since one of the results is "Sometimes T or F", we are dealing with a three-valued logic. That would be the meaning that my or-operator takes.
flannel jesus July 14, 2024 at 14:33 #917302
Reply to Tarskian cool program dude
flannel jesus July 14, 2024 at 14:35 #917303
Quoting Lionino
So (B?¬B) is False, it is always the case that ¬B.


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
Lionino July 14, 2024 at 14:36 #917305
Reply to flannel jesus Yes. It is what I said.
Quoting Lionino
Even in my attempt I had to change the definition of an operator.

Quoting Lionino
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.


flannel jesus July 14, 2024 at 14:36 #917306
Reply to Lionino yeah I edited my post as you were writing that, I realize that's what you mean
javi2541997 July 14, 2024 at 14:48 #917311
Reply to RussellA Got it. :up:
javi2541997 July 14, 2024 at 14:53 #917312
Quoting flannel jesus
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.


Be honest, you're having as much fun with this thread as a child in the park with a big red balloon. :smile:
flannel jesus July 14, 2024 at 15:10 #917317
Reply to javi2541997 ok I am.

I still don't get why the answer everyone else is giving isn't satisfying to you.
javi2541997 July 14, 2024 at 15:41 #917326
Quoting flannel jesus
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.
flannel jesus July 14, 2024 at 16:07 #917331
Reply to javi2541997 But is the logic not already clear? You first prove that C can be the only one who always tells the truth, and since C is always telling the truth, B must always lie and A must sometimes tell the truth, sometimes lie.

What's left in the base scenario to figure out?
javi2541997 July 14, 2024 at 16:53 #917342
Reply to flannel jesus I understand it now, but not when I first posted this OP. Perhaps it is simple and clear for you, but not for me. One of the demands in my post was for someone to correct me if necessary because I wanted to learn and grasp everything through examples and "formulations."You thought I was trolling. I promise you I wasn't. I always posted with proper behavior.
flannel jesus July 14, 2024 at 16:56 #917343
Reply to javi2541997 But I'm asking you now, what's left unclear? I understand you didn't start out with clarity, but we're not where we started, so what's left unclear?
javi2541997 July 14, 2024 at 17:14 #917347
Reply to flannel jesus There is nothing unclear. After the recent posts and examples (@RussellA’s one was very good), I now see the point of the riddle. It was funny to talk and debate about it. 

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.
Lionino July 30, 2024 at 01:50 #921521
Quoting javi2541997
Is it possible to formulate it using first-order logic?


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 :
  • A?(B?¬C) is if A, B tells the truth and C lies
  • (B?((A?¬C)?(¬A?C))) is if B, {A tells the truth and C lies} or {A lies and C tells the truth}
  • C?(¬B) is if C, B lies
  • (A?¬B)?(¬A?B)?(A?¬C)?(¬A?C)?(B?¬C)?(¬B?C) are the conditions that one of the three has to lie and another tell the truth


Unfortunately, all that does not entail C, which is the right answer. I wonder why.
Lionino July 30, 2024 at 02:28 #921530
Trying encoding the cases where the statements are false:
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).
javi2541997 July 30, 2024 at 04:49 #921548
Reply to Lionino I can only say that I appreciate your help in this thread, Lionino. I like the first post more than the second because it is clearer. You know, when AI shows up, everything becomes unnecessarily complex. By the way, I am not entitled to argue or agree with those formulations because I am not good enough at logic. I hope better users read that and can provide some fruitful answers or feedback.