On Aug 24, 2010, at 11:04 PM, Prakash N Murthy <[email protected]> wrote:
I came across Project Euler recently as a good way to learn Ruby; solving the mathematical problems there has been very addictive!Ran into issues with some of the problems where my brute-force method of programmatically analyzing every possible path/option did not work- the program ran for more than a day before I lost patience. So was wondering if anyone one else in this group has been bitten by this bug before and could suggest some alternate approaches to these problems.A couple of problems that I have difficulty solving:
I and a coworker here have been fighting the Euler fight for several years now (only 13 problems to go for Level 3!) using Ruby. Apparently we have solved both of your problems, but unfortunately we didn't start keeping copies of the Ruby scripts around until semi-recently. I'll have a go at them again with the 'help' of the forum answers and reply to you privately if I get something.
FWIW, an embarrassing number of recent 'wins' have been achieved not through elegance or insight, but by parallelizing the solution and running 7 copies on my 8-core work machine until it finishes. :p Sadly/thankfully, I think we've finally hit problems where this order-of-magnitude gain--and our willingness to sometimes wait overnight for a solution--are no longer sufficient. For example, our latest brute-force attempt at problem #66 ran over the weekend and got stuck on step 149/1000.
--
(-, /\ \/ / /\/_______________________________________________ Bdrg-members mailing list [email protected] http://rubyforge.org/mailman/listinfo/bdrg-members
