IMO 1991 · Problem 4

Suppose \(G\) is a connected graph with \(k\) edges. Prove that it is possible to label the edges \(1,2,\ldots,k\) in such a way that at each vertex which belongs to two or more edges, the greatest common divisor of the integers labeling those edges is equal to \(1\).

[A graph consists of a set of points, called vertices, together with a set of edges joining certain pairs of distinct vertices. Each pair of vertices \(u,v\) belongs to at most one edge. The graph \(G\) is connected if for each pair of distinct vertices \(x,y\) there is some sequence of vertices \(x=v_0,v_1,v_2,\ldots,v_m=y\) such that each pair \(v_i,v_{i+1}\) \((0\leq i<m)\) is joined by an edge of \(G\).]

Official text of the problem. Official problem paper (PDF)

Solution

If \(k=0\), there is nothing to prove. Assume \(k\geq1\).

We construct a labeling by walking along unlabelled edges, with occasional changes of starting point. Choose a vertex \(s\) incident with an edge, begin at \(s\), and declare \(s\) visited. Apply the following rules:

  1. If the current vertex has an unlabelled incident edge, traverse any such edge, give it the next label \(1,2,\ldots,k\), and declare the vertex reached visited.
  2. If the current vertex has no unlabelled incident edge but unlabelled edges remain elsewhere, resume the walk from a visited vertex having an unlabelled incident edge.

We first justify that the second rule is always possible when needed. Let \(W\) be the set of visited vertices. Every labelled edge has both endpoints in \(W\). If no vertex in \(W\) had an unlabelled incident edge, there could be no edge between \(W\) and its complement: any such edge would necessarily be unlabelled. Since \(W\) is nonempty and \(G\) is connected, this would imply that every vertex belongs to \(W\), and consequently that no unlabelled edges remain—a contradiction.

Thus the construction continues until all \(k\) edges have received distinct labels \(1,2,\ldots,k\).

Now let \(v\) be any vertex belonging to at least two edges.

If \(v=s\), an edge incident with \(v\) has label \(1\), so the required greatest common divisor is \(1\).

If \(v\neq s\), consider its first visit. Since changes of starting point are allowed only to visited vertices, this first visit occurs by traversing an edge, say with label \(m\). Before this traversal, no edge incident with \(v\) was labelled, because both endpoints of every labelled edge have already been visited. As \(v\) has at least two incident edges, it therefore still has an unlabelled incident edge upon arrival. The first rule immediately traverses such an edge and labels it \(m+1\).

Hence two edges incident with \(v\) have consecutive labels. The greatest common divisor of all labels at \(v\) divides \[ \gcd(m,m+1)=1, \] so it equals \(1\), as required. \(\square\)

The solution was checked against John Scholes' IMO solution archive (Kalva).