Combination Cracking

  1. There is a keypad entry system on a safe door. There is no 'clear' button, but the safe will open automatically if the last n digits entered match the n digit 'password' required.
    1. If there are 10 digits to choose from, what is the fewest number of button presses you would need to type in to guarantee access if the password is 4 digits long?
    2. What is the length and general solution for a password of n digits?
    3. What about password length n, with m digits to choose from?
    4. Can you give an example sequences for (n,m) = (3,2), (3,3), (2,4)?
  2. A combination lock consists of 4 wheels, each numbered sequentially 0 to 9 (with 9 next to both 8 and 0.)  How many wheel turns (changing one digit by one value) are needed to attempt every combination? How many wheel turns are needed for n wheels of m digits each?

Source: Alan O'Donnell (though I've seen it elsewhere) with original extensions.

Mail to Ken