TTMUA Lab
TMUA 2017 · Paper 2 · Question 20 of 20

TMUA 2017 Paper 2 Question 20

Logic and arguments — Deduction from feedback · counting candidates. Try it first; the answer and a full worked solution are below.

TMUA 2017 · Paper 2Logic and argumentsDeduction from feedback · counting candidates5 optionshard
I have forgotten my 5-character computer password, but I know that it consists of the letters a, b, c, d, e in some order. When I enter a potential password into the computer, it tells me exactly how many of the letters are in the correct position.

When I enter abcde, it tells me that none of the letters are in the correct position. The same happens when I enter cdbea and eadbc.

Using the best strategy, how many further attempts must I make in order to guarantee that I can deduce the correct password?

  1. ANone: I can deduce it immediately
  2. BOne
  3. CTwo
  4. DThree
  5. EMore than three
Show the answer and worked solution
answer · B
  1. ANone: I can deduce it immediately
  2. BOne
  3. CTwo
  4. DThree
  5. EMore than three
Work position by position. Each position must avoid the letter the three failed guesses put there, which leaves position 1 as b or d, position 2 as c or e, position 3 as a or e, position 4 as a or c, and position 5 as b or d. Positions 1 and 5 must take b and d in some order, and the middle three must be either c, e, a or e, a, c, so exactly four candidates survive: bcead, beacd, dceab and deacb. One more attempt is therefore needed, and one is enough: entering bcead returns 5, 2, 3 and 0 for those four in turn, so whatever number comes back identifies the password.