Runtime after improvements!
- Identify the amortized runtime of union-find operations.
If implemented with Union-by-size and Path Compression:
- practically keeps the tree almost flat
- makes the operations work in
(read: Iterated logarithm of ) is the number of times one needs to apply to to get a value less than or equal to .
In practice, one could think of it to be almost since it exceeds only after it has reached .
Aside: The proof of the above running time is beyond the scope of this course. The Union-Find data structure was invented in 1964. The running time above was proved in 1973 (by Hopcroft and Ullman — see their paper).