# An algebraist's code lock

Distinguished algebra professor Max P. Lusz was known to be working on the problem to determine the last digit of $$\pi$$. Ten years after his passing , experts are now allowed to open his safe. The safe could be opened if the following riddle was solved, which was on a piece of paper found in his mathematical workings:

$$\pmatrix{ 3 & 3 & -2 & -1 & 0\\ -2 & 1 & 1 & 1 & -2\\ -1 & -1 & 0 & 2 & 3\\ 0 & 1 & -2 & 0 & -1\\ 1 & 3 & 3 & 1 & 4 } \pmatrix{a\\b\\c\\d\\e}=\pmatrix{3\\1\\4\\1\\5}.$$

On the backside, the following nebulous hints were found: $$1+2=2,$$ $$1\cdot 1 = 2.$$ Can you deduce the secret combination?

Facts obvious to these experts (but nevertheless they are unable to solve the riddle):

1. The system seems to be a system of linear equations.
2. These unknowns are single digits, i.e., from 0 ... 9.
• There seems to be a dot product operator lingering at the end of the matrix equation. Is that part of the puzzle? If it is, the presence of some unknown operand on the right hand side to go with the variable set on the left hand side seems like an easy recipe for infinitely many solutions. – Klaycon Jan 28 '20 at 20:46
• @Klaycon I think it may just be punctuation, a full stop (in British English) / period (in US English) marking the end of a sentence. – Gareth McCaughan Jan 28 '20 at 21:34
• I thought that the trick was to replace addition with multiplication and vice versa, but that doesn't work, either – Don Thousand Jan 28 '20 at 22:58
• Clearly, the hints are not actually meant to be used directly, since any solution could be generated this way. So the clues must mean something not mathematical. – Don Thousand Jan 28 '20 at 23:05
• @Klaycon that is just punctuation – daw Jan 29 '20 at 5:55

The biggest clue here is

the professor's name, which we should read phonetically as "max plus".

This suggests that we interpret the "nebulous hints" as

indicating that we perform our "matrix multiplication" replacing addition with max() and multiplication with __+__. (We'll take explicit negation as meaning what it says, though, because the max operation doesn't admit inverses.)

So our five equations are

max(a+3,b+3,c-2,d-2,e) = 3
max(a-2,b+1,c+1,d+1,e-2) = 1
max(a-1,b-1,c,d+2,e+3) = 4
max(a,b+1,c-2,d,e-1) = 1
max(a+1,b+3,c+3,d+1,e+4) = 5.

I'm not sure whether there's a standard systematic way to solve these, but let's see what we can do ad hoc. First,

consider the fourth and fifth equations. The five arguments to max() have been increased by 1,2,5,1,5 respectively, and the result has increased by 4. It follows that (1) the maxes aren't in the same place both times (else the increase in result would have been 1, 2, or 5), (2) the max in the fourth equation isn't c-2 or e-1 (else the increase in result would have been at least 5), (3) the max in the fifth equation is c+3 or e+4 (else the increase in result would have been at most 2). So either c=2 or e=1. The former is impossible because of the second equation. So e=1.

Now

our equations become, after a little simplification,
max(a+3,b+3,c-2,d-2) = 3
max(a-2,b+1,c+1,d+1) = 1
max(a-1,b-1,c,d+2,4) = 4 [i.e., a<=5, b<=5, c<=4, d<=2]
max(a,b+1,c-2,d) = 1
max(a+1,b+3,c+3,d+1,5) = 5 [i.e., a<=4, b<=2, c<=2, d<=4].
So those two "already saturated" equations tell us that a<=4, b<=2, c<=2, d<=2. The first equation strengthens this a little: a<=0, b<=0. Since the unknowns are single digits, this in fact implies a=b=0.

So now we have

a=0, b=0, e=1; c<=2, d<=2
max(3,c-2,d-2) = 3 [i.e., c<=5, d<=5]
max(-1,c+1,d+1) = 1 [i.e., c<=0, d<=0]
max(1,c-2,d) = 1 [i.e., c<=3, d<=1]

from which we find

that our solution is a=0, b=0, c=0, d=0, e=1. (It's easy to verify that this does work.)

So it seems that the secret combination may just be

00001.