Challenge 135: Cracking Combinations
Can you find the smallest number of combinations you need to try in order to crack this lock?
The (rather insecure) combination lock on the safe containing the solutions to all the weekly maths challenges consists of three switches, each of which may be set to either position 1 or position 2. Unfortunately, there is a defect in the lock mechanism, which means that the door will open when any two of the three switches is in the correct position, even if the remaining one is incorrect.
What is the smallest number of combinations which must be tried by someone who does not know the correct combination if they want to be sure of opening the safe and getting their hands on all the solutions?
The security is increased, and an extra position is added for each switch, so that there are now positions 1, 2 and 3. However the defect in the mechanism remains, so that the door will still open when only two of the switches are correctly positioned.
What is the smallest number of combinations that need to be tried now?
What if the number of positions for each switch is increased to four?