[algogeeks] Re: Cryptarithmetic problems

2006-11-04 Thread Arun prasath N
Max runnning time is 10! Given any set letters could only be assigned values of {0,1,...9}. thanks Arun prasath N On Nov 2, 9:43 pm, "Lego Haryanto" <[EMAIL PROTECTED]> wrote: > A "quicker" brute force (not the one with 10! complexity) is by doing a > recursion starting from the rightmost digit.

[algogeeks] Re: Cryptarithmetic problems

2006-11-02 Thread Lego Haryanto
A "quicker" brute force (not the one with 10! complexity) is by doing a recursion starting from the rightmost digit.   The number of levels in the recursion is the same as the longest digits (in the sample case: 5, which is length of MONEY).  After we processed 5 levels, we know we got a solution.