I've got a combination lock with ten buttons (digits 0..9) and each button can be either depressed or not, like the one below. I'm guessing that this question is related.
This lock is configurable:
- For each button, I can choose whether it should be depressed or not.
- This means I can choose not only the combination but also the length of the combination! Anything from zero to ten depressed buttons can be valid.
- Obviously, a digit can only appear once in the code.
(If you try 1231 then you'll notice that the final digit is already depressed). - Finally, the sequence is irrelevant: 123 = 321 = 231...
Question: How long is the combination that has the lowest odds of being found?
