Your progress is barred by a locked door, it is clearly controlled by a keypad. with 10 digits (0-9) plus a button for ENTER and a button for CANCEL. You know several things about this lock:
- This keypad combination lock uses 4 digit code, no more than 4 digits, no less.
- If you enter the wrong code 3 times in a row then the alarm sounds and it locks down.
- There is no timeout on the wrong tries, the third wrong input sounds the alarm and it locks down no matter how long you delay.
- The lock has a tamper proof design, any attempt to disassemble or break open the lock (with the skills and tools you have available) will sound the alarm and locks down.
Looking more carefully at the keypad you notice that there is a thin film of dust and grim over the whole surface, except 4 keys:
4, 7, 9 and ENTER
Those keys have the numbers/letters on them slightly chipped and the faint outline of fingerprints.
You press one of the numbers, it makes a short high pitched BEEP noise. In response to this noise there is a loud sneeze from behind you, you look to see there is a man sleeping in an alcove near the door, he is clearly homeless and living on the streets.
You strike up conversation with the man, whose name is Alex, and he says he has been staying here for a few nights and has seen the door be used.
You: "Can you tell me what the pass code is?"
Alex: "No, but I can give you a clue: The digital sum of the code is also the digital sum of the factorial of the fifth prime."
Alex: "AH HA HA HA! The look on your face! How could I know some tangential mathematical trivia of the passcode without knowing the code? Nah, I just heard the beeps"
You check the keypad, all the keys on the pad have the exact same tone, except the ENTER key that makes a low pitched BWRRRT.
Alex: "yeah, I only heard the rate they were pressed; Beep ... Beep-beep ... Beep... then a BWRRT."
You know that the chance of entering the correct code by a single lucky guess is 1 in 10'000. You're not willing to risk it for odds that slim... how could you have better odds, say, 50% chance of opening the door?
Which number or numbers should you try to enter?
How can you be sure of the odds?