in reply to Re: Odd Ball Challenge
in thread Odd Ball Challenge

greenFox,
The question was a restatement of the riddle itself and I probably did a poor job of capturing it. Let me be a little more verbose. Each time you use the balance, you are going to be comparing 2 groups (left and right) which may or may not represent the total number of balls (12). That's the part about 12 balls in groups of 2. You can only use the balance 3 times.

The problem as I see it can be attacked at least 2 ways. The first is just to exhaustively calculate all possible groupings which should result in balanced pairs over 3 tries and sift through the aftermath attempting to pick a set that can answer the riddle. The second is to assess what information is gained after each weighing and determine which ways might lead to a correct solution (which will require backtracking).

Personally, I have no idea how to go about writing this code and am not even sure if the approaches I described are the right ones to use. It was keeping me awake the other night so I figured if it got under my skin my fellow monks would like it too.

Cheers - L~R