Home > Problem of the Week > Archive List > Detail

<< Prev 10/11/2009 Next >>

Where Is Crypto, the Magic Dog, When You Need Him?


Entry into a building is controlled by a combination lock. You know the following:

  • You enter combinations using a pad of buttons numbered 1 through 9
  • The code for opening the entry door can be 2, 3, 4, or 5 elements in length
  • Each element can be one digit (1-9), two digits, three digits, or four digits which must be entered simultaneously by depressing multiple buttons
  • A digit can occur only once in the code
For example, 1-2-4 is a legitimate three element code, entered by three consecutive button presses. Also, 25-3 (or 52-3) is a legitimate code that must be entered by pressing the 2 and 5 keys at the same time.

An example of a illegimate code is 145 because it has only one element. Also, 42-31-4 is not valid because the digit 4 is repeated.

Question:Suppose you are locked out but can enter a possible code every ten seconds. In the worst case possible, how long would it take for you to press the correct code and gain entry?

 

Source: Adaptation of Sue McGraw's "Lock Combination," CMC Communicator, Vol. 17#3, p. 39


Hint: Try a simpler problem...suppose the keypad has only the digits 1-5, etc.

 


Solution Commentary: Sorry....no solution, as I am in the midst of still entering combinations!