in reply to Re: Coming soon: Algorithm::Loops
in thread Coming soon: Algorithm::Loops

I think you missed the hint in the code:

## $expr= "()" if @_ < 6;
I noticed that there were only two numbers with unique solutions involving 6 terms. So we agreed that a number with only one solution would make the problem harder. I felt that more terms in that solution would also make it harder. But my statement of the puzzle was pretty vague.

[ And sure you can simplify the code if you hard-code three loops and hard-code the permutations. It runs fast enough that it'd be interesting to look at 4-digit terms next... ;) ]

                - tye

Replies are listed 'Best First'.
Re: Coming soon: Algorithm::Loops (puzzle2)
by Abigail-II (Bishop) on Apr 12, 2003 at 23:25 UTC
    Sorry, I hadn't studied the code well enough that you intended to find years with a unique solution, and the solution requiring six terms. A modified version of my program finds 5106 and 5328.

    Also, my modified versions no longer has three digits hardcoded. You can now give the number of digits on the command line - you can also give the minimum number of terms in the unique solution, and the range of years to investigate. Unfortunally, doing it for 4 digits takes a long time. There are about 12 billion sums to consider, compared to about 14 thousand for 3 digits.

    Abigail