• Lionino
    2.7k
    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.
    javi2541997

    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.
  • Tarskian
    599
    How First Order Logic achieves this is beyond my pay grade.RussellA

    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
    5.5k
    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.Lionino

    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
    2.7k
    That A is coherent but ambiguous or whatjavi2541997

    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.

    B -> A ∧ B = ¬Ajavi2541997

    Not sure what that means.
  • Tarskian
    599
    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
    1.7k
    Then I asked yesterday if A was ambiguous or just contradictory. The debate remains.javi2541997

    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
    1.8k


    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
    2.7k
    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
    1.8k
    So (B∨¬B) is False, it is always the case that ¬B.Lionino

    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
    2.7k
    Yes. It is what I said.
    Even in my attempt I had to change the definition of an operator.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.Lionino
  • flannel jesus
    1.8k
    yeah I edited my post as you were writing that, I realize that's what you mean
  • javi2541997
    5.5k
    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.flannel jesus

    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
    1.8k
    ok I am.

    I still don't get why the answer everyone else is giving isn't satisfying to you.
  • javi2541997
    5.5k
    I still don't get why the answer everyone else is giving isn't satisfying to you.flannel jesus

    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
    1.8k
    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
    5.5k
    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
    1.8k
    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
    5.5k
    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
    2.7k
    Is it possible to formulate it using first-order logic?javi2541997

    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
    2.7k
    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
    5.5k
    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. 
123Next
bold
italic
underline
strike
code
quote
ulist
image
url
mention
reveal
youtube
tweet
Add a Comment

Welcome to The Philosophy Forum!

Get involved in philosophical discussions about knowledge, truth, language, consciousness, science, politics, religion, logic and mathematics, art, history, and lots more. No ads, no clutter, and very little agreement — just fascinating conversations.