Re:My Favorite Math Problem
by kazinator on Wednesday November 24, 2021 @03:10PM
(#29334529)
In that case, we can easily add these constraints to look for another solution, like this --- but that is a poor way:
Better just exclude the value 0 from the amb expression for those digits, to reduce the search space:
So:
:)
[ Parent
| on HN ]
Since we have a math proof that J is 6 in all possible solutions, which works without discovering the other values, we might as well bind (J 6); the purpose is to get the other letters. Binding J cuts down the execution time by close to an order of magnitude.