Live data from Hacker News

Which answer in this list is the correct answer to this question? (2017)

math.stackexchange.com

71–80 of 137 posts

Re: Which answer in this list is the correct answer to this question? (2017)

#71
post #27

I've always thought of these as "Wayside School" problems, because I first encountered them in the children's book, Sideways Arithmetic From Wayside School by Louis Sachar. I highly recommend it for any child who is into puzzles. I really enjoyed how the book deconstructed the format of tests and quizzes that I was so familiar with at the time. My favorite section was the sideways math, where words are added or multi…

Since we’re off subject, and Homer Jones made the NFL’s best something, I offer: FRAN + JONES = SCORE

Re: Which answer in this list is the correct answer to this question? (2017)

#72
I'm a bit confused. It seems that we're all looking for the answer that can hold "true". That's fine, however, does 5 answer _this question_? From my understanding, the question itself is impredicative[1].

"Which answer in this list is the correct answer to this question?"

Being self-referential makes it difficult to decide what correct in that context means. Does the question even allow for a no-answer/inconclusive result?

1. https://en.wikipedia.org/wiki/Impredicativity

edit: Alright, just noticed that user "DanielV" already covered its impredicativity (assuming that's what they mean by impredictive*)

Re: Which answer in this list is the correct answer to this question? (2017)

#74
With Z3 : https://rise4fun.com/z3

    (declare-const a Bool)
    (declare-const b Bool)
    (declare-const c Bool)
    (declare-const d Bool)
    (declare-const e Bool)
    (declare-const f Bool)
    (define-fun conjecture () Bool
    (and 
        (= a (and b c d e f))
        (= b (and (not b) (not c) (not d) (not e) (not f)))
        (= c (and a b))
        (= d (or a b c))
        (= e (and (not a) (not b) (not c) (not d)))
        (= f (and (not a) (not b) (not c) (not d) (not e)))
        (xor a b c d e f)
    )
    )
    (assert conjecture)
    (check-sat)
    (get-model)

result :

    sat
    (model 
    (define-fun f () Bool
        false)
    (define-fun b () Bool
        false)
    (define-fun a () Bool
        false)
    (define-fun c () Bool
        false)
    (define-fun d () Bool
        false)
    (define-fun e () Bool
        true)
    )
Old code was with another tool : http://logictools.org/

  (a-> (b & c & d & e & -f)) &
  (b -> (-b & -c & -d & -e & -f)) &
  (c -> (a & b)) &
  (d -> (a | b | c)) &
  (e -> (-a & -b & -c & -d)) &
  (f -> (-a & -b & -c & -d & -e)) &
  ( a + b + c + d + e + f)
then

  (a  (b & c & d & e & f)) &
  (b  (-b & -c & -d & -e & -f)) &
  (c  (a & b)) &
  (d  (a | b | c)) &
  (e  (-a & -b & -c & -d)) &
  (f  (-a & -b & -c & -d & -e)) &
  ( a + b + c + d + e + f)
where it would crash

Re: Which answer in this list is the correct answer to this question? (2017)

#75

Similar one I enjoyed in the Naive Bayes article from yesterday https://blog.floydhub.com/naive-bayes-for-machine-learning/ Multiple Choice: If you choose an answer to this question at random, what is the chance you will be correct? A) 25% B) 50% C) 60% D) 25%

The right answer is the question: "Is the teacher a Cretan?" :-P

What does it matter if the teacher is from Crete? Being a Cretan does not make one a cretan. You don’t need to be a stoic to realize that.

Re: Which answer in this list is the correct answer to this question? (2017)

#76
post #70
post #43

Here is a single python statement that solves the problem: print([ q for q in itertools.product((True, False), repeat=6) if q == ( all(q[1:]), # 1. All of the below. not any(q[2:]), # 2. None of the below. all(q[:2]), # 3. All of the above. any(q[:3]), # 4. One of the above. not any(q[:4]), # 5. None of the above. not any(q[:5]), # 6. None of the above. ) ]) https://gist.github.com/lovasoa/f2b4ed93e755bf4172583d28f20…

wouldn't any(q[:3]) (the 4th sentence) return true even if 2 or 3 of the above were correct? If I understand correctly, it should be true if exactly one of the above is correct, not at least one. Although, I'm probably wrong, since the question says "which answer is correct", implying only one can be correct.

> wouldn't any(q[:3]) (the 4th sentence) return true even if 2 or 3 of the above were correct?

Yes it would !

> If I understand correctly, it should be true if exactly one of the above is correct, not at least one.

In logic, "one proposition is correct" is true even if two propositions are correct.

Re: Which answer in this list is the correct answer to this question? (2017)

#77
post #8
post #2

An expert system answer (Prolog, CLIPS) would be cool to see here.

Using the clpb library [0]: solution([A1,A2,A3,A4,A5,A6]) :- sat(A1 =:= A2*A3*A4*A5*A6), sat(A2 =:= ~(A3+A4+A5+A6)), sat(A3 =:= A1*A2), sat(A4 =:= A1+A2+A3), sat(A5 =:= ~(A1+A2+A3+A4)), sat(A6 =:= ~(A1+A2+A3+A4+A5)). [0] https://www.metalevel.at/prolog/puzzles

Using no libraries!

    a1([f,f,_,_,_,_]).
    a1([f,t,f,_,_,_]).
    a1([f,t,t,f,_,_]).
    a1([f,t,t,t,f,_]).
    a1([f,t,t,t,t,f]).
    a1([t,t,t,t,t,t]).

    a2([_,f,t,_,_,_]).
    a2([_,f,f,t,_,_]).
    a2([_,f,f,f,t,_]).
    a2([_,f,f,f,f,t]).
    a2([_,t,f,f,f,f]).

    a3([f,_,f,_,_,_]).
    a3([t,f,f,_,_,_]).
    a3([t,t,t,_,_,_]).

    a4([t,_,_,t,_,_]).
    a4([f,t,_,t,_,_]).
    a4([f,f,t,t,_,_]).
    a4([f,f,f,f,_,_]).

    a5([t,_,_,_,f,_]).
    a5([f,t,_,_,f,_]).
    a5([f,f,t,_,f,_]).
    a5([f,f,f,t,f,_]).
    a5([f,f,f,f,t,_]).

    a6([t,_,_,_,_,f]).
    a6([f,t,_,_,_,f]).
    a6([f,f,t,_,_,f]).
    a6([f,f,f,t,_,f]).
    a6([f,f,f,f,t,f]).
    a6([f,f,f,f,f,t]).

    solution(X) :- a1(X), a2(X), a3(X), a4(X), a5(X), a6(X).

Re: Which answer in this list is the correct answer to this question? (2017)

#78
post #52
post #43

Here is a single python statement that solves the problem: print([ q for q in itertools.product((True, False), repeat=6) if q == ( all(q[1:]), # 1. All of the below. not any(q[2:]), # 2. None of the below. all(q[:2]), # 3. All of the above. any(q[:3]), # 4. One of the above. not any(q[:4]), # 5. None of the above. not any(q[:5]), # 6. None of the above. ) ]) https://gist.github.com/lovasoa/f2b4ed93e755bf4172583d28f20…

Slight variation: import itertools def below(n): return slice(n+1, None) def above(n): return slice(None, n) print([ q for q in itertools.product((True, False), repeat=6) if q == tuple( f(i) for i, f in enumerate([ lambda n: all(q[below(n)]), # 1. All of the below. lambda n: not any(q[below(n)]), # 2. None of the below. lambda n: all(q[above(n)]), # 3. All of the above. lambda n: any(q[above(n)]), # 4. One of the abo…

I see what you are doing here! Pushing it one step further, one could even do this: https://repl.it/repls/CourteousCreepyAdaware

Re: Which answer in this list is the correct answer to this question? (2017)

#79

Earlier quoted context omitted.

The right answer is the question: "Is the teacher a Cretan?" :-P

What does it matter if the teacher is from Crete? Being a Cretan does not make one a cretan. You don’t need to be a stoic to realize that.

This is likely a reference to the Epimenides paradox.

https://en.wikipedia.org/wiki/Epimenides_paradox

Re: Which answer in this list is the correct answer to this question? (2017)

#80

I didn't see a logical explanation that explains why an option is correct or not, so here's one: Q Which answer in this list is the correct answer to this question? 1. All of the below. 2. None of the below. 3. All of the above. 4. One of the above. 5. None of the above. 6. None of the above. I'll assume "is the answer" to be "True" and "is not the answer" to be "False" in my explanations to make it more readable. Le…

> If 5 is False, it means all of the above 5 - 1, 2 , 3, 4 are True That is incorrect. "Not All False" does not imply "All True."

He should have said "one of the above is true" which we have already proven to be false.
Post reply on HN