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 3 of 6: A connected graph that is not a clique, cycle, or tree admits a safe toggle
G connected, G≠K∣V∣, G≠C∣V∣, G not a tree ⟹ ∃ A,B,C: G′ connectedG\ \text{connected},\ G\neq K_{|V|},\ G\neq C_{|V|},\ G\ \text{not a tree}\ \Longrightarrow\ \exists\, A,B,C:\ G'\ \text{connected}
Detailed analysis

Suppose GG is connected but is none of a clique, a cycle, or a tree; then GG contains a cycle but is not itself that cycle. Take a shortest cycle C0C_0. If GG has no triangle, pick a vertex bb outside C0C_0 adjacent to some aa on C0C_0 (it exists since GG is connected and larger than C0C_0), and let cc be a neighbor of aa on C0C_0; minimality of C0C_0 forces bb and cc to be non-adjacent, so toggling a,b,ca,b,c is legal, and it keeps the graph connected because aa keeps its other cycle-neighbor while bb reconnects through its new edge to cc. If instead GG has a triangle, take a maximal clique KK (a proper subset of the vertices) and an edge from a vertex a∈Ka\in K to some b∉Kb\notin K; maximality gives a vertex c∈Kc\in K not adjacent to bb, and toggling a,b,ca,b,c is legal and keeps the graph connected, because aa stays linked to the rest of KK while bb reconnects through cc.