Saturday, July 18, 2015

Interesting puzzle

I'm still working through Prolog, mainly using Sterling and Shapiro's book and also 'AI Algorithms, Data Structures, and Idioms in Prolog, Lisp and Java'.

And then I came across this puzzle:
A certain question has the following possible answers.
  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
Which answer is correct?

The answer is (e) - see the comments for why - and there is even a Prolog derivation with query x(A,B,C,D,E,F) which proves it.