11526

Solving Logic Puzzles with Binary Trees

This Demonstration uses a binary tree representation of Boolean functions with two to four arguments to solve simple propositional logic puzzles.

DETAILS

This Demonstration uses the setting of the "knights and knaves" logic puzzles. These puzzles pertain to an island in which some natives called "knights" always tell the truth and others called "knaves" always lie. Assume that every inhabitant of the island is either a knight or a knave.
If an inhabitant makes a statement , then we may conclude that is a knight if and only if is true. Such a fact is symbolically represented by .
Suppose there are three inhabitants , , , and the first two make the following claims:
: is a knight and is a knave.
: I am a knave and is a knave.
Symbolically we may express the example as: .
If ( is a knight), then is a knave, because knights tell the truth and said he was a knave. This is a contradiction, so is a knave. Therefore, choose a tree with and as the first nodes from the root. We seek a solution only on the right side of the tree. But from 's statement, must be a knight, and from 's statement it follows that is a knave.
References
[1] R. Audi, ed., The Cambridge Dictionary of Philosophy, Cambridge: Cambridge University Press, 1995 pp. 780–782.
[2] L. Borkowski, Elementy logiki formalnej (Elements of Formal Logic, in Polish), 3rd ed., Warsaw: Wyd, 1976.
[3] L. Carroll, Symbolic Logic and the Game of Logic, New York: Dover, 1958.
[4] I. M. Copi and C. Cohen, Introduction to Logic, 9th ed., New York: Macmillan, 1994 pp. 214–218.
[5] M. Gardner, Logic Machines, Diagrams and Boolean Algebra, New York: Dover Publications, 1968.

PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.