Why is the Ackermann function related to the amortized complexity of union-find algorithm used for disjoint sets?
Asked Answered
R

1

17

Can anybody give me an intuitive explanation of why the Ackermann function http://en.wikipedia.org/wiki/Ackermann_function is related to the amortized complexity of union-find algorithm used for disjoint sets http://en.wikipedia.org/wiki/Disjoint-set_data_structure?

The analysis in Tarjan's data structure book isn't very intuitive.

I also looked it up in Introduction to Algorithms, but it also seems too rigorous and non-intuitive.

Thanks for your help!

Riannon answered 14/6, 2011 at 11:45 Comment(1)
@CrisStringfellow How should I do that?Riannon
M
5

Applied to Disjoint-set forests

from Wikipedia

(about find and union) These two techniques complement each other; applied together, the amortized time per operation is only O(α(n)), where α(n) is the inverse of the function f(n) = A(n,n), and A is the extremely quickly-growing Ackermann function. Since α(n) is the inverse of this function, α(n) is less than 5 for all remotely practical values of n. Thus, the amortized running time per operation is effectively a small constant.

So why Ackerman?

from Kruskal algoritm

The Function lg*n

Note that lg*n is a very slow growing function, much slower than lg n. In fact is slower than lg lg n, or any finite composition of lg n. It is the inverse of the function f(n) = 2 ^2^2^…^2, n times. For n >= 5, f(n) is greater than the number of atoms in the universe. Hence for all intents and purposes, the inverse of f(n) for any real life value of n, is constant. From an engineer’s point of view, Kruskal’s algorithm runs in O(e). Note of course that from a theoretician’s point of view, a true result of O(e) would still be a significant breakthrough. The whole picture is not complete because the actual best result shows that lg*n can be replaced by the inverse of A(p,n) where A is Ackermann’s function, a function that grows explosively. The inverse of Ackermann’s function is related to lg*n, and is a nicer result, but the proof is even harder.

Micrococcus answered 14/6, 2011 at 12:1 Comment(3)
I'm not sure if this provides me with any insight on this.Riannon
Log function is very used in amortization calculations. As far as I understand, Ackerman function is used as a substitute for log due its exponential growth and behavior similarities with it; at least in this case. anyway, I'd suggest you to give a glance to the Krustal's link. hope it helps you someway :)Micrococcus
In complexity analysis, its usually the inverse of the Ackermann function that is used. This post says "α(V) = O(lg V) is a common abuse of notation". #44355422Rockweed

© 2022 - 2024 — McMap. All rights reserved.