Browse · MathNet
PrintBalkan Mathematical Olympiad Shortlisted Problems
counting and probability
Problem
A social network has users. Two different users are either friends or not friends. A user is considered lonely if they have no friends. Initially, there are no lonely users, and two users Alice and Bob are not friends. A user may swap all their friends, meaning if they were friends with someone before the swap, they are no longer friends, and vice versa. Must there exist a way to arrange the users in a sequence so that if, one-by-one in that sequence, each user swaps their friends, no user is ever lonely at any point during the process?
Solution
Let a longest path of the graph be .
Case 1: consists of all vertices and there is no edge between and . Swap vertices increasing from to . and will never be lonely, as they will connect after the first swap and disconnect after the last swap. Vertex for will never be lonely as it will be connected to before it is swapped and to after it is swapped (because was swapped before).
Case 2: consists of all vertices and there is an edge between and . Thus is a cycle that contains all vertices. As the graph is not complete, there exist vertices which are not connected, and (). Swap , then for (one path from to along the cycle), then for (the other path along the cycle). and will be connected during the procedure. For other vertices, the same argument as in Case 1 holds (they are always connected to at least one of the neighbours on the cycle).
Case 3: does not contain all vertices. Notice that must contain at least vertices, because otherwise every vertex would have a degree of , which is impossible because the number of vertices is odd. Any swap ordering in which we swap first , last , other vertices in increasing order doesn't cause any vertices besides possibly and to be lonely. For internal vertices the same argument from Case 1 holds. Vertices outside of are not connected to and (otherwise, the longer path would exist). As we swap first and last, they will be connected to before their swap and to after. If contains at least vertices, then if we swap , then , then vertices outside of , then remaining vertices of , we notice that and will always be connected to some vertex outside or to their respective neighbors on . If contains vertices, then we swap , then one of the outside vertices, then , then the remaining outside vertices, then . Similarly to above, and will always be connected either to their neighbour in or to some outside vertex.
Case 1: consists of all vertices and there is no edge between and . Swap vertices increasing from to . and will never be lonely, as they will connect after the first swap and disconnect after the last swap. Vertex for will never be lonely as it will be connected to before it is swapped and to after it is swapped (because was swapped before).
Case 2: consists of all vertices and there is an edge between and . Thus is a cycle that contains all vertices. As the graph is not complete, there exist vertices which are not connected, and (). Swap , then for (one path from to along the cycle), then for (the other path along the cycle). and will be connected during the procedure. For other vertices, the same argument as in Case 1 holds (they are always connected to at least one of the neighbours on the cycle).
Case 3: does not contain all vertices. Notice that must contain at least vertices, because otherwise every vertex would have a degree of , which is impossible because the number of vertices is odd. Any swap ordering in which we swap first , last , other vertices in increasing order doesn't cause any vertices besides possibly and to be lonely. For internal vertices the same argument from Case 1 holds. Vertices outside of are not connected to and (otherwise, the longer path would exist). As we swap first and last, they will be connected to before their swap and to after. If contains at least vertices, then if we swap , then , then vertices outside of , then remaining vertices of , we notice that and will always be connected to some vertex outside or to their respective neighbors on . If contains vertices, then we swap , then one of the outside vertices, then , then the remaining outside vertices, then . Similarly to above, and will always be connected either to their neighbour in or to some outside vertex.
Final answer
Yes
Techniques
Matchings, Marriage Lemma, Tutte's theoremColoring schemes, extremal arguments