Re: Riddle Solver send+more=money



Djamé <djame@xxxxxxxxxxxxxxxxxxxx> writes:

> Some times ago, I've found a very interesting page (I archived it
> obecause I'm fed up to loose all the cool pages every year) about the
> magic of DCG, you'll find some cool way to solve the SEND money problem..

Again, why go for the "cool way"? You can get a solution of this
problem in no time by using the SICStus constraint solver, for
example. But it seems to me utterly pointless to strive for elegance
in the solution of trivial problems. What is great about Prolog is
that you can quickly write a program that uses a mindless
generate-and-test algorithm to solve the problem. In other cases,
of course, you need a better algorithm for solving constraint
problems in reasonable time, and such algorithms are usually also
fairly easy to implement in Prolog. But what's the point of finding
an elegant and efficient algorithm that solves a particular problem
if an idiot algorithm solves it in a few seconds anyway?
.



Relevant Pages

  • Re: Riddle Solver send+more=money
    ... obecause I'm fed up to loose all the cool pages every year) about the magic of DCG, you'll find some cool way to solve the SEND money problem.. ... But it seems to me utterly pointless to strive for elegance ... generate-and-test algorithm to solve the problem. ... fairly easy to implement in Prolog. ...
    (comp.lang.prolog)
  • Re: Balanced trees vs. B-trees
    ... > which is are more elegant than that of Red-Black trees. ... > This may be affected by the algorithm description that I have used: ... If you want to see the elegance of red-black trees, ... view them as an efficient implementation of 2-3-4 trees. ...
    (comp.programming)
  • Re: Will NIST fix their tables?
    ... Robin Chapman, www.maths.ex.ac.uk/~rjc/rjc.html ... "Elegance is an algorithm" ... Iain M. Banks, _The Algebraist_ ...
    (sci.math)
  • Re: Wheres respect? was Re: Corrective interpretation of real numbers
    ... "Elegance is an algorithm" ... Iain M. Banks, _The Algebraist_ ...
    (sci.math)
  • Re: Proof of ordered powerset
    ... Robin Chapman, www.maths.ex.ac.uk/~rjc/rjc.html ... "Elegance is an algorithm" ...
    (sci.math)