This question already has an answer here:

An assignment given to us as part of our college course in AI requires us to solve a cryptarithmetic puzzle. The problem is I can't find my way around puzzles - and it was never a problem until now, because courses which I took didn't have assignments where I had to solve a puzzle. I am looking for a general method to solve a puzzle, such as

+   MORE

Now, I don't know how that expression makes sense. So, the first thing which wish to understand is to how to make sense out of this, and then the next thing is how to solve it. It would be great if you could explain what is going on at each step.


marked as duplicate by Aza Oct 27 '15 at 21:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ I don't even know what is there to solve this. Are we to assign values 0-9 to letters so the expression above makes sense? $\endgroup$ – Fimpellizieri Oct 27 '15 at 20:30
  • 1
    $\begingroup$ A good way to start is to determine what possibilities the variables can have. For instance, which value could M take? Given a fixed value for M, you will end up with a two possibilites on S. Continuing to eliminate possible values (by contradiction), you will finally end up with a unique solution for all variables. This is a standard textbook problem and you can find a solution at mathforum.org/library/drmath/view/57968.html. $\endgroup$ – Carl Löndahl Oct 27 '15 at 20:44
  • 1
    $\begingroup$ The linked page from @CarlLöndahl is a good walkthrough for how to solve this particular problem and you should be able to extrapolate the logic from there. However, it may be tricky to translate that into an AI program. I presume that brute force is not allowed? $\endgroup$ – Engineer Toast Oct 27 '15 at 20:54
  • $\begingroup$ I think that building a search tree and use backtracking would be a proper way to solve the problem. $\endgroup$ – Carl Löndahl Oct 27 '15 at 20:57
  • $\begingroup$ Welcome to Puzzling Stack Exchange! Since this question looks like it's been asked before, I've marked it as a duplicate. Feel free to look it over, as well as look through out other verbal arithmetic questions. If you think you can edit your question to be substantially different, though, definitely feel free to do so! $\endgroup$ – Aza Oct 27 '15 at 21:41

Browse other questions tagged or ask your own question.