There are $N$ letters in an alphabet. There is a combination lock, the code to it consists from $M$ different letters.
You can input $M$ letters combination and try to open the lock. (But you can't check the lock unless you have inputted all $M$ letters).
If you guess at least $M-1$ letters from the code correctly the lock will be opened. The order of letters does not matter.
How many tries you need to guarantee that lock will be opened? How to find list of combinations you need to try?
P.S. I am especially interested for the case $N=32, M=4$.
Here is an example for the case $N=4, M=3$. The alphabet is "ABCD".
The answer is 1, with working combination "ABC". Indeed, if the code is different it can be different in $1$ letter only, therefore $M-1=2$ letters are always the same.