Browse · MathNet
PrintIMO 2019 Shortlisted Problems
2019 counting and probability
Problem
On a certain social network, there are users, some pairs of which are friends, where friendship is a symmetric relation. Initially, there are people with friends each and people with friends each. However, the friendships are rather unstable, so events of the following kind may happen repeatedly, one at a time:
Let , , and be people such that is friends with both and , but and are not friends; then and become friends, but is no longer friends with them.
Prove that, regardless of the initial friendships, there exists a sequence of such events after which each user is friends with at most one other user.




Let , , and be people such that is friends with both and , but and are not friends; then and become friends, but is no longer friends with them.
Prove that, regardless of the initial friendships, there exists a sequence of such events after which each user is friends with at most one other user.
Solution
All of the solutions presented below will use this reformulation.
Note that the given graph is connected, since the total degree of any two vertices is at least and hence they are either adjacent or have at least one neighbour in common. Hence the given graph satisfies the following condition:
> Every connected component of with at least three vertices is not complete and has a vertex of odd degree.
We will show that if a graph satisfies condition (1) and has a vertex of degree at least , then there is a refriending on that preserves condition (1). Since refriendings decrease the total number of edges of , by using a sequence of such refriendings, we must reach a graph with maximal degree at most , so we are done.
Pick a vertex of degree at least in a connected component of . Since no component of with at least three vertices is complete we may assume that not all of the neighbours of are adjacent to one another. (For example, pick a maximal complete subgraph of . Some vertex of has a neighbour outside , and this neighbour is not adjacent to every vertex of by maximality.) Removing from splits into smaller connected components (possibly with ), to each of which is connected by at least one edge. We divide into several cases.
Case 1: and is connected to some by at least two edges.
Choose a vertex of adjacent to , and a vertex in another component adjacent to . The vertices and are not adjacent, and hence removing edges and and adding in edge does not disconnect . It is easy to see that this preserves the condition, since the refriending does not change the parity of the degrees of vertices.
Case 2: and is connected to each by exactly one edge.
Consider the induced subgraph on any and the vertex . The vertex has degree in this subgraph; since the number of odd-degree vertices of a graph is always even, we see that has a vertex of odd degree (in ). Thus if we let and be any distinct neighbours of , then removing edges and and adding in edge preserves the above condition: the refriending creates two new components, and if either of these components has at least three vertices, then it cannot be complete and must contain a vertex of odd degree (since each does).
Case 3: and is connected to by at least three edges.
By assumption, has two neighbours and which are not adjacent to one another. Removing edges and and adding in edge does not disconnect . We are then done as in Case 1.
Case 4: and is connected to by exactly two edges.
Let and be the two neighbours of , which are not adjacent. Removing edges and and adding in edge results in two new components: one consisting of a single vertex; and the other containing a vertex of odd degree. We are done unless this second component would be a complete graph on at least vertices. But in this case, would be a complete graph minus the single edge , and hence has at least vertices since is not a -cycle. If we let be a third vertex of , then removing edges and and adding in edge does not disconnect . We are then done as in Case 1.
---
Alternative solution.
As in the previous solution, note that a refriending preserves the property that a graph has a vertex of odd degree and (trivially) the property that it is not complete; note also that our initial graph is connected. We describe an algorithm to reduce our initial graph to a graph of maximal degree at most , proceeding in two steps.
Step 1: There exists a sequence of refriendings reducing the graph to a tree.
Proof. Since the number of edges decreases with each refriending, it suffices to prove the following: as long as the graph contains a cycle, there exists a refriending such that the resulting graph is still connected. We will show that the graph in fact contains a cycle and vertices such that and are adjacent in the cycle , is not in , and is adjacent to but not . Removing edges and and adding in edge keeps the graph connected, so we are done.
To find this cycle and vertices , we pursue one of two strategies. If the graph contains a triangle, we consider a largest complete subgraph , which thus contains at least three vertices. Since the graph itself is not complete, there is a vertex not in connected to a vertex of . By maximality of , there is a vertex of not connected to , and hence we are done by choosing a cycle in through the edge .
If the graph is triangle-free, we consider instead a smallest cycle . This cycle cannot be Hamiltonian (i.e. it cannot pass through every vertex of the graph), since otherwise by minimality the graph would then have no other edges, and hence would have even degree at every vertex. We may thus choose a vertex not in adjacent to a vertex of . Since the graph is triangle-free, it is not adjacent to any neighbour of in , and we are done.
Step 2: Any tree may be reduced to a disjoint union of single edges and vertices by a sequence of refriendings.
Proof. The refriending preserves the property of being acyclic. Hence, after applying a sequence of refriendings, we arrive at an acyclic graph in which it is impossible to perform any further refriendings. The maximal degree of any such graph is : if it had a vertex with two neighbours , then and would necessarily be nonadjacent since the graph is cycle-free, and so a refriending would be possible. Thus we reach a graph with maximal degree at most as desired.
Note that the given graph is connected, since the total degree of any two vertices is at least and hence they are either adjacent or have at least one neighbour in common. Hence the given graph satisfies the following condition:
> Every connected component of with at least three vertices is not complete and has a vertex of odd degree.
We will show that if a graph satisfies condition (1) and has a vertex of degree at least , then there is a refriending on that preserves condition (1). Since refriendings decrease the total number of edges of , by using a sequence of such refriendings, we must reach a graph with maximal degree at most , so we are done.
Pick a vertex of degree at least in a connected component of . Since no component of with at least three vertices is complete we may assume that not all of the neighbours of are adjacent to one another. (For example, pick a maximal complete subgraph of . Some vertex of has a neighbour outside , and this neighbour is not adjacent to every vertex of by maximality.) Removing from splits into smaller connected components (possibly with ), to each of which is connected by at least one edge. We divide into several cases.
Case 1: and is connected to some by at least two edges.
Choose a vertex of adjacent to , and a vertex in another component adjacent to . The vertices and are not adjacent, and hence removing edges and and adding in edge does not disconnect . It is easy to see that this preserves the condition, since the refriending does not change the parity of the degrees of vertices.
Case 2: and is connected to each by exactly one edge.
Consider the induced subgraph on any and the vertex . The vertex has degree in this subgraph; since the number of odd-degree vertices of a graph is always even, we see that has a vertex of odd degree (in ). Thus if we let and be any distinct neighbours of , then removing edges and and adding in edge preserves the above condition: the refriending creates two new components, and if either of these components has at least three vertices, then it cannot be complete and must contain a vertex of odd degree (since each does).
Case 3: and is connected to by at least three edges.
By assumption, has two neighbours and which are not adjacent to one another. Removing edges and and adding in edge does not disconnect . We are then done as in Case 1.
Case 4: and is connected to by exactly two edges.
Let and be the two neighbours of , which are not adjacent. Removing edges and and adding in edge results in two new components: one consisting of a single vertex; and the other containing a vertex of odd degree. We are done unless this second component would be a complete graph on at least vertices. But in this case, would be a complete graph minus the single edge , and hence has at least vertices since is not a -cycle. If we let be a third vertex of , then removing edges and and adding in edge does not disconnect . We are then done as in Case 1.
---
Alternative solution.
As in the previous solution, note that a refriending preserves the property that a graph has a vertex of odd degree and (trivially) the property that it is not complete; note also that our initial graph is connected. We describe an algorithm to reduce our initial graph to a graph of maximal degree at most , proceeding in two steps.
Step 1: There exists a sequence of refriendings reducing the graph to a tree.
Proof. Since the number of edges decreases with each refriending, it suffices to prove the following: as long as the graph contains a cycle, there exists a refriending such that the resulting graph is still connected. We will show that the graph in fact contains a cycle and vertices such that and are adjacent in the cycle , is not in , and is adjacent to but not . Removing edges and and adding in edge keeps the graph connected, so we are done.
To find this cycle and vertices , we pursue one of two strategies. If the graph contains a triangle, we consider a largest complete subgraph , which thus contains at least three vertices. Since the graph itself is not complete, there is a vertex not in connected to a vertex of . By maximality of , there is a vertex of not connected to , and hence we are done by choosing a cycle in through the edge .
If the graph is triangle-free, we consider instead a smallest cycle . This cycle cannot be Hamiltonian (i.e. it cannot pass through every vertex of the graph), since otherwise by minimality the graph would then have no other edges, and hence would have even degree at every vertex. We may thus choose a vertex not in adjacent to a vertex of . Since the graph is triangle-free, it is not adjacent to any neighbour of in , and we are done.
Step 2: Any tree may be reduced to a disjoint union of single edges and vertices by a sequence of refriendings.
Proof. The refriending preserves the property of being acyclic. Hence, after applying a sequence of refriendings, we arrive at an acyclic graph in which it is impossible to perform any further refriendings. The maximal degree of any such graph is : if it had a vertex with two neighbours , then and would necessarily be nonadjacent since the graph is cycle-free, and so a refriending would be possible. Thus we reach a graph with maximal degree at most as desired.
Techniques
Matchings, Marriage Lemma, Tutte's theoremInvariants / monovariants