Home > Uncategorized > Hats

Hats

June 24th, 2005

I’ve been TOTALLY worthless at work. I think I did about 3 hrs of work this whole week. My project ended last friday and my head supervisors been out the week so I couldn’t get him to assign me to something. Fortunately he comes back Monday so I need to find work to do otherwise I’ll go nuts for the last three weeks here (which to some, is a long time, but the weeks go by pretty fast). To spend the time, I usually hang out with my roommate and ex-roommate who work in the same cube across the room from me. This contractor works with them and has been giving us these riddles all week. They’re progressively harder. Without further ado, what I’ve been working on at work:

Hat puzzle One: There are four hats, two red, two blue. There are three logical people in a line facing a wall. The last person can see the two in front of him. The next person can see one, the last person sees only the wall. Each one is given a hat at random. They cannot take off the hat or they all die. Only one person is allowed to guess the color of his hat. If he’s correct, they all live, if he’s wrong, they all die. They cannot say anything else or move around or take off their hats or physically/verbally/telepathically communicate with each other. They can only say what color hat they have or not say anything at all. How can they all live? – This was the easiest problem we were given (and actually he gave us the answer cuz it was a precussor to the next problem).

Hat Puzzle Two: 10 girls are captured by cannibals in the jungle. The cannibals tell them that they’re going to line them all up facing one direction. The last person in line will be able to see all the people in front of her. The next can see all the people in front of her. So the last person can see 9 people, the next 8, and 7 and 6 and so on till the last person can see no one. Each will be given a red or blue hat at random. It could be all red hats or all blue hats or a mix, there is no set number of a color hats. Each person will be asked the color of their hat. They cannot take off their hat and can only say ‘red’ or ‘blue’. They cannot use how they say it or the timing or anything else to communicate to each other, only ‘red’ or ‘blue’. If they say the correct color of the hat they are wearing, that one girl lives. If that girl gets it wrong, they eat her. The cannibals give the ten girls a day to come up with a strategy to save as many of their selves as they can before they are lined up and given hats to wear. They must answer in order starting with the last person. How many can be saved? You can assume that each person will correctly follow the strategy they come up with and no one messes up- We came up with 5 really fast. This is the obvious answer of every other person says the color of the hat in front of them, then that person saves their self garunteeing 50% survival rating. Then we came up with a solution to save 6 but you save even more. Eventually we got the correct answer. How many can you garuntee survival?

Hat Puzzle Three: This is an extension of #2. My other roommate, Andrew, figured out this problem after we posted it to all the coops. Then he came up with some idea of solving the problem if there were three different hats, ie. red, blue, green. Then we had the idea of solving for ‘n’ different hats. In the case of n=5, the cannibals would use 5 different hats, red, green, blue, yellow, purple. We were able to come up with a proof of a way to minimize the number of deaths with the cannibals using ‘n’ number of different hats which is some constant C. To get this, you have to be clever and being a CS/CE/EE major here helps alot.

Hat Puzzle Four: An evil taskmaster has enslaved ten totally logical workers and sewed their mouths shut so they cannot communicate verbally to each other at all. At noon each day, the taskmaster sets all the workers in a circle so they can see each other. Then he puts either a red or blue hat on each person. They cannot look at their own hat but they see everyone else’s. Then the taskmaster says move. They can either step forward to indicate they think they are wearing a red hat, step back to indicate that they think they wearing a blue hat or not move at all if they are unsure. If someone with a blue hat steps forward, everyone who steps forward dies. If someone with a red hat steps back, everyone who steps backward dies. If they get it right, the taskmaster lets them go. They also have the option of not moving at all but if they plan on moving, they must all move at the same time when the taskmaster says move. For everyone that didn’t move, their hat is taken from them until the next day when the taskmaster circles them up again and gives them the same hat as the time before. How can you minimize the number of deaths? – We haven’t figured out this problem yet. The trick is that they can’t come up with a strategy like the second and third puzzle so it’s more like the first puzzle. If you solve this one, or google it, or some how figure it out. Please don’t post the solution. My friends and I would like to solve this on our own to show up our highly nerdy, highly paid contractor at work.

So that’s what I’ve been doing at work. Solving logic puzzles and playing with magnets. Hopefully next week I get some work.

Uncategorized

Comments are closed.