MathLabs

Problem 3

A social network has 20192019 users, some pairs of whom are friends (friendship is a symmetric relation). Events of the following kind may happen repeatedly, one at a time: three users AA, BB, and CC such that AA is friends with both BB and CC, but BB and CC are not friends, change their friendship statuses such that BB and CC are now friends, but AA is no longer friends with BB, and no longer friends with CC. All other friendship statuses remain unchanged. Initially, 10101010 users have 10091009 friends each, and 10091009 users have 10101010 friends each. Prove that there exists a sequence of such events after which each user is friends with at most one other user.
Step 4 of 6: The starting network is connected, not a clique, and can never become a cycle
1009+1009+2>2019,deg⁡(A0)=1009 (odd, invariant under toggles) ⟹ G never becomes a cycle1009+1009+2>2019,\qquad \deg(A_0)=1009\ (\text{odd, invariant under toggles})\ \Longrightarrow\ G\ \text{never becomes a cycle}
Detailed analysis

Every user has degree 10091009 or 10101010, so any two non-adjacent users have neighbor counts summing to at least 1009+1009>2019−21009+1009>2019-2, forcing a common neighbor by pigeonhole; hence the initial graph GG is connected. It is not a clique, since a clique on 20192019 vertices needs degree 20182018. By Step 2, only one vertex's degree changes at each toggle, and only by 22, so the parity of every vertex's degree is fixed forever; a vertex that starts with odd degree 10091009 can never reach the even degree 22 that a cycle would require of it, so GG can never become a cycle. By Step 3, we may keep toggling GG while it stays connected and is not yet a tree, and each such toggle strictly decreases the edge count, so this process must stop: it stops exactly when the graph has become a spanning tree on all 20192019 vertices.