Monday, August 27, 2012

52 Number Logic Puzzle

Here's a logic puzzle that my boss gave me to think about.  I thought about it on and off for a few days before arriving at a correct solution.  I feel I should have figured it out sooner, but I ended up going down a dead-end path and wasting time stuck in that rut.

Anyway, here's the problem.  I personally find it to be a really nice puzzle with a nice clean solution.

There is a bag with 52 balls numbered 1 through 52.  First, you choose 5 of them randomly, and second, you pick one of them out (non-randomly... you get a choice) and put it in your pocket.  Now, there are 4 balls remaining from your initial 5.  Your goal is to order the 4 balls however you want in order to convey what the pocketed ball is to someone that understands your strategy/algorithm/rules.

Note that by ordering the 4 balls, I am not saying that you're allowed to do weird things with how the balls are placed.  This problem involves no such trickery.  The strategy that you come up with should work just as well if you wrote down the values in the order of your choice and some random person on the street were asked to read them out in order.  The mere reading of these numbers in order should be enough information to determine the value of the hidden ball.

As you would guess, the question is simply this: What strategy/algorithm/rules can you use to accomplish this information transmission feat?


Additional Clarification Notes (as some appear to be confused by the questions):

Understand that you only have 4 values to work with. The pocketed ball's value never comes into play as far as transmitting information.  All the information must be conveyed with 4 ordered values. Nothing more. To further clarify, the final list of 4 values can be read out loud by anyone (including those without knowledge of the algorithm), and anyone that listens to the sequence of 4 values and also understands the strategy/algorithm/rules should be able to ascertain the hidden ball's value.

1 comment:

urdu master said...

Good Blogger And Nice Posts...