in reply to Re: Odd Ball Challenge (details)
in thread Odd Ball Challenge

tye,
I said the balls are identical in appearance, I didn't say that there wasn't anyway of keeping track of which ball was which. A human could do it by keeping the groups separate when not being weighed and always put them on the balance the same way, let's just assume your code can too via array indices, hash keys, or method X.

This isn't a Perl6 challenge. As I said, All solutions, to include Perl6, are welcome. I understand that it is a bit of work for no immediate tangible reward so don't worry about not offering or attempting a solution-generator. Something to think about on a rainy day (-;

Cheers - L~R

Replies are listed 'Best First'.
Re^3: Odd Ball Challenge (details)
by tye (Sage) on Jun 24, 2005 at 13:42 UTC

    Of course you can keep balls segregated when not being weighed. Otherwise, the challenge would be hopeless. But you can't, without a change similar to one I mentioned, confidently keep balls segregated from each other on the same side of the balance across a weighing. That limitation prevents some strategies. Coding with or without that limitation will give different sets of solutions. And there is at least one initial division of balls for the first weighing of your problem that either leads to a solution or doesn't depending on whether you accept that limitation.

    "All solutions to include Perl6" means only Perl6 solutions are welcome. With the comma, your sentence just doesn't make sense to me. :) Thanks for clarifying.

    - tye        

      tye,
      Ok - UNCLE! You can assume that the balls will remain in place when on the balance and hence allows you to "number" the balls without affecting their weight.

      Cheers - L~R