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

zby,
If you find the right string you need only print it.

Of course - but that's not the challenge. I have repeatedly indicated you (the human) is not to solve the riddle and then translate that solution to code. The challenge is to start with an objective and rules and figure out how to achieve the objective.

I really don't see how I can be any clearer. I already gave the Challenge: Setting Sun Puzzle example, so let me try another one.

You have a rubik's cube in a given starting position. The goal is to get the rubik's cube into a new desired position (all colors matching on all sides) using only legal moves. The hard part is finding the series of moves that results in the goal being achieved.

You wouldn't find the right series of steps and then write a program that just regurgitates that output. You would write a program that finds the right series of steps for you and tells you how to do it. That is the challenge.

Cheers - L~R

Replies are listed 'Best First'.
Re^9: Odd Ball Challenge
by zby (Vicar) on Jun 24, 2005 at 14:58 UTC
    If you want to make this precise you need to have a definition that would differentiate between finding the right series of steps and writing program for finding the right series of steps. How do you decide which one is more difficult?
      zby,
      The challenge is to write a program for finding the right series of steps. I guess what you are saying is where do I draw the lines between what I "know" and what I let the program figure out on its own.

      For instance, it is pointless to weigh groups that have an unequal number of balls since it will not lead to any useful information. Is it ok to add that logic?

      I guess I just don't know how to answer that. The two solutions I know that work require dividing the 12 balls into 3 groups of 4. I wouldn't want a program that didn't consider other sizes unless there was some mathematical way of knowing that no other group/sizes were possible. I however wouldn't think anything of a solution that didn't consider groups of unequal number of balls since they would never be expected to balance.

      Sorry I can't give an exhaustive list of things that are ok and not ok. I am not interested in a translation of a known solution to code though.

      Cheers - L~R

        Here's one way to answer it: make the problem more general. Ask for a program that will find the least number of weighings to find the odd ball among n, where n is given as a parameter.

        Now I suspect the answer can be reduced to a simple formula, in which case someone might derive the formula and write a program to calculate only that.

        If that doesn't fall within the parameters of what you're looking for, you will then need to specify much more clearly what you do and don't want to allow.

        I suspect the purpose is to show different people's approaches to solving this sort of thing, and I (and I suspect many of the people that would be interested in this sort of puzzle) would always start off with: "the simplistic approach is to traverse the entire search space, but combinatorial explosion will scupper that pretty quickly; so let's sit down with pencil and paper and see what logic or maths I can apply to reduce that search space". With this approach, finding a formula is an ideal solution: it reduces the search space to one, and so if I found such a formula I'd post just that instead of writing the program at all.

        Of course if no-one knows (or can find) a formula, this secondary issue might not arise.

        Hugo