Cayley 2019 Q4
4. Arrange the digits 1, 2, 3, 4, 5, 6, 7, 8 to form two 4-digit integers whose difference is as small as possible.
Explain clearly why your arrangement achieves the smallest possible difference.
Cayley Olympiad 2019, Question 4. © UK Mathematics Trust. Original paper on ukmt.org.uk
Answer: \(5123 - 4876 = 247\)
Let the two numbers be ‘abcd’ and ‘efgh’, with the smaller being ‘abcd’.
For a difference of less than 1000,
so that the two 4-digit numbers are in consecutive thousands. All other choices have a difference of more than 1000.
For ‘efgh’ to be as little above ‘e000’ as possible, we use 1, 2 and 3 for \(f\), \(g\) and \(h\) respectively.
Similarly, for‘abcd’ to be as close as possible to, but below, ‘e000’ we use 8, 7 and 6 for \(b\), \(c\) and \(d\) respectively.
This leaves 4 and 5, which satisfy (*), to be the values of \(a\) and \(e\) respectively.
Therefore the smallest difference comes from \(5123 - 4876\), which is 247.
Solution © UK Mathematics Trust, from the Cayley Olympiad 2019 solutions.