1
$\begingroup$

I was given the following puzzle:

You manage a bank and you have 5 employees. With an infinite number of locks (and keys), you need to create a system that enables each triplet of workers open the vault of the bank, but a pair of employees should never be able to open together the vault.

Intuitively I immediately asked myself how many possible triplets of employees are there, and I know the answer from the combinations formula ($n!/r!(n-r)!$), which I also understand intuitively.

So we can represent all of our cases with this table:

https://upload.wikimedia.org/wikipedia/commons/6/65/Combinations_without_repetition%3B_5_choose_3.svg

We can say each case (or triplet) is represented by a row, and each worker is represented by a column. Obviously, when I see the table I immediately understand that the rows can also represent keys, but I can’t explain to myself in my head, logically, why this isomorphism (if I use the term correctly) is possible here. Perhaps I would have been able to get to this table myself, but it is not clear to me how (or why) the transformation from a table of triplets or cases, to a table of keys, occur. I try to imagine it somehow in my head but can’t. We can create 10 (unique) triplets (without repetition) from a set of 5, but why this necessarily implies that in order for each set of (only) three employees to be able to open a vault, we need 10 locks, and to give each employees 6 keys? Can you explain the isomorphism between the possible triplets and the number of locks, and the number of keys per employee?

I hope my question is making sense.

$\endgroup$

2 Answers 2

3
$\begingroup$

For every doubleton of employees, there has to be at least one lock they cannot open. However, if two different doubletons of employees (which might be a total of either three or four employees) couldn't open the same lock, then there would be a tripleton that couldn't open the vault. Therefore, there have to be at least ${5\choose2} =10$ locks.

Let us see if ten locks are sufficient. As noted before, there is a correspondence between the locks and doubletons of employees, so for convenience let us call the employees A, B, C, D, E, and then the locks will be AB, AC, AD, AE, BC, BD, BE, CD, CE, and DE. No employee can have the key for a lock with his name in it. Can an employee be missing a key without his name in it? No. Without loss of generality, let us assume that A does not have key BC. Then {A, B, C} cannot open the vault. Therefore, each employee must have keys for the six locks that don't have his name on it.

Let's verify that this solution works. As before, we imagine that each lock is "named" for the two people that don't have its key, so therefore each lock has three keys held by the three people the lock isn't named for. Imagine any two people: they cannot open the lock with both their names on it, so they cannot open the vault. But for any three people, at least one of them isn't named on every lock, so they will be able to open every lock of the vault.

$\endgroup$
0
$\begingroup$

Actually, the question should have been to find the minimum number of locks and keys, otherwise you can go on adding locks to which everyone holds a key !

So each group of two must be encountering one lock that they alone can't open, thus minimum number of locks needed = $^5C_2 = 10$
Also, each group must hold the missing key for each other group, and thus hold $4C_2$ = $6$ keys, totalling $5\cdot6$ = $30$ keys

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .