From: "Brian Schröder" Date: 2004-11-15T18:44:27+09:00 Subject: Re: [SOLUTION] Countdown (#7) On Mon, 15 Nov 2004 08:48:24 +0900 Dennis Ranke wrote: > Here is a small update to my solution. A simple optimization speeds up > the solver by a factor of nearly two. Now I'm down to 5 seconds for the > worst case on this machine :) > > [snip] Interesting read. I never thought about building the terms bottom up instead of top down ;). I was in such a recursive mindset. I hope your ideas don't force me to rethink my solutions and spend even more time that I don't have ;). One thing I noticed is, that you used: > best_difference = (@target * 1000).abs this shurely works but is cheating. Why not use: > best_difference = 1.0/0.0 That would really be bigger than any other difference you'd encounter. It is not possible to find all solutions, using your programm, did I understand this right? Best Regards, Brian -- Brian Schr�der http://www.brian-schroeder.de/