Wednesday, June 13, 2007

Picking Your Brain: Second Installment

Puzzle #4: You have eight marbles. One of them is defective and weighs less than the others. Given a balance to measure marbles against each other, how do you find the defective marble in two weigh-ins? Level of difficulty: easy.

Puzzle #5: You have an employee working for you for seven days. Each day, you pay the employee with a single link from a gold chain with seven links. If you are only allowed to make two cuts in the chain, how do you pay your employee at the end of each day? Level of difficulty: moderate.

Here are the solutions:

Solution #4: Let's label the marbles A, B, C, D, E, F, G and H. In the first weigh-in, we measure A, B and C against D, E and F. If they are equal, we know the lighter marble is either G or H, and we can use the second weighing to determine which one it is. If, on the other hand, A, B and C together are heavier or lighter than D, E and F, we have narrowed down which group of three contains the defective marble. Then in the second weigh-in, we measure two of those three marbles against each other. If one is lighter than the other, we know it's defective. If the two marbles are equal in weight, then the third marble in the group is defective.

Solution #5: You cut the chain with two cuts to make three pieces: one piece is a single link, the second piece is two links, and the third piece is four links. In other words, you make the first cut between the first and second links, and the second cut between the third and fourth links. Now, on the first day, you pay the employee with the single-link piece. On the second day, you take back the single-link piece and give the employee the two-link piece. On the third day, you give the employee the single-link piece, so he now has been paid three gold links. On the fourth day, you take back the single-link and two-link pieces, and give him the four-link piece. On the fifth day, you give him the single-link piece, so he now has five links. On the sixth day, you take back the single link and give him the two-link piece, so he now has six links. On the seventh day, you give him the remaining link.

Are we havin' fun yet?

No comments: