# Locked Door Number Puzzle

I'm supposed to make a delivery to a crazed botanist. In case you're curious, the shipping manifest is:

Name: Canoga
Weight:  9,723 g
Ref #: 7943
Store Code: 6979
Price: 1,225 won

Name: Khenaizi
Weight:  1,444 g
Ref #: 1331
Store Code: 2342
Price: 4,221 won

Name: Winesap
Weight:  2,152 g
Ref #: 8832
Store Code: 6613
Price: 6,372 won

Name: Ataulfo
Weight:  3,321 g
Ref #: 1443
Store Code: 3224
Price: 2,241 won


They told me the password to the front door is:

 -15    -13.06        -1    -4.13
3     -2.67     -2.67       15
4.5    -12.67    -11.75    -13.5
1.25         1        35       -9


When I arrived, I found a screen with a 4x4 grid, and four buttons below labeled

A S M D


How the heck am I supposed to get in? If this stuff isn't refrigerated, it'll go to waste.

Hint 1

Determine the sequence of button presses.

Hint 2

What type of item is each delivery?

Hint 3

A, S, M, and D represent basic mathematical operations.

• I can relate Khenaizi, Winesap and Ataulfo to a possible solution, but are you sure that the delivery of Canoga is correct? Commented Nov 7, 2019 at 13:07
• If you mean that you can't answer hint 2 for that one, then I am pretty sure I can -- but if you mean you've got a lot further and made sense of all the numbers for the others, then you're way ahead of me and should ignore this comment. Commented Nov 7, 2019 at 15:11
• @jarnbjo I can relate Canoga to a common thing, yes. Even so, if you have figured out what the other 3 are, then you know Canoga must be the remaining one. Commented Nov 7, 2019 at 16:29

## 1 Answer

To open the front door you will need to input:

AMAADSMSDS

My reasoning went like this:

First step is to associate the input buttons with some mathematical operations, and somehow link that to the delivery. We see that:

Checks out since after all, we are making a delivery to a botanist.

Second step is to figure out what the numbers in the manifest can represent. Notice all the numbers have 4 digits and each item has 4 attributes. We can then make a 4x4 matrix for each one of them. I suspect that pressing a button does the corresponding operation to what is on screen by the corresponding matrix. The screen doesn't appear to show anything when we find it, so let's assume it is a 4x4 matrix filled with 0s.

Now we need to find a sequence of these operations that yield the code. Notice how D[2,1] = M[2,1] = 1 and D[4,4] = M[4,4] = 1. This means that we need obtain C[2,1] = 3 and C[4,4] = -9 by only adding and substracting the A and S matrices. This is a simple system 8x - 7y = 3 and 2x - 5y = -9, the solution is x = y = 3. Hence, we have three A and three S in the sequence of inputs.

Ok we know the solution includes pressing A and S three times but that is nearly not enough. We can try to fix the Ds we need by looking at C[1,4] = -4.13, since M[1,4] = 1, and fix the Ms looking at C[1,1] = -15, since D[1,1] = 1. We find respectively that with 2 divisions we can have -4.13 (well actually we get -4.125 and rounding would give -4.12 since we are in the negatives, I assumed this was overlooked) and 2 multiplications can give a -15.

For the M, we have three possibilities AMASAMSS, AMSAAMSS or AMAASMSS. The same process on divisions gives AAADSSDS, ADASDASS, ADASDSSA, ADASDSAS, ADSADSSA, ADSADSAS and ADSADASS. We can eliminate the codes that dont align with the three orders of A and S we found in the previous step. We only need to check the following sequences:

• AAADSSDS + AMAASMSS = AMAADSMSDS

• ADASDASS + AMASAMSS = AMDASDAMSS or ADMASDAMSS

• ADSADASS + AMSAAMSS = AMDSADAMSS or ADMSADAMSS

Now since the two pair of last candidates will give the same result (inverting A and S doesn't change anything), and by supposing that the sequence should be unique, we can have a pretty strong conviction that the correct code is "AMAADSMSDS". And sure enough if we do the calculation, we exactly get the code of the door! If needed i can add the details of the calculation but anyone can check by himself and it would eat space for nothing.

You can finally open the door, 4 years late on your delivery. And fortunately, nothing went to waste since you had to eat all you cargaison to survive, so all's well that ends well!

• Haha, yes four years on and the door finally opens! Commented Apr 28 at 23:58
• @DavidRobie I wonder though, rot13(vf gurer na rnfvre jnl gb rahzrengr gur cbffvoyr qvivfvbaf cynprzragf? Vg jnf n ovg grqvbhf, fb V gubhtug znlor V zvffrq n fgrc). Commented Apr 29 at 9:36
• Indeed there is! All you need to do is rot13(Tb onpx va gvzr naq erpbire zl uneq qevir orsber vg jnf zvfgnxrayl sbeznggrq, naq ernq gur abgrf V unq jevggra nobhg guvf chmmyr. V qba'g erzrzore jung gur gevpx jnf, ohg lbhe nafjre ybbxf evtug.). And it really is that simple! Commented Apr 30 at 0:27