There should be
9 choose 4 = 9! / (4! * 5!) = 126`
different locks used, and 4 keys produced for each lock. For every partition
of the 9 people on the committee into 5 and 4, a the group of people of size
4 should be given the 4 keys to a particular lock.
Suppose that there is a group of at most 5 people who want to open the safe.
Then this group does not include a particular group of 4 people, for which
there is a lock that only that group of 4 people that only they can access.
Therefore, any group with at most 5 people cannot open the safe.
Now, suppose there is a group of at least 6 people who want to open the safe.
Then this group of people intersects all possible subsets of the 9-person group
of size 4, so that this group must have a key for every possible lock.