f is a function from the integers to {1, 2, 3, ... , n} such that f(A) and f(B) are unequal whenever A and B differ by 5, 7 or 12. What is the smallest possible n?
Solution
Answer: n = 4.
Each pair of 0, 5, 12 differ by 5, 7 or 12, so f(0), f(5), f(12) must all be different, so n ≥ 3.
We can exhibit an f with n = 4. Define f(m) = 1 for m = 1, 3, 5, 7, 9, 11 (mod 24), f(m) = 2 for m = 2, 4, 6, 8, 10, 12 (mod 24), f(m) = 3 for m = 13, 15, 17, 19, 21, 23 (mod 24), f(m) = 4 for m = 14, 16, 18, 20, 22, 0 (mod 24).
© John Scholes
jscholes@kalva.demon.co.uk
11 Apr 2002