In the space station’s hold, the crystal locker is closed with a combination padlock. Brother has already tried three codes, without success. He wants to try all 1,000 possible codes… but Big Sister has a better idea: make the wrong tries talk.
The clues
The code has 3 digits. The locker screen keeps a record of the three tries:
- 251: only one digit is correct and in the right place.
- 246: only one digit is correct and in the right place.
- 841: only one digit is correct and in the right place.
How Big Sister finds the code
Step 1: test a guess
Suppose the code starts with 2. Then 251 and 246 already have their correct digit: the 2. So the 5 and the 1 of 251, and the 4 and the 6 of 246, are wrong in their places. Now look at 841: the 8 is not in first place (that’s the 2), and the 4 and the 1 are wrong. 841 would have no correct digit at all. Impossible! So the code does not start with 2.
Step 2: only two possibilities
The correct digit of 251 is then the 5 (in the middle) or the 1 (at the end). The one of 246 is the 4 (in the middle) or the 6 (at the end). Since there is only one digit per place, two cases are left: the code ends in 56, or it ends in 41.
Step 3: 841 decides
If the code ended in 41, the try 841 would have two correct digits, the 4 and the 1. Impossible again! So the code ends in 56. The correct digit of 841 can then only be the 8, in first place. The code is 856. Check: 251 has only the 5 in the right place, 246 only the 6, 841 only the 8. Click, the locker opens!
The tip to remember
“If an idea leads to the impossible, cross it out: every wrong try is a clue.” Mathematicians call this method proof by contradiction. Instead of trying 1,000 codes, Big Sister only needed a few lines of logic.
Try it at home
Make up your own puzzle: choose a 3-digit code, then write three tries that each have exactly one digit in the right place. Ask someone to solve it… and check that there is only one possible answer!
Quick quiz
- If the code started with 2, how many correct digits would the try 841 have?
- Why can’t the code end in 41?
- A 2-digit code. The try 12 has one digit in the right place; the try 32 has none. What is the first digit of the code?
Show the answers
1. None: that is why the guess is impossible.
2. Because the try 841 would then have two correct digits, the 4 and the 1, instead of one.
3. 1. The try 32 shows that 2 is not in second place, so the correct digit of 12 is the 1, in first place.
The challenge
Inside the locker, Brother finds a ballpoint pen. Does it write in space? Think about it with your children or students: answer in the next episode!
Answer to the Crystal Mission challenge
With 100 crystals, Big Sister can no longer be sure to win: 100 is not a prime number. For example, with piles of 52 and 48 crystals, both numbers are even, and 2 is a common divisor. Brother can then win.
