The Magic Café
Username:
Password:
[ Lost Password ]
  [ Forgot Username ]
The Magic Cafe Forum Index » » Puzzle me this... » » A hat problem (0 Likes) Printer Friendly Version

 Go to page 1~2 [Next]
Stephen Buxton
View Profile
Veteran user
311 Posts

Profile of Stephen Buxton
Ever head of a forest called Gnome Man's Land? Guess who lives there? Gnomes of course!

These gnomes have lived in this dark forest for so long that their pointy little hats, which were either red or blue, had grown attached to their heads. No-one knew any longer the colour of his own hat. Every day, they went along a narrow path in the woods to a big clearing, where the head-gnome would do a head count and see that all 424 gnomes were present. But, one day the head-gnome said: "Folks, I am getting old, and I can't see very well, particularly when all your blue and red hats are so mixed up. It's all a bit of a blur. Tomorrow, just to make it easier for your old chief, would you please all stand according to colour."

And the next day, all the gnomes trolled down the path to the clearing one by one, and stood exactly as the head gnome had requested: all the blue hats on one side of the clearing, all the red hats on the other. And the chief looked at the red hats, looked at the blue hats, and saw that all were present.

But the question is how they had managed to do it, given that they could not possibly know the colour of their own hats, and they would never dream of asking each other the colour of their own hats or, worse still look in a mirror and they didn't tell each other where to stand...
If you put an infinite number of apes in front of an infinite number of computers, you get a pretty good idea of what internet chat rooms can be like
mike paris
View Profile
Regular user
179 Posts

Profile of mike paris
One would be in charge and say you (blue hat ) on this side,and you (red hat) stand on this side,then when all are sorted,he stands in between them and says where do I stand, then next time to stand in the same place.Mike
Mehtas
View Profile
Inner circle
England, UK
1650 Posts

Profile of Mehtas
Its not as simple as that mike,

I think there are some rules and restrictions that were not mentioned in the original post.

:kewl:
Sapient
View Profile
Regular user
126 Posts

Profile of Sapient
This would take a long time, but it could be done this way.
A group of two gnomes would have no idea if they had hats of the same color, but no other gnome would join them if they did not. IF they did have the same color, then a third would join them. If it's color was the same, the other two would stay. If they saw it was different from their partned, they would wander off and join another group (and would know the color of their hat).

In this way, everyone would quickly know the color of their hats, never admitting to the others that they had forgotten.
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
Assuming there is at least one Blue hatted gnome this could work:

They decide that after N minutes N Blue hatted gnomes should walk to a certain spot IF there is exactly N Blue hatted gnomes in the forest.

It will take at most 7 hours and 4 minutes so they will be ready in good time for the next day.

/Tomas
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
Hmmm, the strategy I posted will work even if there are no Blue hatted gnomes, I realize. In that case everyone would think they have Blue hats and move to that spot at minute one, only to find that everyone that joins has Red hats. The conclusion then will be that everyone has Red hats and the problem is still solved.

/Tomas
Mehtas
View Profile
Inner circle
England, UK
1650 Posts

Profile of Mehtas
I know the solution to this but wont spoil it for everyone.

you guys will like it. its almost like a "self working trick"

This is not a matter of time tomas. it could even take them couple of minutes to sort themselves out.

Did I give away too many clues ? ? Smile


:kewl:
Stephen Buxton
View Profile
Veteran user
311 Posts

Profile of Stephen Buxton
Mike's suggestion of ordering people where to stand is not allowed, as was stated in the final sentence of the puzzle.

Sapients suggestion of joining groups is sort of on the right lines.

Thanks Mehtas for not saying the solution. Would I be right in assuming that you heard this on the Radio?
If you put an infinite number of apes in front of an infinite number of computers, you get a pretty good idea of what internet chat rooms can be like
Mehtas
View Profile
Inner circle
England, UK
1650 Posts

Profile of Mehtas
Stephen,

someone asked me few days ago. it took me ten minutes to get the solution right.


:kewl:
Jonathan Townsend
View Profile
Eternal Order
Ossining, NY
26992 Posts

Profile of Jonathan Townsend
Fortunately at least one of then had an elf friend who gave them small buttons to match their hats.
...to all the coins I've dropped here
Jonathan Townsend
View Profile
Eternal Order
Ossining, NY
26992 Posts

Profile of Jonathan Townsend
Quote:
On 2005-08-05 06:16, TomasB wrote:
Assuming there is at least one Blue hatted gnome this could work:

They decide that after N minutes N Blue hatted gnomes should walk to a certain spot IF there is exactly N Blue hatted gnomes in the forest...


Tomas, please explain how this would happen.
...to all the coins I've dropped here
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
Jonathan,

Let's assume there is a single Blue hatted gnome. He would look around and se all Red hatted gnomes so he'd know that he is a Blue hatted gnome and move to the spot at minute 1.

Assume there are two Blue hatted gnomes. Everyone but them would see two Blue hatted gnomes while they would only see a single Blue hatted gnome each. When they have nott seen the Blue hatted gnome move to the spot in minute 1 they of course both go at minute 2.

Same strategy if there are more Blue hatted gnomes:

If you see M Blue hatted gnomes and they have not moved to the spot in minute M, then you yourself should move to that spot at the next minute. This will lead to that all Blue hatted gnomes will go to the spot at the same time.

While this works, I'm very curious about the solution that doesn't involve time slots.

/Tomas
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
Ah, instead of using time slots you could use 424 positions in the forest. If a gnome sees M Blue hats he stands in the position numbered M. ...and all of a sudden I see a solution. Smile

The rule is: If you see an even number of Blue hats, stand on the left, and if you see an odd number of Blue hats, stand on the right.

/Tomas
Stephen Buxton
View Profile
Veteran user
311 Posts

Profile of Stephen Buxton
The problem with that suggestion is that you may end up with reds standing on either side of the blues
If you put an infinite number of apes in front of an infinite number of computers, you get a pretty good idea of what internet chat rooms can be like
Jonathan Townsend
View Profile
Eternal Order
Ossining, NY
26992 Posts

Profile of Jonathan Townsend
Quote:
On 2005-08-05 11:31, TomasB wrote:...The rule is: If you see an even number of Blue hats, stand on the left, and if you see an odd number of Blue hats, stand on the right...


I'm missing something

When I imagine this process I see:

First blue hat comes over, sees zero and so stands to the left
Second blue hat sees one, so stands to the right.
Thrid sees two and so stands to the left.

later on, a red hat comes along and sees to rows of blue hats.

Please provide more details.
...to all the coins I've dropped here
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
Jonathan, they have a whole day to do this procedure in their part of the forest before the big meeting. They look at ALL other gnomes to see if they see a total of Blue hats which is odd or even.

Stephen, I didn't see it specified which gnomes should stand where. But if it is, I do think that it is obvious that you are Red if you see that the other group is Blue and vice versa.

So was there a rule against using the time before the meeting to solve the problem?

/Tomas
Stephen Buxton
View Profile
Veteran user
311 Posts

Profile of Stephen Buxton
They do work out a strategy before hand. All the head gnome has stipulated that the gnomes divide into two groups dependant on colour.

The solution you describe appears to assume that all the blues come in first and then all the reds.

As for counting the number of hats for odd and even, that won't work.

First gnome arrives (assume blue). Stands somewhere.

Second gnome arrives (assume blue). Sees odd number, stands to right.

Gnome three (red) - sees even number of blues, stands to left.

Gnome four (blue) - sees even number of blues, stands to left of blues

Gnome five (red) - sees odd number of blues, stands to right

Which means that (depending on which side of the red hat gnome 4 stands), the grouping will be:

red, blue, blue, blue, red; or
blue, red, blue, blue, red

Either way, the reds have already been separated
If you put an infinite number of apes in front of an infinite number of computers, you get a pretty good idea of what internet chat rooms can be like
Stephen Buxton
View Profile
Veteran user
311 Posts

Profile of Stephen Buxton
Before we go any further, I should say that I know of only one solution to this problem that meets the rules stipulated above. There may be others (after all, there usually is more than one way to skin a cat...)

I will say this about the solution I know - It will work for any number of people, and does not rely on prior knowledge of the number of blues or reds, nor has anything to do with odd or even numbers.

I am open to reading your alternative solutions (provided they don't break the rules!)
If you put an infinite number of apes in front of an infinite number of computers, you get a pretty good idea of what internet chat rooms can be like
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
Stephen, the solution with counting Odd or Even the day before doesn't require them to go in with all Blues first. It just requires that they remember their own color the next day. The time solution I wrote is sure fire but it is commonly used as the solution to a similar but stricter problem.

I do not see how any strategy can be agreed upon that will make them go directly to the correct place the following day. Assume the second gnome to enter sees a Red gnome standing to the right - how can he possibly decide if he himself should go right or left. If they can only base their choice on the gnomes they see have already arrived it is unsolvable. They have to make some calculations and observations beforehand OR be allowed to move around during the meeting.

Are these the restrictions?

1. They just decide on a strategy but make no observations or counts before the meeting.

2. They can only observe the gnomes that arrived before them to the meeting and make their decisions from that.

3. Once in position you are not allowed to move around.

Could you specify the restrictions again if I missunderstood something.

/Tomas
stanalger
View Profile
Special user
St. Louis, MO
996 Posts

Profile of stanalger
Would this be acceptable?

The first gnome who arrives at the clearing stands in the
middle. He's the first person in line.

As other gnomes arrive in the clearing, they get in line
according to the following rules.

If the line consists entirely of red-hats, get in the back
of the line.
If the line consists entirely of blue-hats, get in the
front of the line.
Otherwise, get in the middle of the line, stepping in
between the adjacent pair of different colored hats.

Once hats of different colors are in line, no more gnomes
will join the line at the very front or at the very back,
so the extreme ends of the lines can "huddle-up" a bit
and not worry about keeping a strict "line."
The Magic Cafe Forum Index » » Puzzle me this... » » A hat problem (0 Likes)
 Go to page 1~2 [Next]
[ Top of Page ]
All content & postings Copyright © 2001-2019 Steve Brooks. All Rights Reserved.
This page was created in 0.12 seconds requiring 5 database queries.
The views and comments expressed on The Magic Café
are not necessarily those of The Magic Café, Steve Brooks, or Steve Brooks Magic.
> Privacy Statement <

ROTFL Billions and billions served! ROTFL