CEMC Banner

Problem of the Week
Problem A and Solution
Entry Code

Problem

Janet has a safe that can be opened with a \(4\)-digit code. Janet has set up her safe to open for any \(4\)-digit code that satisfies the following rules:

  1. The first digit and the last digit cannot be equal to each other.

  2. The second digit must be greater than the third digit.

  3. The last digit must be greater than either the third digit or greater than the first digit.

  4. At least one digit must be an even number.

Which of the following codes would unlock the safe? Justify your answers.

  1. 1234

  2. 4321

  3. 5313

  4. 2644

  5. 3333

  6. 5312

  7. 7437

  8. 5857

Solution

We can check each code to see if satisfies the given rules.

  1. 1234 would not unlock the safe because the second digit is less than the third digit, so it does not follow rule \(2\).

  2. 4321 would not unlock the safe because the last digit is less than both the first digit and the third digit, so it does not follow rule \(3\).

  3. 5313 would not unlock the safe because there are no even digits, so it does not follow rule \(4\).

  4. 2644 would unlock the safe.

  5. 3333 would not unlock the safe because it breaks all four rules.

  6. 5312 would unlock the safe.

  7. 7437 would not unlock the safe because the first and last digit are equal to each other, so it does not follow rule \(1\).

  8. 5857 would unlock the safe.