|
Enigma 1474
Posted on: Friday 21/12, 2007; 4:40 PM
There is a typographical error in the published Enigma, but I will proceed as if everything is OK, and then identify and correct the likely error.
Define the grid.
Insert the corrected form of the grid here once it has been identified.
Convert the letters to numbers and convert the unknowns to automatically generated variable names, which Mathematica generates in the form $n, where the integer index is incremented for each new variable name that is generated.
Extract the 27 variable names that have been generated.
Construct the 9 row constraints.
Construct the 9 column constraints.
Construct the 9 box constraints.
Construct the inequalities that must be satisfied by each of the unknown variables, where each is treated independently of whatever values that the other variables have. For each variable x this is done by removing all mention of the other 26 variables, and then solving the residual inequality constraints subject to the additional constraints that the variable x must be an integer and lie in the range 1≤x≤9.
There are two observations here: 1. Despite the fact that the variables have been treated independently there is only one logical OR in the output above. This shows that the Enigma is not very cleverly constructed. 2. Some of the variables have no solution, despite the additional wriggle room that is allowed by treating the variables independently. This shows that the Enigma has been posed incorrectly. Perhaps there was a typographical error in the published grid.
Nevertheless, let us proceed as if there was no problem.
Convert the 2 "solutions" to rules.
Use the rules to format each "solution" as a grid.
It is likely that the matrix element in the 5th row and 4th column is incorrect, because it lies at the intersection of 3 regions (a row, a column, and a box) all of which have a variable that has no solution.
From here on down I change the grid to what I believe is the correct form.
The simplest change that I can find to coax out a solution is to move the "H" in the 5th row and 4th column of the grid to the empty position at the opposite corner of its box. Note that it is not enough to change the "H" to a different letter. This alters the grid as follows:
When this new version of the grid is fed through the procedure above it eventually gives the following unique solution:
There is no guarantee that this is the correct solution to the (un)published Enigma, but it is a likely solution given the simplicity of the error correction that I have done.
Permalink Notebook
|