MathLabs

Problem 5

Find the minimum positive integer kk for which there exists a function f:Z→{1,2,…,k}f:\mathbb Z\to\{1,2,\dots,k\} such that f(x)≠f(y)f(x)\ne f(y) whenever ∣x−y∣∈{5,7,12}|x-y|\in\{5,7,12\}.
Step 3 of 5: Complete the four-coloring
f(x)≠f(y)whenever ∣x−y∣∈{5,7,12}f(x)\ne f(y)\quad\text{whenever }|x-y|\in\{5,7,12\}
Detailed analysis

Choose the least available color at every stage. The preceding bound guarantees that the set of available colors is nonempty. Any forbidden pair is considered when the later endpoint is colored, so the resulting function satisfies f(x)≠f(y)f(x)\ne f(y) whenever ∣x−y∣∈{5,7,12}|x-y|\in\{5,7,12\}. Hence k≤4k\le4.