There is a prison with 100 prisoners, each in separate cells with no form of contact. There is an area in the prison with a single light bulb in it. Each day, the warden picks one of the prisoners at random, even if they have been picked before, and takes them out to the lobby. The prisoner will have the choice to flip the switch if they want. The light bulb starts off.

When a prisoner is taken into the area with the light bulb, he can also say “Every prisoner has been brought to the light bulb.” If this is true all prisoners will go free. However, if a prisoner chooses to say this and it’s wrong, all the prisoners will be executed. So a prisoner should only say this if he knows it is true for sure.

Before the first day of this process begins, all the prisoners are allowed to get together to discuss a strategy to eventually save themselves.

What strategy could they use to ensure they will go free?

Four prisoners named P1, P2, P3 and P4 are arrested for a crime, but the jail is full and the jailer has nowhere to put them. He eventually comes up with the solution of giving them a puzzle and if they answer correctly they can go free but if they fail they are to be executed.

The jailer makes prisoners P1, P2 and P3 stand in a single file. Prisoner P4 is put behind a screen. The arrangement looks like this:

P1 P2 P3 || P4

The ‘||’ is the screen.

The jailer tells them that there are two black hats and two white hats; that each prisoner is wearing one of the hats; and that each of the prisoners is only able to see the hats in front of them but not on themselves or behind. Prisoner P1 can see P2 and P3. Prisoner P2 can see P3 only. The fourth man, P4, behind the screen can’t see or be seen by any other prisoner. No communication between the prisoners is allowed.

If any prisoner can figure out and tell the jailer the color of the hat he has on his head all four prisoners go free. If any prisoner gives an incorrect answer, all four prisoners are executed. How the prisoners can escape, regardless of how the jailer distributes the hats?

You can assume that the prisoners can all hear each other if one of them tries to answer the question. Also, every prisoner thinks logically and knows that the other prisoners think logically as well.

This puzzle has been said to have been invented by Albert Einstein as a boy and some claim that only 2% of the population can solve it.

There are 5 houses in 5 different colors. All the 5 owners are of different nationality. The 5 owners drink different beverages, smoke different brand of cigars, and own different pets. No owners have the same pet, smoke the same brand of cigar, or drink the same beverage.

1. There are five houses.
2. The Brit 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.

Who owns the zebra?