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:
The first digit and the last digit cannot be equal to each other.
The second digit must be greater than the third digit.
The last digit must be greater than either the third digit or greater than the first digit.
At least one digit must be an even number.
Which of the following codes would unlock the safe? Justify your answers.
1234
4321
5313
2644
3333
5312
7437
5857
We can check each code to see if satisfies the given rules.
1234
would not unlock the safe because the
second digit is less than the third digit, so it does not follow rule
\(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\).
5313
would not unlock the safe because
there are no even digits, so it does not follow rule \(4\).
2644
would unlock the safe.
3333
would not unlock the safe because it
breaks all four rules.
5312
would unlock the safe.
7437
would not unlock the safe because the
first and last digit are equal to each other, so it does not follow rule
\(1\).
5857
would unlock the safe.