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…
Which answer in this list is the correct answer to this question? (2017)
71–80 of 137 posts
Re: Which answer in this list is the correct answer to this question? (2017)
#72"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)
#73Re: Which answer in this list is the correct answer to this question? (2017)
#74 (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 crashRe: Which answer in this list is the correct answer to this question? (2017)
#75Similar 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
Re: Which answer in this list is the correct answer to this question? (2017)
#76Here 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.
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)
#77An 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
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)
#78Here 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…
Re: Which answer in this list is the correct answer to this question? (2017)
#79Earlier 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.
Re: Which answer in this list is the correct answer to this question? (2017)
#80I 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."