Safe Cracking: Tricky
You are to open a safe without knowing the combination. Beginning with the dial set at zero, the dial must be turned counter‐clockwise to the first combination number, (then clockwise back to zero), and clockwise to the second combination number, (then counter‐clockwise back to zero), and counter‐clockwise again to the third and final combination number, whereupon the door shall immediately spring open; there is no handle or key to turn. The dial has numbers from zero to 40, and the zero is not one of the combination numbers. Without knowing the combination numbers, what is the maximum number of trials required to open the safe (one trial equals one attempt to dial a full three‐number combination)?
Answer
Observe that once the first two numbers are dialed correctly, a single 360° turn from zero will pass through all 40 possible third‐number settings, opening the safe when the correct third number is reached. Hence we only need \(40\times40=1600\) trials.