Solution to the puzzle Informatix.
The puzzle itself was a network made up of terminals and printers. The first page of the task contained a graphical representation of this network. The second page of the task contained a table describing transitions between network elements. Each row of this table described one of the 14 terminals. The table had 4 columns. The first column contained the names of the terminals. The second column contained a condition, that should have been checked for the print job's number, when it arrived at the terminal. The third column contained operations on the print job's number, that should have been performed after checking the condition. The fourth column contained the network elements to which the print job had to be sent after processing in the terminal.
Obviously, the initial numbers of print jobs are simply a series of numbers from 1 to 14. Therefore, to solve the puzzle it is necessary to assign a unique number from 1 to 14 to each of the 14 terminals, so that the result of the network operation matches the one described in the puzzle.
This voluminous task can be divided into small subtasks: we will assign print jobs to individual terminals one by one in a specific order. Let's start with terminals, that return an error, if the number does not match the condition, since for them there are not so many possible numbers.
For the terminal SQUARE we can only use numbers in the series that are squares: 1, 4 and 9. In this case we will get the following network results.
SQUARE(4), TRIANGULAR(2), PRINTER(11), FAIL.
SQUARE(9), TRIANGULAR(3), ELECTRON(11), PRINTER(9), SUCCESS.
We have found the only possible print job number for the terminal SQUARE, it is 9.
For the terminal PRONIC we can only use rectangular numbers. In our series these are 2, 6 and 12.
We have found the only possible print job number for the terminal PRONIC, it is 6.
For the terminal 3MULTIPLE we can only use numbers that are multiples of three. Among the numbers in the series, that we have not yet used, these are 3 and 12.
We have found the only possible print job number for the terminal 3MULTIPLE, it is 12.
For the terminal CATALAN we can only use Catalan numbers. These in our series are 1, 2, 5 and 14.
We have found the only possible print job number for the terminal CATALAN, it is 14.
Consider next the terminal TRIANGULAR, which checks whether the number n is triangular. If this condition is not met, the terminal will add 9 to n and then send the result to the PRINTER. Obviously, in this case we will not get the original number, which contradicts the conditions of the task. This means, that for this terminal it is enough to consider only the triangular numbers of the series. Of the numbers we have left, these are 1, 3 and 10.
We have found the only possible print job number for the terminal TRIANGULAR, it is 10.
Consider now the terminal HAPPY, which checks whether the number n meets the definition of a happy number. If the condition is not met, the terminal will divide n by 2 and then send the result to the PRINTER. Obviously, in this case we will not get the original number. This means, that for this terminal it is enough to consider only the happy numbers we currently have: 1, 7 and 13.
We have found the only possible print job number for the terminal HAPPY, it is 13.
Let's move on to the terminal EVEN, which checks whether the number n is even. If this condition is not met, the terminal will find the remainder of dividing n by 9, add 2 to it and then send the result to the PRINTER. Obviously, in this case we will not get the original number. This means, that for this terminal it is enough to consider only the remaining even numbers: 2, 4 and 8. It is easy to establish, that the number 2 is not suitable for this terminal.
EVEN(2), FACTORS(-1), FAIL.
Next, it turns out that the sequences for the numbers 4 and 8 will at some point pass through the terminal REPDIGIT, and in this case n will be equal to one: REPDIGIT(1). If we assume, that the condition of REPDIGIT for n = 1 is not satisfied, then the next stage of both sequences will be PRINTER(1), which means that none of the remaining numbers in the series are suitable for the terminal EVEN, which contradicts the conditions of the task. Therefore, the condition of the terminal REPDIGIT for n = 1 is satisfied. This is only possible, if the print job number for the terminal REPDIGIT is 11.
REPDIGIT(11), PRINTER(11), SUCCESS.
Thus, we have found the print job number for the terminal REPDIGIT, which is 11. Now we can return to the terminal EVEN.
EVEN(8), FACTORS(5), CUBIC(6), EVEN(4), …, FAIL.
We have found the only possible print job number for the terminal EVEN, it is 4.
Consider next the terminal ELECTRON, which checks whether the number n corresponds to the number of electrons in one of the atom's electron shells. If this condition is not met, the terminal will subtract 2 from n and then send the result to the PRINTER. Obviously, in this case we will not get the original number. This means, that it's enough to consider only those numbers in the series, that satisfy the terminal condition: 2 and 8.
ELECTRON(8), DOUBLE(8), FACTORS(7), CUBIC(8), DOUBLE(16), FACTORS(15), PRINTER(8), SUCCESS.
We have found the only possible print job number for the terminal ELECTRON, it is 8.
At the moment we have 5 numbers in the series, that we have not used yet: 1,2,3,5 and 7. Let's try each of them for the terminal ABUNDANT.
ABUNDANT(2), EVEN(14), FACTORS(11), CUBIC(12), EVEN(12), FACTORS(9), PRINTER(2), SUCCESS.
ABUNDANT(3), EVEN(21), PRINTER(5), FAIL.
ABUNDANT(5), EVEN(35), PRINTER(10), FAIL.
ABUNDANT(7), EVEN(49), PRINTER(6), FAIL.
We have found the only possible print job number for the terminal ABUNDANT, it is 2.
We have numbers 1,3,5 and 7 left. Let's try each of them for the terminal FACTORS.
We have found the only possible print job number for the terminal FACTORS, it is 1.
We are left with numbers 3,5 and 7. Let's try each of them for the terminal RESIDUE.
We have found the only possible print job number for the terminal RESIDUE, it is 5.
We are left with numbers 3 and 7. Let's try each of them for the terminal DOUBLE.
We have found the only possible print job number for the terminal DOUBLE, it is 3.
Now all that remains is to use the number 7 for the remaining terminal CUBIC.
CUBIC(7), EVEN(5), RPINTER(7), SUCCESS.
Thus, we solved the problem and obtained the execution sequence for each print job.
At this point we have not yet used the graphical representation of the network from the first page of the task. Notably, it allows you to visually track the progress of each print job. It is also interesting that the labels of all terminals, with the exception of one, are written in a fancy way, using rotations and reflections.
If you graphically depict the progress of each print job, and then rotate and/or flip the diagram, so that the label of its starting terminal can be read correctly, you can see one of the letters of the English alphabet. Together these letters, arranged according to their print job numbers, form a concept from the field of mathematics - LAMBDA CALCULUS. This is the answer to the puzzle.
Comments
Post a Comment