wu :: forums
« wu :: forums - MS INterview Question »

Welcome, Guest. Please Login or Register.
Apr 28th, 2024, 7:45pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   microsoft
(Moderators: Icarus, ThudnBlunder, Grimbal, towr, Eigenray, SMQ, william wu)
   MS INterview Question
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: MS INterview Question  (Read 5609 times)
Joel Burlingham
Guest

Email

MS INterview Question  
« on: Apr 12th, 2003, 10:25am »
Quote Quote Modify Modify Remove Remove

There are 10 dwarfs of different heights and they get captured by a giant. The giant says, "Tomorrow I am going to put either a red feather or a blue feather on your head. You won't be able to see it. You will have to guess your feather. If you guess wrong, you die. If you guess right you live. I am going to line you up like this:"
 
----->
 
|
| |  
| | |  
| | | |
| | | |
 
So the tallest guy can see everyone's feathers. But he can't see his own. He will have to either say red or blue. So the dwarves have a night to figure out a plan of what they can do.
 
What is the max guaranteed # of dwarves that can be saved?
IP Logged
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
Re: MS INterview Question  
« Reply #1 on: Apr 12th, 2003, 10:38am »
Quote Quote Modify Modify

duplicate of this riddle
It's a nice riddle, BTW!
IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
Raymond
Guest

Email

Re: MS INterview Question  
« Reply #2 on: Apr 13th, 2003, 9:24pm »
Quote Quote Modify Modify Remove Remove

if I'm thinking it right this might be a possible solution:
- If we let the dwarfs stand in ascending order then dwarf2 can see dwarf1 and so on......so this way we can save 9 dwarfs at least....
 
does it makes sense?...
IP Logged
aero_guy
Senior Riddler
****





   
Email

Gender: male
Posts: 513
Re: MS INterview Question  
« Reply #3 on: Apr 13th, 2003, 11:42pm »
Quote Quote Modify Modify

Check the linked discussion.  Yours is a seemilngly common mistake.
IP Logged
Joel Burlingham
Guest

Email

Re: MS INterview Question  
« Reply #4 on: May 14th, 2003, 9:58am »
Quote Quote Modify Modify Remove Remove

I'm still not sure about this one.....any help is appreciated.....
IP Logged
Ganon
Guest

Email

Re: MS INterview Question  
« Reply #5 on: Feb 8th, 2005, 11:09pm »
Quote Quote Modify Modify Remove Remove

9.  Though the 10th guy has a 50% chance.
 

Think parity bit.
Let red feather = 0.
Let blue feather = 1.
Have the tallest guy count the number of blue feathers mod 2 and say the corresponding feather (ie. say red if he counts even number of blue feathers and blue if he counts an odd number of blue feathers).
 
eg. if the dwarves are 1011011010 (10th guy on left)
Then the 10th guy counts 4 blue feathers and says red (blam, he's dead, too bad).
The 9th guy knows there are an even number of blue feathers and sees an even number of blue feathers, so he says red and is happy.
The 8th guy knows there are an even number of blue feathers left and sees an odd number of blue feathers, so he says blue.
The 7th guy knows there are an odd number of blue feathers left (because the 8th guy's was a blue feather) and sees an even number of blue feathers, so he says blue.
...

IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board