Solution to the puzzle Informatix.

Informatix is one of the interesting puzzles of the Melbourne University Puzzle Hunt 2013 competition. The plot of the game that year was based on characters from the Asterix & Obelix comics, and each of its puzzles was related to one of the inhabitants of the Gaul village. Informatix is one of those inhabitants. His puzzle was part of the second act of the game. The puzzle was preceded by an image of this character, as well as a brief description of him: "An expert in processing and retrieving data, Informatix always has a tendency to overcomplicate matters."

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.

In addition, the second page contained a description of the network's functioning when performing a concrete task.

In the computer network pictured, print jobs are routed between terminals in an undeniably complicated fashion as described by the specification table below. Yet, amidst all this obfuscation, the following outcomes were satisfied:
    • of the 14 unique print jobs initiated across the terminals, 12 of them arrived at a printer with
their job number ultimately unchanged;
    • the remaining 2 print jobs arrived back at their original terminal, again with job number
ultimately unchanged.
    • all (non-error returning) routing operations were applied at least once by one or more of the
print jobs
    • at all times, the print job number remained an integer bounded between 1 and 99

The author of this interesting puzzle is Andrew Elvey Price, who in 2013 was Vice-President and then President of the Melbourne University Mathematics and Statistics Society (MUMS).

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(1), TRIANGULAR(1), ELECTRON(9), PRINTER(7), FAIL.
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.

PRONIC(2), 3MULTIPLE(20), #ERROR.
PRONIC(6), 3MULTIPLE(24), RESIDUE(8), 3MULTIPLE(18), RESIDUE(6), PRINTER(6), SUCCESS.
PRONIC(12), 3MULTIPLE(30), RESIDUE(10), HAPPY(3628800), FAIL.

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.

3MULTIPLE(3), RESIDUE(1), HAPPY(1), SQUARE(4), TRIANGULAR(2), PRINTER(11), FAIL.
3MULTIPLE(12), RESIDUE(4), HAPPY(24), PRINTER(12), SUCCESS.

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.

CATALAN(1), ABUNDANT(5), EVEN(35), PRINTER(10), FAIL.
CATALAN(2), ABUNDANT(6), EVEN(42), FACTORS(39), PRINTER(0), FAIL.
CATALAN(5), ABUNDANT(9), EVEN(63), PRINTER(2), FAIL.
CATALAN(14), ABUNDANT(18), PRONIC(72), 3MULTIPLE(90), RESIDUE(30), PRINTER(14), SUCCESS.

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.

TRIANGULAR(1), ELECTRON(9), PRINTER(7), FAIL.
TRIANGULAR(3), ELECTRON(11), PRINTER(9), FAIL.
TRIANGULAR(10), ELECTRON(18), DOUBLE(7), FACTORS(6), PRINTER(10), SUCCESS.

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.

HAPPY(1), SQUARE(4), TRIANGULAR(2), PRINTER(11), FAIL.
HAPPY(7), SQUARE(10), #ERROR.
HAPPY(13), SQUARE(16), TRIANGULAR(4), PRINTER(13), SUCCESS.

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(4), FACTORS(1), REPDIGIT(1), DOUBLE(4), FACTORS(3), CUBIC(4), EVEN(4), SUCCESS.
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(2), DOUBLE(2), FACTORS(1), REPDIGIT(1), DOUBLE(4), FACTORS(3), CUBIC(4), EVEN(4), …, FAIL.
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(1), EVEN(7), PRINTER(9), FAIL.
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.

FACTORS(1), REPDIGIT(1), DOUBLE(4), PRINTER(1), SUCCESS.
FACTORS(3), CUBIC(4), EVEN(4), …, FAIL.
FACTORS(5), CUBIC(6), EVEN(4), …, FAIL.
FACTORS(7), CUBIC(8), DOUBLE(16), PRINTER(13), FAIL.

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. 

RESIDUE(3), PRINTER(5), FAIL.
RESIDUE(5), 3MULTIPLE(15), RESIDUE(5), SUCCESS.
RESIDUE(7), HAPPY(5040), FAIL.

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.

DOUBLE(3), FACTORS(2), CUBIC(3), EVEN(1), PRINTER(3), SUCCESS.
DOUBLE(7), FACTORS(6), PRINTER(10), FAIL.

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.

FACTORS(1), REPDIGIT(1), DOUBLE(4), PRINTER(1).
ABUNDANT(2), EVEN(14), FACTORS(11), CUBIC(12), EVEN(12), FACTORS(9), PRINTER(2).
DOUBLE(3), FACTORS(2), CUBIC(3), EVEN(1), PRINTER(3).
EVEN(4), FACTORS(1), REPDIGIT(1), DOUBLE(4), FACTORS(3), CUBIC(4), EVEN(4).
RESIDUE(5), 3MULTIPLE(15), RESIDUE(5).
PRONIC(6), 3MULTIPLE(24), RESIDUE(8), 3MULTIPLE(18), RESIDUE(6), PRINTER(6).
CUBIC(7), EVEN(5), RPINTER(7).
ELECTRON(8), DOUBLE(8), FACTORS(7), CUBIC(8), DOUBLE(16), FACTORS(15), PRINTER(8).
SQUARE(9), TRIANGULAR(3), ELECTRON(11), PRINTER(9).
TRIANGULAR(10), ELECTRON(18), DOUBLE(7), FACTORS(6), PRINTER(10).
REPDIGIT(11), PRINTER(11).
3MULTIPLE(12), RESIDUE(4), HAPPY(24), PRINTER(12).
HAPPY(13), SQUARE(16), TRIANGULAR(4), PRINTER(13).
CATALAN(14), ABUNDANT(18), PRONIC(72), 3MULTIPLE(90), RESIDUE(30), PRINTER(14).

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

Popular posts from this blog

Solution to the puzzle Sleuth.

Cicada 3301 - solution.

Solution to the puzzle Cat Walk.