Challenge: sum of squares. Let's break 299

01202018, 08:19 PM
Post: #16




RE: Challenge: sum of squares. Let's break 299
(01202018 05:43 PM)Thomas Okken Wrote: What's NPcomplete is the problem of finding Hamilton paths in graphs in general. For certain specific classes of graphs, that doesn't necessarily apply, like graphs where no node connects to more than two edges. The lady in the video, who wrote the program that checked all cases up to 299, must have found something to exploit, because with the apparently roughly exponential way the CPU time in my algorithm increases, it wouldn't get to 299 in a million years, even if I parallellized the heck out of it and ran it on the GPU clusters at work. (I should let it run a bit longer than I have so far to see how the CPU usage evolves, though.) A straightforward backtracking algorithm will eventually bog down no matter how much computational power you throw at it, that's just the nature of combinatorial problems. I would think that Simulated Annealing or one of its many variants would be more likely to succeed. The objective function would be simply the number of pair sums that are perfect squares. John 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)