It looks like a locksmithing problem, but it is really an exclusion problem. Do not first think about who must be able to open the box; think about who must be blocked.
The Box Only Three Can Open
Riddle statement
Five people want to keep a secret in a box.
They may put as many padlocks as they want on the box and distribute as many key copies as they want.
They want both of the following conditions to hold:
any group of 3 people can open the box;
no group of 2 people can open it.
What is the smallest number of padlocks they need?
Show solution
Solution
The answer is:
The idea is to put one padlock for each pair of people.
Since there are 5 people, the number of pairs is:
For each pair, do this:
put one special padlock against that pair; give the key to that padlock to the other three people.
For example, if the people are A, B, C, D, and E, put one padlock that A and B cannot open, but whose keys are held by C, D, and E.
Do this for each of the 10 pairs.
Now check that it works.
If only two people go to the box, say A and B, there will be a padlock designed exactly against that pair. Neither of them has the key, so they cannot open the box.
But if any three people go, they can always open all the padlocks.
Why?
Each padlock excludes only one specific pair. A group of three people cannot be contained inside a pair of two. Therefore, for every padlock, there will be at least one person in the group of three who has the key.
So any trio can open the box.
Also, it cannot be done with fewer than 10 padlocks.
Each of the 10 pairs must be blocked by some padlock. And the same padlock cannot block two different pairs, because then there would be at least three people without a key to that padlock, and that trio would not be able to open the box.
Therefore, at least 10 are necessary.
Answer: the minimum is 10 padlocks.