The idea is to place all the yellow keys into the red locks. There is at least one guaranteed way to do this as the locks as created from the keys and then 'blurred' by adding extra gaps. Solutions however are not (yet!) unique - I haven't figured out how to add gaps without getting more than one solution.

The full white spaces in the red locks take the yellow key bits, the half-red squares are blocked.


For example key 1 goes into locks 4 and 8.

  • $\begingroup$ Could you explain a bit more, please, what the boxes and colors mean? $\endgroup$
    – Thomas
    Commented Jan 29, 2016 at 15:07
  • $\begingroup$ I assume that one line is one key / one lock and we have to assort each key to one fitting lock? $\endgroup$ Commented Jan 29, 2016 at 15:11
  • $\begingroup$ @friedemann_bach; in 1! $\endgroup$
    – JMP
    Commented Jan 29, 2016 at 15:15
  • $\begingroup$ While both mine and @friedmann_bach have correct answers, I believe that theirs is superior to mine and should get accepted. $\endgroup$ Commented Jan 29, 2016 at 16:49
  • $\begingroup$ @BearArmatis; very noble - yours was in first however. i'm waiting to see if there are any others - probably decide tomorrow $\endgroup$
    – JMP
    Commented Jan 29, 2016 at 17:14

2 Answers 2


I found two solutions.

I numbered the keys and locks from 1 to 9 and built a simple matrix:

Key / Lock matrix

A "0" means that the key would not fit into the corresponding lock. A "1" means that the key fits. Then, a -1 means that a key would fit, but that the lock is already occupied by another key.

In the last row you can see how the deduction works. First (1.) I assumed that K3 fits only into L5 and K5, and (2.) K5 only into L4. This (3.) blocks K1 for L4, so it needs to be put into L8, and so on (4. to 7.). Two keys (K4 and K7) and two locks (L2 and L3) remained, which can be put into either of them.

So my solutions would be:

1. K1-L8, K2-L1, K3-L5, K4-L2, K5-L4, K6-L7, K7-L3, K8-L6, K9-L9


2. K1-L8, K2-L1, K3-L5, K4-L3, K5-L4, K6-L7, K7-L2, K8-L6, K9-L9


If you organize the keys A-I and the locks 1-9 here is a solution:

A 8, B 1, C 5, D 2, E 4, F 7, G 3, H 6, I 9,

  • 1
    $\begingroup$ H doesn't go in 7 $\endgroup$
    – JMP
    Commented Jan 29, 2016 at 15:34
  • $\begingroup$ You're right, I've revised my answer. $\endgroup$ Commented Jan 29, 2016 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.