Number of tries to guess M-1 letters from M-letters-code.

74 Views Asked by At

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 to try to open the lock.

If you guess at least M-1 letters from the code correctly the lock will be opened. The order does not matter (ACEB combination will open lock with ABCD code).

How many tries you need to guarantee that lock will be opened? [How to find list of combinations you need to try?]

I am especially interested in the case N = 32, M = 4.