finding the CSP and
c4 c3 c2 c1
S E N D
M O R E
M O N E Y
very time consuming and less easy to solve.
I choose C4 and M = 1.
Then need to choose c3. If We choose wrong here, It takes very long to realize it (for exam purposes this is critical - and I feel I might be missing something here, because in order to select the value that is least constraining, we need to first assign the value and check its results)
suppose I choose c3 = 0,
the S + M = 0 can be completed by S = 9. Thus 9 + 1 = 10 carry 1.
if C3 = 1, then 8 + 1 + C3 = 10 carry 1
there arent other options because we cannot have O = 1 and cannot obtain a value of 12 in any way.
Now which one to choose?
I chose C3 = 0, and now we need to choose c2. I can see this needs to be 1 else E = N (because O = zero)
Now we need to choose C4, but I can find no intelligent way of filling this without still having to then first check all its results. (hoping you might have some advice here)
I have tried just going on by selecting E, but this also leads to numerous iterations. Now in the back of mind is this: If I can find no solution, then I need to backtrack to where I chose C3=0 and rather try C3 = 1 - which then results in the same exercise again.
Based on the algorithm in R&N, the choosing of Variables is quite easy, choosing the value requires us to check how the other variables are constrained as result (how much there domain shrinks). Less us assume such assignment restricts 2 variables x and y to domains (1..5) and (2..6), then we would have to fill these as well until we find a NO solution and then backtrack up the tree.
Any hints?
Danie van Eeden
------------------------