Graph Theory37 sections · 1633 units
Open in Course

The Core idea

(Merge small into large)

What if you always merge the smaller set into the larger one?

Instead of arbitrary order, choose the merge direction wisely. When you merge a set of size ss into a set of size tt where sts \leq t, the result has size at least 2s2s. The smaller set doubled in size. This doubling is the reason it works: every element can only be moved O(logn)O(\log n) times before its set becomes too large. After logn\log n doublings, the set reaches size nn and cannot grow further.