Math CentralQuandaries & Queries


Question from Mary:

More on your published question:

I have the same type of lock, but set up a 5-digit pass code. Is that more or fewer possibilities than a 4-digit code. How many digits would make the lock most secure? I don't believe Werner specified this, but each number can only be used once. Thanks, Mary

Hi Mary,

In Werner's question and your question I assume that each digit can only be used once and order is not important. That is 12543 and 15234 are the same pass code.

In Werner's question the number of possible pass codes is the number of combinations of 4 digits taken from 10 digits. This number is called 10 choose 4 and is written

\[ \left( \begin{array}{cc}10 \\ 4 \end{array}\right) = \frac{10 \times 9 \times 8 \times 7}{4 \times 3 \times 2 \times 1} = 210.\]

There is a definition of n choose k in this response to a previous question.

In your case you have 10 choose 5 possible pass codes and 10 choose 5 is 252 so the lock is more secure if 5 digits are required. What about a 6 digit pass code? Selecting the 6 digits to use is the same as choosing the 4 digits not to include so 10 choose 6 is equal to 10 choose 4.

You don't have to do the arithmetic yourself, Google will do it for you. For example if you type 10 choose 5 into the Google search window you will get 252 as a response.


About Math Central


Math Central is supported by the University of Regina and the Imperial Oil Foundation.
Quandaries & Queries page Home page University of Regina