[Haskell-cafe] Problem with question 3 about knights and knaves
onw ikipedia
Steve Schafer
steve at fenestra.com
Thu Aug 9 17:23:56 EDT 2007
On Thu, 9 Aug 2007 23:06:04 +0200, you wrote:
>Is still don't get it completely... Could you give me an extra hint? I'm
>getting crazy here, especially because I was really good at this stuff 20
>years ago! :)
>
>Here's the reasoning
>
>The first answer could not be "no" because from that I can infer that John
>is a knight and Bill is a knave, which would mean the logician knows the
>answer.
>
>This leaves me with 3 possibilities:
>
>a) Both John and Bill are knights
>b) John is a knave and Bill could be anything
Correct. But you forgot to recursively apply the hint. ;)
The problem states that after John answers the second question, the
Logician knows the solution. How can this be? What answer did John give
that allows the Logician to solve the problem?
Steve Schafer
Fenestra Technologies Corp.
http://www.fenestra.com/
More information about the Haskell-Cafe
mailing list