The slightly simpler explanation of the arrangement I thought of is to label the assistants as A, B, C, who are each designated as the guardian of one safe, which can then also be referred to as safes A, B, C for simplicity.
Each assistant will carry the primary key for their own safe. Let's call the secondary key for each safe a, b, c.
Then, for everyone to be able to access every safe, we just need to put the secondary keys in the safes A, B, C like this:
A[c]
B[a]
C[b]
Now everyone can open any safe by finding secondary keys in their own safe in a maximum of two steps.
Eg. If C wants to open safe A, she will take the b key from her own safe to open safe B and get the a key.
Edit:
After a little more thought, there is an obvious second solution if the safe labels are fixed:
A[b]
B[c]
C[a]
That leads to the insight that this method will in fact work for any number of 2-key safes, given an equal number of assistants. The number of different permutations of secondary key storage will be n-1
, where n
is the number of safes, with each assistant needing to open (n+1)/2
safes on average.
Eg. extending it to 4 safes, there are 3 permutations:
A B C D
- - - -
b c d a
c d a b
d a b c