Hi i came across this puzzle which is a subset of famous kind of word and numbers based puzzles called Cryptarithms. Say you have an expression as
S E N D + M O R E = M O N E Y
Now the interesting part there is that, each alphabet is representing a unique digit from 0-9. I wanted to write a generalized solver, but i ended up writing a brute forced solution for it. Any takers as how can i solve it?
I think it can be solved using predicate logic or set theory. And i'm particularly interested in finding C# or Python based solutions. Any one.?
So we have solved for all the letters! SEND + MORE = 9567 + 1085 = 10652.
Ideally, a good cryptarithmetic puzzle must have only one solution[2]. We derogate from this tradition. The above example has multiple solutions.
At PyCon 2009 Raymond Hettinger talked about AI programing in Python, and covered Cryptarithms.
The video of entire talk can be seen here, and cookbook with Python 2.6 solution can be found at this link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With