Utility Mill

weighing_balls

Solve the '12 balls, one is odd' riddle (or for any other number of balls)


Output


Instructions / Discussion

From http://www.mathsisfun.com/pool_balls_solution.html :

The Problem: You have 12 balls identical in size and appearance but 1 is an odd weight (could be either light or heavy). You have a set scales (balance) which will give 3 possible readings: Left = Right, Left > Right or Left < Right (ie Left and Right have equal weight, Left is Heavier, or Left is Lighter). You have only 3 chances to weigh the balls in any combination using the scales. Determine which ball is the odd one and if it's heavier or lighter than the rest. How do you do it?

Note: You can choose the number of balls which influences the number of required weighings (13..39 balls: 4 weighings max., 40..120 balls: 5 weighings max.).

Utility Mill is another wonderful Blended Technologies project.

copyright, owned and operated by Blended Technologies LLC.

Powered by Python and the ineffable Web.py