Enigma 227: Set a tease

Another letters for numbers problem. It may leave you at sea, for it is a tease to keep you on your toes. You see, each letter stands for a different digit each time it appears.

What is a TEASE?

Note: I am waiting for a phone line to be connected at my new house, so I only have sporadic access to the internet at the moment. The latest estimate is that I’ll have a connection by the end of October 2014.

A similar program will work with the new version of the SubstitutedDivision() solver in the enigma.py library, although there are some minor differences (the intermediate subtraction sums are included directly in the returned solutions, but the new version does include empty intermediates, and we can also provide a check() function to the solver, to select the required solution).

Here is a version of the above program that works with the latest version of the SubstitutedDivision() solver. It runs in 336ms.

But using the distinct parameter to the new SubstitutedDivision() solver (which is inherited from the SubstitutedExpression() solver) we can specify the collections of symbols that have to take on distinct values amongst their own group. I use lower case letters to stand for the symbols in the division sum, and then group together symbols that correspond to the same upper case letter in the puzzle statement.

Instead of requiring a specialised program the puzzle can be solved by presenting the right arguments to the SubstitutedDivision() solver. Here is the necessary run file. It executes in 113ms.