Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A puzzle that needs formal logical deduction to arrive at a solution.

A logic puzzle is one where a conclusion can be deduced solely using logic without needing to guess. It often takes the form of a series of statements that you must use to find the solution to the question posed using logical inference. For example, the puzzle might ask you to figure out the order of five people standing in line from statements like "Jamie is not to Sarah's left."

Sometimes, the truth of the statements themselves is unknown and must be deduced. Use in addition for these.

You are in a room with two wizards. One of these wizards always tells the truth, while the other always lies. How do you figure out which does what by asking both of them just one question?

The answer is to ask them any question that has one irrefutably true answer and one irrefutably false answer, such as "Am I speaking to you right now?" The wizard that tells the truth will say "Yes," proving that he speaks the truth, and the lying wizard will say "No," showing that he is the liar.

history | excerpt history