Olympiad Maths Prep

Track / Stage 7 / 248 of 300 #1648 of 2000

Problem 1648

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.6 Prove it Iranian Mathematical Olympiad · Iran

A simple graph is called divisibility if it's possible to label its vertices with positive integers such that there is an edge between two vertices if and only if the label of one vertex is divisible by the other one.
A simple graph is called a permutation graph, if it's possible to label its vertices by 1,2,,n1, 2, \dots, n and there exists a permutation π\pi such that there is an edge between vertices i,ji, j if and only if i>ji > j and π(i)<π(j)\pi(i) < \pi(j) (the graph is not directed!)
Prove that a simple graph is a permutation graph if and only if both its complement and itself are divisibility graphs.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Let's call a simple graph good, if we can assign a direction to the edges such that for any two vertices v,uv, u with vuv \to u, if there's a vertex ww with uwu \to w, then there is necessarily a directed edge from vv to ww.
Lemma. A graph is divisibility if and only if it's a good graph.
*Proof.*
* Let GG be a divisibility graph and let n(v)n(v) denote the number written on vertex vv. For any pair of vertices like (v,u)(v, u) where there's an edge between vv and uu, we direct the edge from vv to uu if n(v)n(u)n(v) \mid n(u) and otherwise, we direct the edge from uu to vv. Now if for any three vertices u,v,wu, v, w we have uv,vwu \to v, v \to w, it means n(u)n(v)n(w)n(u) \mid n(v) \mid n(w), thus n(u)n(w)n(u) \mid n(w) which means uwu \to w, so GG is a good graph.

* Let GG be a good graph with nn vertices. Using induction on nn, we'll show that GG is a divisibility graph. For n=1n = 1 the claim is obvious. Now assume the claim for n=k1n = k - 1. Now consider a good graph with n=kn = k vertices. Note that a good graph cannot have a cycle. Because a cycle v1v2vtv1v_1 \to v_2 \to \dots \to v_t \to v_1, means v1vtv_1 \to v_t is also an edge of the directed graph. So the graph is not a simple graph, which is a contradiction. Thus, there is no cycle in GG. Let vv be a vertex of GG with in-degree of zero (such vertex exists since GG does not have a cycle). The graph G{v}G - \{v\} is a good graph with k1k-1 vertices, so by induction, it is also a divisibility graph where n(u)n(u) is the number associated with vertex uu. Now set n(v)=pn(v) = p such that for all uG{v}u \in G - \{v\} we have pn(u)p \nmid n(u). Now change the numbers written on the vertices of G{v}G - \{v\} in a way that for any vertex uvu \neq v where vuv \to u, the new associated number is n(u)=pn(u)n'(u) = p \cdot n(u). Now GG with given numbers is easily shown to be a divisibility graph.

So in order to solve the problem, we need to show that a graph is a permutation graph if and only if itself and its complement are good graphs. Let GG be a permutation graph. Let (v,u)(v, u) be an edge of this graph where v,uv, u are labeled by i,ji, j. We direct the edge from vv to uu if i<j,π(j)<π(i)i < j, \pi(j) < \pi(i). It is easy to see that this directed version of GG implies GG is a good graph. Now for the complement of GG, call it Gˉ\bar{G}, for any two numbers i,ji, j labeled on vertices v,uv, u, we direct an edge from vv to uu if i<j,π(i)<π(j)i < j, \pi(i) < \pi(j). Again, it is quite simple to see that by this directed version of Gˉ\bar{G}, we can conclude that Gˉ\bar{G} is also a good graph. Now for the other part, we need another lemma.

Lemma. Let GG be a graph with nn vertices such that both GG and its complement, Gˉ\bar{G}, are good graphs. Label the vertices of these graphs by 1,2,,n1, 2, \dots, n. Then there is an arrangement of the vertices, such that in both GG and Gˉ\bar{G}, all vertices are towards the same direction. (Meaning if vertices are respectively labeled as v1,,vnv_1, \dots, v_n, for any i,ji, j where vivjv_i \to v_j, we have i<ji < j.)
*Proof.* Let GG be a graph as described. Since GG does not contain a cycle, then it is possible to arrange the vertices in a way that all edges are towards the same direction. Of all valid directed versions of GG, consider the one such that of all the valid directions of Gˉ\bar{G}, the directed version of Gˉ\bar{G} has the minimum number of edges towards the opposite direction of the ones in GG. We will prove that this minimum number is zero. Assume the contrary, that even considering a direction version of Gˉ\bar{G} with minimum number of backward edges, there is still a backward edge. Let's focus on graph Gˉ\bar{G}. Consider an edge where the distance between its vertices is minimal. Let this edge be vkvtv_k \to v_t. We claim that vk,vtv_k, v_t are adjacent vertices, otherwise there's a vertex vsv_s that vs↛vtv_s \not\to v_t and vk↛vsv_k \not\to v_s.
if vtvsvkvt}Gˉ is good    vkvsif vsvkvkvt}Gˉ is good    vsvt \left. \begin{array}{l} \text{if } v_t \to v_s \\ v_k \to v_t \end{array} \right\} \bar{G} \text{ is good} \implies v_k \to v_s \\ \left. \begin{array}{l} \text{if } v_s \to v_k \\ v_k \to v_t \end{array} \right\} \bar{G} \text{ is good} \implies v_s \to v_t
Both conclusions are impossible, therefore vt↛vs,vs↛vkv_t \not\to v_s, v_s \not\to v_k, which means in GG we must have vtvs,vsvkv_t \to v_s, v_s \to v_k, and since GG is good, vtvkv_t \to v_k. Which means in Gˉ\bar{G} we cannot have an edge between vt,vkv_t, v_k, a contradiction. So vk,vtv_k, v_t must be adjacent vertices. Since there is no edge between vk,vtv_k, v_t in GG, switching their position will not cause any difference to the way we directed the GG, that all edges are towards the same direction. But, it reduces the number of edges in Gˉ\bar{G} that are facing backwards by at least one, a contradiction, since we considered a direction of Gˉ\bar{G} where it has the minimum number of such edges. Hence the lemma.

Now using the latest lemma, consider an arrangement of the vertices such that any edge of both G,GˉG, \bar{G} are towards the same direction, meaning if vivjv_i \to v_j, then i<ji < j. Now consider a permutation π\pi where π(i)=i1+d+(vi)d(vi)0\pi(i) = i - 1 + d^+(v_i) - d^-(v_i) \ge 0 where d+(v),d(v)d^+(v), d^-(v) are out-degree and in-degree of vertex vv respectively. Now we will show that GG is a permutation graph, using the permutation π\pi as described. We need to show that for any two indices i<ji < j, we have vivjv_i \to v_j if and only if π(i)>π(j)\pi(i) > \pi(j). First assume that vivjv_i \to v_j. Define the sets A,B,CA, B, C as
A:={vkk<i,vkvi}B:={vki<k<j,vi↛vk}C:={vkj<k,vi↛vk} \begin{align*} A &:= \{v_k \mid k < i, v_k \to v_i\} \\ B &:= \{v_k \mid i < k < j, v_i \not\to v_k\} \\ C &:= \{v_k \mid j < k, v_i \not\to v_k\} \end{align*}
Since both G,GˉG, \bar{G} are good, we have
vkA:vkvivj    vkvjvkB:vi↛vk,vivj    vkvjvkC:vi↛vk,vivj    vj↛vk \begin{align*} \forall v_k \in A : v_k \to v_i \to v_j &\implies v_k \to v_j \\ \forall v_k \in B : v_i \not\to v_k, v_i \to v_j &\implies v_k \to v_j \\ \forall v_k \in C : v_i \not\to v_k, v_i \to v_j &\implies v_j \not\to v_k \end{align*}
(The second and third lines are concluded because otherwise, considering Gˉ\bar{G}, we would have vi↛vjv_i \not\to v_j.) So we have
{d(vj)A+B+1=d(vi)+B+1d+(vi)d+(vj)+((ji1)B)+1j>i \left\{ \begin{array}{l} d^-(v_j) \ge |A| + |B| + 1 = d^-(v_i) + |B| + 1 \\ d^+(v_i) \ge d^+(v_j) + ((j - i - 1) - |B|) + 1 \\ \qquad j > i \end{array} \right.
    π(i)π(j)=(ij)+(d+(vi)d+(vj))+(d(vj)d(vi))(ij)+((ji)B)+(B+1)=1>0. \begin{aligned} & \implies \pi(i) - \pi(j) \\ &= (i-j) + (d^{+}(v_i) - d^{+}(v_j)) + (d^{-}(v_j) - d^{-}(v_i)) \\ & \geq (i-j) + ((j-i) - |B|) + (|B| + 1) = 1 > 0. \end{aligned}
Now if vi↛vjv_i \not\to v_j, define these following sets
D:={vkk<i,vk↛vi}E:={vki<k<j,vivk}F:={vkj<k,vivk} \begin{aligned} D &:= \{v_k \mid k < i, v_k \not\to v_i\} \\ E &:= \{v_k \mid i < k < j, v_i \to v_k\} \\ F &:= \{v_k \mid j < k, v_i \to v_k\} \end{aligned}
Again, we have
vkD:vk↛vi↛vj    vk↛vjvkE:vivk,vi↛vj    vk↛vjvkF:vi↛vj,vi↛vk    vjvk \begin{aligned} \forall v_k \in D : v_k \not\to v_i \not\to v_j &\implies v_k \not\to v_j \\ \forall v_k \in E : v_i \to v_k, v_i \not\to v_j &\implies v_k \not\to v_j \\ \forall v_k \in F : v_i \not\to v_j, v_i \not\to v_k &\implies v_j \to v_k \end{aligned}
So we conclude
{d+(vi)=E+Fd+(vj)Fd(vj)((i1)D)+((ji1)E)d(vi)+D=i1j>i \left\{ \begin{array}{l} d^{+}(v_i) = |E| + |F| \\ d^{+}(v_j) \ge |F| \\ d^{-}(v_j) \le ((i-1) - |D|) + ((j-i-1) - |E|) \\ d^{-}(v_i) + |D| = i-1 \\ j > i \end{array} \right.
    π(i)π(j)=(ij)+(d+(vi)d+(vj))+(d(vj)d(vi))(ij)+(E)+((ji1)E)=1<0. \begin{aligned} & \implies \pi(i) - \pi(j) \\ &= (i-j) + (d^{+}(v_i) - d^{+}(v_j)) + (d^{-}(v_j) - d^{-}(v_i)) \\ & \le (i-j) + (|E|) + ((j-i-1) - |E|) = -1 < 0. \end{aligned}
Hence, the given permutation π\pi leads to the conclusion that GG is a permutation graph. So the claim of the problem is finally deduced. ■

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.