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 2 of 6: Track degrees and the edge count
deg⁡′(A)=deg⁡(A)−2,deg⁡′(B)=deg⁡(B),deg⁡′(C)=deg⁡(C),∣E′∣=∣E∣−1\deg'(A)=\deg(A)-2,\qquad \deg'(B)=\deg(B),\qquad \deg'(C)=\deg(C),\qquad |E'|=|E|-1
Detailed analysis

In a toggle at A,B,CA,B,C, vertex AA loses both edges ABAB and ACAC, so its degree drops by exactly 22 and its parity is unchanged. Vertex BB loses edge ABAB but gains edge BCBC, and vertex CC loses ACAC but gains BCBC, so their degrees do not change at all. Every other vertex is untouched. Hence a toggle always removes exactly one edge from the graph, and it never changes the parity of any vertex's degree.