Zebra Puzzle

A zebra puzzle, also known as an Einsteinian logic puzzle, is a type of logic puzzle where solvers are tasked with finding out information about a set of people or objects based on a series of statements about them. Many prominent version of these puzzle have existed over the years, with the most famous version involving determining the nationality, house color, house placement, pet, preferred drink, and preferred cigarette brand of five individuals living next to one another.

Traditionally, zebra puzzles are solved with a series of connected grids, so that solvers can rule in or out combinations of two different qualities, like whether the Englishman drinks tea or the Italian lives in the orange house.

Background
The first and most famous zebra puzzle published was done so in 1962 in Life magazine. with very little extraneous information beyond 15 statements, two clarification about the rules (that 'to the right' means to the readers right when looking at the houses and that no two people share a quality), and two questions.


 * 1) There are five houses.
 * 2) The Englishman lives in the red house.
 * 3) The Spaniard owns the dog.
 * 4) Coffee is drunk in the green house.
 * 5) The Ukrainian drinks tea.
 * 6) The green house is immediately to the right of the ivory house.
 * 7) The Old Gold smoker owns snails.
 * 8) Kools are smoked in the yellow house.
 * 9) Milk is drunk in the middle house.
 * 10) The Norwegian lives in the first house.
 * 11) The man who smokes Chesterfields lives in the house next to the man with the fox.
 * 12) Kools are smoked in the house next to the house where the horse is kept.
 * 13) The Lucky Strike smoker drinks orange juice.
 * 14) The Japanese smokes Parliaments.
 * 15) The Norwegian lives next to the blue house.

The questions asked after these statements were:


 * Who drinks water?
 * Who owns the zebra?

These questions were also notable, as the puzzle makes no mention of water or zebras, meaning that solvers had to solve all other placements before they could definitively say where either was.

Since publication, two people have been attributed as the puzzle's creator; Albert Einstein (in his youth), and Lewis Carroll (under his pen name Charles Dodgson). Einstein in particular is most commonly named as the creator, hence the above puzzle being referred to as "Einstein's Riddle" quite often, and the genre as a whole being called 'Einsteinian Logic'. However, the version published in Life notably contains reference to "Kool" brand cigarettes, which did not exist until 1933, putting Einstein in his mid-50s if he actually wrote it, and ruling our Carroll as the author entirely, as he died in 1898.

Zebra puzzles have become a staple of puzzle collection books, as well as a mainstay of Foggy Brume's P&A Magazine, with at least one being found in nearly every issue.

Puzzle Application
Zebra puzzles at the most basic level involve two things: a set of people, things, or qualities that can be grouped together to form the final solution, and a set of clues used to guide solvers to that solution.

Every person, thing, or quality will usually be mentioned somewhere in the puzzle. Most of the time, most (if not all) of the information will be present in the clues themselves. Information not contained in these clues will typically be found either in the puzzle's flavortext (particularly if the goal is to extract an answer), or in a question before or after the puzzle (if the goal is only to answer questions). The purpose of this is to prevent redundancy in the puzzle. If a puzzle is presented with sets of five qualities/people, but one group only has 3 things mentioned between the clues and the flavortext, it's a clear signal to the solver that the information will not help them make any other deductions, nor will it be useful for the final extraction.

Often, the clues will be presented as true statements, things like 'The person who X lives next to the person who Y", "The person who X is NOT the person who Y", or "The person who X also is Y". These comparisons allows solvers to make notes about individual pairs, which can then be compared to make more and more deductions until everything has been figured out. Ideally, the clues should also be chose so that a solver needs all of them to complete the puzzle. If you have more clues than needed, the puzzle may (once again) feel redundant at times.

Additional twists can be added that complicate the solve path, but they're completely optional when constructing a zebra puzzle. Common twists include:


 * Making a set of possibly qualities larger than the number of things they can be applied to (i.e. selecting ages for 5 people, but only knowing that they range from 20 to 30 years old)
 * Numerical ranges are popular, as they open the door for more math-focused logic and clues about the numbers' qualities (even vs. odd, prime numbers, etc.)
 * Replacing a set of qualities with a binary check (i.e. each person owns either a dog or a cat, but not both).
 * Ideally, this will be supplemented with a way to know how many of each option are present, but that can be removed to add an additional level of difficulty

Less common twists exist, but their purpose is often relegated to puzzle hunts, where a twist can have a large impact on the theming and extraction of a puzzle. These kinds of more extreme twists include:


 * When placement of objects is part of the puzzle, requiring placement along/upon something other than a line (like in a circle so that there's no clear "end", or a 3D object, so that people can have more than 2 neighbors).
 * Crossing a zebra puzzle with a knights and knaves puzzle in order to introduce false statements into the mix.

In addition to twists, zebra puzzles in puzzle hunts tend to have extractions, in order to get from a basic solve state to a single word or phrase. The most common method for extracting from a zebra puzzle is to use any numbers present in the puzzle as an index into one or more of the other qualities. However, since many puzzles include structure-altering twists, many of those same puzzles will introduce elements that are key for extracting from the puzzle, or go as far as explaining how to extract from it if the changes are sufficiently complicated.

Strategy
When solving a zebra puzzle, the first things that should be done is to construct a grid. A proper grid should allow for taking notes on any and every combination of two pieces of information. Because of this, there needs to be enough squares to accommodate these comparisons. The fewest number of groups to compare in a puzzle is 2, which would require one square (i.e. if you were only comparing nationality to house color in the image to the right). Three groups requires an additional two squares (i.e. one to compare nationality to drink, and one to compare house color to drink), bringing the total to three. Whenever an additional category is added to the total, another diagonal of squares will need to be added. Continuing the example, four categories would add 3 more squares (for a total of 6), five would add 4 more (for a total of 10), and so on.

Once a grid has been made, read the clues. Most will likely allow you to exclude certain connections, but a rare few will allow to make a match. Whenever a certain match is made, you should mark the square where the two qualities intersect as "correct", and mark any other entries in that row/column in that square as incorrect. This is because, in most zebra puzzles, each quality will be used exactly once (so if the Englishman has a red house, he can't have any other color of house, and nobody else can have the red house). These matches and subsequent exclusions of any other possibilities is a very important step in the solving process, and can often lead to pieces falling into place.

Another useful thing to check for is clues that list multiple people, but refer to them in different ways. For example: The five people are the Englishman, the man in the blue house, the man living to the right of the Spaniard, the man who drinks coffee, and the Ukrainian. This kind of statement not only explains some of the options (which may not have been otherwise listed in the flavortext), but it separates these qualities into five groups. Since each of these descriptions is of a different person, a solver would then know that the Englishman and the Ukrainian can't living in the blue house, can't be drinking coffee, and can't live to the right of the Spaniard. Similarly, the man in the blue house isn't to the right of the Spaniard and doesn't drink coffee, and so on.

Certain types of statements should be treated with caution, as they can be misinterpreted easily. "X or Y" statements purport that a particular person has one of two qualities but not both of them. This can be useful early in the right circumstances, but they most commonly come into play near the end, when one of the two possibilities is either confirmed or excluded, leading to a certain decision on the other one. "If X then Y" statements are similar, in that if X is proven to be true, then a decision can be made immediately on Y. However, wording can vary. Sometimes, a statement will specify that Y will only if X is also true, and sometimes it will leave the possibility open. The later is more dangerous as a solver, as it allows for Y to be true without X being true (so don't assume that X is true if Y gets proven before it).

When looking to extract from a puzzle, keep an eye out for subjects (people or objects that qualities are applied to) that have consecutive starting letters, particular A to whatever. This can provide a clear reordering for extraction, and should be looked out for immediately upon starting a puzzle. Numbers small enough to be indexes should be watched out for too, as well as words or names with uniform lengths. The latter can imply a diagonalization or eigenletters-based extraction, but both will usually be a clear indicator of an indexing-based extraction.

Played Straight

 * - A traditional (if large) zebra puzzle with 5 houses, each with 10 different qualities/items. Interestingly enough, this hunt puzzle actually contains a series of questions to answer at the end.
 * - One of the subpuzzles of the larger puzzle, The Hound of the Vast-Cur Villes. Despite the inclusion of a number range as one of the qualities, is otherwise very straightforward.

Notable Twists

 * - Presented as a traditional zebra puzzle, complete with a pre-made grid. However, the goal is not to solve the logic puzzle (which turns out to be impossible anyway), but simply mark Xs on the grid wherever negative information is given. The resulting shapes in each square spell out the final answer.
 * - A rare Siamese Twins-style logic puzzle, where each statement is actually two statements that need to be split into clues for two different, simultaneous logic puzzles. In addition, this puzzle uses a binary quality (whether a character's head was or wasn't chopped off).