Post Reply 
Little math challenge (no complete automatism allowed)
04-29-2018, 02:22 PM
Post: #9
RE: Little math challenge (no complete automatism allowed)
(04-29-2018 06:45 AM)pier4r Wrote:  Nice Valentin!

I think you're missing a comma but thanks.

Quote:does your program check the entire search space (dropping combinations that overflow the limit)?

Yes. Else you'd not be able to guarantee finding each and every solution.

Quote:In short is it brute forcing or is it smarter than brute force?

It's "smarts" consist in a simple depth-first iterative search with early pruning, which allows it to find and display all 29265 solutions in reasonable time despite dealing with 27 variables which can each individually go from 0 (doesn't appear in the solution) to 27, without using either FOR-NEXT loops or REPEAT/LOOP/WHILE constructs, or (Heaven forbid !) GOTO, all in just 5 lines.

Whether that's smart enough it's up to you (New York, New York ...)

Regards.
V.
.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little math challenge (no complete automatism allowed) - Valentin Albillo - 04-29-2018 02:22 PM



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