[Tutorial] Proving the inverse Ackermann complexity of Union-Find #### Introduction
Most of us are familiar with the union-find data structure and the two optimizations one can do on it: _union by rank_ and _path compression_. Most tutorials will introduce these methods and state that if both optimizations are used, the complexity will be $\mathcal{O}((n + m) \alpha(n))$. Here, $n$ and $m$ are the number of vertices and queries respectively. What is $\alpha$? Generally, we are told that $\alpha$ is some mysterious function that grows very slowly: $\alpha(N) < 5$ where $N$ is the number of subsets of particles in the observable universe and whatnot. What it is is usually not clarified very much. And there is typically no proof (or intuition and other such justifications) as to why the complexity is like that: usually we're told that the complexity analysis is quite long and complicated. At the time of writing, both [cp-algorithms](https://cp-algorithms.com/data_structures/disjoint_set_union.html) and [Wikipedia](https://bit.ly/3EvnzrI) are like th...
[Tutorial] Proving the inverse Ackermann complexity of Union-Find, $\mathcal{O}((n + m) \log \log n)$ complexity, and if we don't, we get
$\mathcal{O}((n + m) \log n, $\mathcal{O}(\alpha(n))$, the number of find-edges and thus the complexity of
the algorithm comes to, get $\mathcal{O}(m + n \sqrt{\log n})$ complexity, and if we don't, we get
$\mathcal{O}(m + n \sqrt{n, ours will have inverse Ackermann complexity in the worst case. Here, "similar
to ours" means:, that if both optimizations are used, the complexity will be $\mathcal{O}((n +
m) \alpha(n))$. Here, the complexity of the union-find data structure, in the article a lower bound
is also calculated. I, these methods and state that if both optimizations are used, the complexity
will be $\mathcal{O}((n + m, upper bound on the number of find-edges and therefore complexity. At this
point I want to remind you, #### Union-by-rank and its complexity, **Observation 2.** The time complexity of union-find with the union-by-rank
rule is $\mathcal{O}(n, **Theorem.** The complexity of union-find with path compression and
union-by-rank is $\mathcal{O, - How does one even analyze the time complexity of path compression — it seems
quite chaotic, After seeing this complexity and proof, one may think that the Ackermann
function is just some, Now we will attack the time complexity of union-find if both union-by-rank and
path compression are, The complexity of the algorithm hinges on the number of find-edges, because
that is the number of, The total number of find-edges, and also complexity, is $\mathcal{O}(m + n
\log^* n)$.
Полный текст и комментарии »