Riddle

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

rgwalt

Diamond Member
Apr 22, 2000
7,393
0
0
Originally posted by: ergeorge
Originally posted by: ergeorge
Originally posted by: rgwalt
Well, I have an answer in which only one smurf will have a 50% chance of dying, and the rest will live. If it gets any better than that, let me know.

Ryan

That's the way I see it.
Took more like 20 seconds then 20 minutes

Oops nope ... re-reading it, each smurf only gets one chance to call out his hat color, so calling out the the color of the hat in front of him only saves the guy in front of him, and 50/50 chance of saving himself. So, if every other smurf (ie. 50, 48, 46, ...) calls out the color of the hat in front of him, and the other half (49, 47, 45, ...) calls out the color that he just heard from the guy behind him, then 50% will definitely be saved (the odd numbers) and roughly 50% of the even numbers will be saved by the chance that their hat is the same color as the guy ahead of them, so about 75% will be saved.

You can probably do better then that, but it's a first cut.

I forgot about that... stupid 3 AM riddles

Ryan
 

ndee

Lifer
Jul 18, 2000
12,680
1
0
is this a logic riddle or just something like... we-gonna-run-away-in-the-night-type of riddle?
 

dopcombo

Golden Member
Nov 14, 2000
1,394
0
0
ooh. Game theory.

I actually learnt the solution to this qn in AI class back in EE Ugrad.
But I've obviously let my education gone to waste.
Forgotten it, and I don't feel like thinking....

 

Armitage

Banned
Feb 23, 2001
8,086
0
0

#50 counts all the hats in front of him if # of black hats (B) >= # white hats (W), he calls out 'black", otherwise 'white'. 50/50 shot ... actually maybe a little less.

#49 counts all in front of him. He does the same thing. If his count is different, his hat must be the difference and he is saved. Otherwise he has rougly 50/50.

#48 counts all in front of him. He knows what 50 and 49 called, and whether they got eaten, so he knows what color their hats were. He should be able to combine this information with his count information and come up with a better estimate for his own color ... but I need to get to work, so I'll think about it later
 

dopcombo

Golden Member
Nov 14, 2000
1,394
0
0
The answer is indeed posted.

Parity bit. That last guy is a parity bit!!

He agrees before hand to say white if there are odd number of white hats.

guy in front of him counts all the hats in front of himself and deduces his color.

Next guy remembers all previously counted and deduces his own color as well.

WOW.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: dopcombo
The answer is indeed posted.

Parity bit. That last guy is a parity bit!!

He agrees before hand to say white if there are odd number of white hats.

guy in front of him counts all the hats in front of himself and deduces his color.

Next guy remembers all previously counted and deduces his own color as well.

WOW.

Yep, that should work & save 49 with the last guy having a 50/50 shot.
Better then my start of an answer which gets in trouble if there are many more of one color then the other.
 

Alternex

Senior member
Oct 9, 1999
531
0
0
Originally posted by: dopcombo
The answer is indeed posted.

Parity bit. That last guy is a parity bit!!

He agrees before hand to say white if there are odd number of white hats.

guy in front of him counts all the hats in front of himself and deduces his color.

Next guy remembers all previously counted and deduces his own color as well.

WOW.

Yeah that's the first thing I thought about too! I figure this riddle would be hard for non-programmers
 

Alternex

Senior member
Oct 9, 1999
531
0
0
This reminds me of another riddle my wife got from an interview:

You've got three guys lined up, facing one direction.
Person A -> Person B -> Person C
Each of them is wearing either a red or blue hat that they got from a bag containing 3 red hats and 2 blue hats

Person A can see what person B and C's hats are, B can see what person C's hat is, and C doesn't see anything
With all three of them together, person A is asked what color hat he was wearing, he says "I don't know." Person B is then asked what color hat he was hearing, he says "I dont' know."

So the question is, is person C able to answer with certainty when asked what his color hat was?
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |