Alternative on the Island of Knights and Knaves

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

An alternative is a person who alternatively tells the truth and a lie. That is, if his statement is true, his next statement is false. Once an alternative visited an island in which each inhabitant is either a "knight" or a "knave".

[more]

In this problem there are inhabitants, denoted by A, B, C, … . The alternative makes statements, and the problem is to infer who is a knight and who is a knave.

[less]

Contributed by: Izidor Hafner (December 2012)
Open content licensed under CC BY-NC-SA


Snapshots


Details

The algorithm makes random statements about inhabitants and checks that the solution is unique. If after 50 attempts it fails, a message is returned.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send