Tuesday, November 28, 2006


I'm currently reading "How would you move mount Fuji?" which is a book about notorious Microsoft interview questions - some of which are impossible to answer. It was lying around the house, I picked it up and have now got sucked in - you may know how it is.

Man dressed as cigarette doing jigsawMany of these questions are in the form of brain teasers, or just difficult problems. A few of the ones I quite enjoyed and I'm happy with my answers on are:

  • Why are beer cans tapered at the bottom?
  • Why do mirrors reflect right to left?
  • Every man in a village of fifty couples has been unfaithful to his wife - TYPICAL MEN. Every woman in the village instantly knows when a man other than her husband has philandered, but not when her own husband has. Local law dictates that a woman who can prove her husband is unfaithful must kill him that very day (firm but fair). One day, the queen, who is known to be infallible (hmmm), visits the village and announces that at least one husband has been unfaithful - what happens?

However, I'm totally stumped on this one (although it may not even HAVE an answer - that's how irritating the book is);

  • An evil demon captures a horde of dwarves. He plants a jewel in the forehead of each dwarf which is either red or green. He tells them that he planted an unremovable red or green jewel in the dwarf's forehead but he's not going to tell which colour it is - and as he has also cursed all the dwarves so they can't communicate - nor will anyone else. He also tells them that there is at least one jewel of each colour. One day the demon gets bored of his pet dwarves (fickle) and decides to disposs of them. He let's them know that if all the reds move forward and the greens move back correctly at the regular morning roll call he will let them go - but if even one of them moves incorrectly he'll slaughter the lot (there's no penalty for standing still). Dwarves are known for their ruthless logic - how can they work out the colour of their own jewel without getting everyone killed?



Anonymous said...

Unless it is a trick question, to do with light reflecting off the jewels, it would only work if only one dwarf had a jewel of his colour, in which case by a process of elimination he could step in the right direction and they, knowing that all dwarves are ruthlessly logical, would step in the other direction.

Jim Jay said...

OK - well I think I may have worked it out... and your on the right track - you just have to extend it.

Suppose there are more than one with the jewel. Say there are two. Frank and John. They can see each other and so do not step forward... by which Frank can deduce that John can see at least one other - and as Frank can only see the one he *now knows* that there are just two of them with red himself and John.

So the fact that no one stepped forward at morning roll call means he knows the next morning what to do.

But maybe there's more... so if on that day no one steps forward there must be three, then four, then five... etc. dwarves being patient can wait for many days (particularly when the alternative is death) but eventually they'll know the answer sinply by how many days the others don't step forward - my head hurts

Jim Jay said...

Which now I think of it has similarities with the village of unfaithful men teaser

Adrian Windisch said...

What about the dwarves looking in the mirror, reflection. Did I miss something?

LeftyHenry said...

The third one made my brain explode.

Jim Jay said...

AW: I think if the drawves could just check themselves out it wouldn't be much of puzzle. They probably don't have mirrors in hell...

LH: The answer is kind of similar in workings out to the dwarves problem - a little hint there's a blood bath, but not on the day of the queen's visit.

Anonymous said...

That's an elegant solution - but it does depend on all dwarves being very reliable and logical.
I suppose it's difficult to think of the solution, because you could never rely on humans to do this.

Anonymous said...

You're right JimJay. Nice one!