6 generals propose locking a safe containing secret stuff with a number of different locks. Each general will get a certain set of keys to these locks. How many locks are required and how many keys must each general have so that, unless 4 generals are present, the safe can't be opened. Generalize to $n$ generals and $m$ minimum number of generals required.
Here's where I've gotten to so far. Define a function $$f(n,m)=k$$ where $n$ and $m$ are as defined above and $k$ is the number of locks required. I've figured out $f(1,1)$, $f(2,1)$, $f(2,2)$ and so on until $f(4,4)$. I've noticed that if I arrange these values in a Pascal-like triangle, I can get the values in the lower row by summing the 2 numbers above it (I can't figure out how to display it using LaTeX). Doing this, I get the number of locks required as $24$ but I'm still working on the key distribution.
My question is whether I'm on the right track, and if so, how do I go about proving my solution. Thanks for your help.
[EDIT] To make it clear, the arrangement must be such that the safe can be opened when any $4$ generals are present and not if the number of generals is $3$ or less.