Problem

Source: Swiss TST 2023 P9

Tags: combinatorics



Let $G$ be a graph whose vertices are the integers. Assume that any two integers are connected by a finite path in $G$. For two integers $x$ and $y$, we denote by $d(x, y)$ the length of the shortest path from $x$ to $y$, where the length of a path is the number of edges in it. Assume that $d(x, y) \mid x-y$ for all integers $x, y$ and define $S(G)=\{d(x, y) | x, y \in \mathbb{Z}\}$. Find all possible sets $S(G)$.