Esoteric Dissertations from a One-Track Mind

May 17, 2007

Worse Than Job Riddles?

Filed under: programming — codesmithy @ 6:01 am

Worse than failure ran an article about riddles in a job interview. I generally agree that the Boeing 747 question is a bit contrived, along with the bulbs in the black box. The general philosophy of the interview is probably explained in “How Would You Move Mount Fuji?: Microsoft’s Cult of the Puzzle — How the World’s Smartest Companies Select the Most Creative Thinkers” by William Poundstone. I haven’t read the book yet, so I’m just guessing.

I think only a few organizations can pull off the puzzle culture shtick. In general, if I was hiring, I would ask someone to design, code and test a module given some set of requirements. But, that is just me.

The forums on the topic was where things really got interesting. There was quite a bit of debate about the following problem, which I will restate in an attempt to remove some of the ambiguities and communication issues.

There are three people. They will each walk into separate room, in which they will be unable to communicate or see each other. Once in the rooms, each will be randomly assigned a color, red or blue. Each person will be unable to see the color they have been assigned, but in a panel in front of them, they can see what color has been assigned to the two other people. Each person will have buttons in front of them, allowing them to choose “red, blue, or pass.” The group wins only if one person correctly guesses their own color and the other two choose pass. The group is allowed to communicate and decide on a strategy before entering their rooms. What strategy should the group choose to maximize their chances of winning?

One valid strategy would be randomly assign one person to answer red or blue and assign the other two to pick pass. Using this strategy, the group should have a 50% chance of winning, since the person choosing has a 50% chance of guessing their own color, and knowing the other group member’s color won’t help. Is there a strategy that will do better? First, let’s verify assumptions about this strategy.

If we call the people A, B, C and the assign 0 for red and 1 for blue, we can enumerate the 8 possibilities.

A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Let’s say the group chooses A to guess. Here is what A sees.

B C
0 0
0 1
1 0
1 1
0 0
0 1
1 0
1 1

So, 1/4 of the time A sees two red Indicators, 1/4 of the time A sees two blue, 1/4 of the time A sees B with red, and C with blue, and remaining 1/4 of the time A will see B with blue and C with red. No matter what scenario A sees, there is 50% chance that his/her color is blue and 50% chance his/her color is red. Exactly what we expected; knowing two other independent results didn’t help A in the slightest to make a better choice. We might be willing to say, there is no way to do any better. But, what if the group didn’t predetermine who was going to answer. What if the group used the indicators to choose the person who should make the choice. Is there anyway to single somebody out? Looking at the table, we see the first glimmers of hope. For six of the eight possibilities we might notice that there is one group member who is different than the other two.

A B C
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0

What if there was a way to get C to answer in the first and sixth scenario, B to answer in the second and fifth, and A to answer in the third and fourth?

As it turns out there is, notice that A and B see the same thing, one red and one blue. C sees two red. The opposite thing happens in the sixth case, C sees two blue and A and B see one red and one blue. We can use the same strategy when we want A or B to choose. So, for 6 of the 8 cases we can decide who can answer since one and only one person will see two lights of the same color. What color should they pick, well the opposite color of the two that they see. Unfortunately, the strategy breaks down when we introduce the other two cases back in, since everyone will answer, and they will all be wrong. However, by getting 6 of the 8 cases right, we improve our chances of winning to 75%, certainly better than 50%. For those disappointed that our expected strategy didn’t work out, at least we can say we did better than anarchy. That is by letting each person choose red, blue or pass at random which only has a 1/9 chance of winning (PPB, PBP, BPP, PPR, PRP, RPP out of 27 possibilities which is 2/9ths * .5 that the actual correct color was picked).

I found the problem interesting. Particularly because of the apparent paradox. I don’t know if I would have gotten it right in an interview or not. I am not making a judgment of its fairness. However, I think it is more fair than the 747 question. What I would look for in the interviewee is: can they enumerate all the possibilities? How much prodding do I need to give to get them on the right path after they’ve properly enumerated all the possibilities. Noticing the pattern and coming up with the strategy completely on their own wouldn’t be expected. In fact, it would indicate that they had probably seen the problem before. The last thing that I would look for is the ability to accept the right answer or how often I had restate some piece of the problem that the interviewee missed. I couldn’t believe how many times the correct answer had to be reexplained or some aspect of the problem repeated on the worsethanfailure forums. Do you have the ability to accept a clever answer or is your comprehension so low that you can’t recognize the correct answer when it is presented? The third aspect might very well be the most important one you can glean from an interview.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: