100 men are in a room, each wearing either a white or black hat. Nobody knows the color of his own hat, although everyone can see everyone else's hat. The men are not allowed to communicate with each other at all (and thus nobody will ever be able to figure out the color of his own hat).
The men need to line up against the wall such that all the men with black hats are next to each other, and all the men with white hats are next to each other. How can they do this without communicating? You can assume they came up with a shared strategy before coming into the room.

The men go to stand agains the wall one at a time. If a man goes to stand against the wall and all of the men already against the wall have the same color hat, then he just goes and stands at either end of the line. However, if a man goes to stand against the wall and there are men with both black and white hats already against the wall, he goes and stands between the two men with different colored hats. This will maintain the state that the line contains men with one colored hats on one side, and men with the other colored hats on the other side, and when the last man goes and stands against the wall, we'll still have the desired outcome.

After recent events, Question Mark is annoyed with his brother, Skid Mark. Skid thought it would be funny to hide Question's wallet. He told Question that he would get it back if he finds it. So, first off, Skid laid five colored keys in a row. One of them is a key to a room where Skid is hiding Question's wallet. Using the clues, can you determine the order of the keys and which is the right key?
Red: This key is somewhere to the left of the key to the door.
Blue: This key is not at one of the ends.
Green: This key is three spaces away from the key to the door (2 between).
Yellow: This key is next to the key to the door.
Orange: This key is in the middle.

The order (from left to right) is Green, Red, Orange, Blue, Yellow. The blue key is the key to the door.

A poor miller living with his daughter comes onto hard times and is not able to pay his rent. His evil landlord threatens to evict them unless the daughter marries him.
The daughter, not wanting to marry the landlord but fearing that her father won't be able to take being evicted, suggests the following proposition to the landlord. He will put two stones, one white and one black, into a bag in front of the rest of the townspeople. She will pick one stone out of the bag. If she picks the white stone, the landlord will forgive their debt and let them stay, but if she picks the black stone, she will marry the landlord, and her father will be evicted anyway.
The landlord agrees to the proposal. Everybody meets in the center of the town. The landlord picks up two stones to put in the bag, but the daughter notices that he secretly picked two black stones.
She is about to reveal his deception but realizes that this would embarrass him in front of the townspeople, and he would evict them. She quickly comes up with another plan. What can she do that will allow the landlord save face, while also ensuring that she and her father can stay and that she won't have to marry the landlord?

The daughter picks a stone out, keeps it in her closed hand, and proclaims "this is my stone." She then throws it to the ground, and says "look at the other stone in the bag, and if it's black, that means I picked the white stone." The landlord will reveal the other stone, which is obviously black, and the daughter will have succeeded. The landlord was never revealed as a cheater and thus was able to save face.

You are standing next to three switches. You know these switches belong to three bulbs in a room behind a closed door – the door is tight closed, and heavy which means that it's absolutely impossible to see if any bulb is on or not. All three switches are now in position off.
You can do whatever you want with the switches and when you are finished you open the door and go into the room. While in there you have to tell which switch belongs to which bulb.
How will you do that?

Turn on the first switch and wait for a while.
Turn off the first one and turn on the second.
Go into the room.
One bulb is shining, the second bulb is hot and the third one nothing.

A king decided to let a prisoner try to escape the prison with his life. The king placed 2 marbles in a jar that was glued to a table. One of the marbles was supposed to be black, and one was supposed to be blue. If the prisoner could pick the blue marble, he would escape the prison with his life. If he picked the black marble, he would be executed. However, the king was very mean, and he wickedly placed 2 black marbles in the jars and no blue marbles. The prisoner witnessed the king only putting 2 black marbles in the jars. If the jar was not see-through and the jar was glued to the table and that the prisoner was mute so he could not say anything, how did he escape with his life?

The prisoner grabbed one of the marbles from the jar and concealed it in his hand. He then swallowed it, and picked up the other marble and showed everyone. The marble was black, and since the other marble was swallowed, it was assumed to be the blue one. So the mean king had to set him free.

At a dinner party, many of the guests exchange greetings by shaking hands with each other while they wait for the host to finish cooking.
After all this handshaking, the host, who didn't take part in or see any of the handshaking, gets everybody's attention and says: "I know for a fact that at least two people at this party shook the same number of other people's hands."
How could the host know this? Note that nobody shakes his or her own hand.

Assume there are N people at the party.
Note that the least number of people that someone could shake hands with is 0, and the most someone could shake hands with is N-1 (which would mean that they shook hands with every other person).
Now, if everyone at the party really were to have shaken hands with a different number of people, then that means somone must have shaken hands with 0 people, someone must have shaken hands with 1 person, and so on, all the way up to someone who must have shaken hands with N-1 people. This is the only possible scenario, since there are N people at the party and N different numbers of possible people to shake hands with (all the numbers between 0 and N-1 inclusive).
But this situation isn't possible, because there can't be both a person who shook hands with 0 people (call him Person 0) and a person who shook hands with N-1 people (call him Person N-1). This is because Person 0 shook hands with nobody (and thus didn't shake hands with Person N-1), but Person N-1 shook hands with everybody (and thus did shake hands with Person 0). This is clearly a contradiction, and thus two of the people at the party must have shaken hands with the same number of people.
Pretend there were only 2 guests at the party. Then try 3, and 4, and so on. This should help you think about the problem.
Search: Pigeonhole principle