Colored hats, liars, and truth-tellers

  • Thread starter VKint
  • Start date
In summary, the conversation discusses four different puzzles that involve logic and critical thinking. The first problem involves trying to determine the correct route to a city with limited information and only one question to ask. The second and third problems involve prisoners trying to survive a game by using strategy and deduction. Finally, the fourth problem involves a dinner party with a unique observation about handshakes.
  • #1
VKint
139
12
I have a few puzzles y'all might enjoy. They're not too hard, and many of you will probably have seen them before.

1. You're in a strange country, bereft of map, compass, or other navigational equipment, trying to make your way to a city you've never visited. You're traveling on the only road visible for miles. You come to a fork in the path. On each branch stands a single sentry. One of the two men always lies, and the other always tells the truth (don't ask me how you know this); you don't know which is which. You know that one, and only one, of the two available directions will take you to your destination. You are allowed to ask precisely one yes-no question of one of the two men (i.e., one or the other). What question do you ask to ensure you find the correct route?

2. An evil wizard captures 100 travelers and makes them play a diabolical game. After explaining the rules, he allows them to confer and agree on a strategy. He then lines up the prisoners in single file and, starting at the back, places a hat colored red, green, blue, or yellow onto each prisoner's head in such a way that each prisoner can see all the hats in front of him, but not his own or any behind him. He then proceeds, again beginning at the rear, to ask each prisoner what color hat he's wearing; if they answer correctly, they are allowed to go free, but it they fail, they're immediately executed. What is the maximum number of prisoners that the group can guarantee to save by means of strategy alone (i.e., no mutinies or other such trickery)?

3. Same as the last puzzle, except with an infinite number of prisoners.

4. My wife and I have ten couples over for dinner one night. During the course of the evening, I observe that each person present (except me) shakes a different total number of hands. Furthermore, nobody shakes their spouse's hand. How many hands did my wife shake?

Edit: It seems problems 2 and 3 have been posted before on this forum.
 
Physics news on Phys.org
  • #2
VKint said:
Edit: It seems problems 2 and 3 have been posted before on this forum.

I think they've all been posted before, although with slightly different variants. The handshake one I remember seeing here and solving, but with a smaller number of couples. The 1st problem is posted here a LOT in different forms, and the 2nd one is again mildly common.

The 3rd one is particularly interesting to me, because someone posted something similar which I still disagree with. He was claiming that with an infinite (yet "countable") number of prisoners, AND with each person not being able to hear the guesses of the people behind them, that you could save EVERYONE except some finite number.

DaveE
 
  • #3
Here is a response to the remaining problems:

1. To ensure you find the correct route, you would ask one of the sentries: "If I were to ask the other sentry which path leads to the city, which path would he say?" This question works because the sentry who tells the truth will honestly answer with the path that the lying sentry would lie about, and the lying sentry will lie about the path that the truthful sentry would honestly answer.

4. Since each person (except for the host) shakes a different total number of hands and nobody shakes their spouse's hand, this means that there are an odd number of people at the dinner party. Therefore, your wife must have shaken an even number of hands, as she cannot shake her own spouse's hand. However, since there are an even number of couples (10), the total number of hands shaken by your wife must be even. Therefore, she must have shaken an even number of hands.
 

1. What is the "colored hats, liars, and truth-tellers" problem?

The "colored hats, liars, and truth-tellers" problem is a logic puzzle where a group of people wearing either a black or white hat must determine the color of their own hat based on the information they are given and the statements made by their fellow group members.

2. How does the problem work?

The problem starts with a group of people standing in a line, facing the same direction. Each person can see the hats of the people in front of them, but not their own hat. The group is told that some of them are wearing a black hat and others are wearing a white hat. They are also told that some of them always tell the truth (truth-tellers) and some always lie (liars). The group must figure out the color of their own hat by asking each other questions.

3. What are the rules for solving the problem?

1) Each person can only see the hats of the people in front of them, not their own.
2) Each person can only ask one question.
3) Each person must answer truthfully or lie consistently.
4) The group can only ask questions that can be answered with "yes" or "no".

4. What is the solution to the problem?

The solution to the problem depends on the specific scenario and the number of truth-tellers and liars in the group. In general, the solution involves asking strategic questions to determine the color of one hat, which can then be used to figure out the colors of the remaining hats. There are different strategies that can be used, and the solution can vary depending on the specific scenario.

5. What is the significance of this problem?

The "colored hats, liars, and truth-tellers" problem is a popular logic puzzle that challenges critical thinking and problem-solving skills. It is often used as a brain teaser or a team-building exercise. This problem also has real-world applications in fields such as artificial intelligence and game theory.

Similar threads

Replies
35
Views
4K
  • General Discussion
Replies
4
Views
8K
  • General Discussion
Replies
20
Views
5K
Replies
9
Views
5K
Replies
10
Views
3K
  • General Math
Replies
8
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
579
Replies
19
Views
1K
  • General Discussion
Replies
4
Views
2K
  • General Discussion
Replies
14
Views
7K
Back
Top