有人可以给我直观的解释为什么Ackermann函数 en.wikipedia/ Wiki / Ackermann_function 与用于不相交集的联合查找算法的摊销复杂度有关 http ://en.wikipedia/wiki/Disjoint-set_data_structure ?
Can anybody give me an intuitive explanation of why the Ackermann function en.wikipedia/wiki/Ackermann_function is related to the amortized complexity of union-find algorithm used for disjoint sets en.wikipedia/wiki/Disjoint-set_data_structure?
Tarjan的数据结构书中的分析不是很直观。
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.
感谢您的帮助!
推荐答案适用于不相交的森林
来自维基百科
(关于查找和并集)这两种技术互相补充; 一起应用,每个操作的摊销时间仅O(α(n)),其中α(n)是函数f(n)= A的反函数(n,n),而A是快速增长的极其快的Ackermann函数。 因为α(n)是此函数的逆函数,所以对于所有的远程实际值n,α(n)小于5。因此,每操作的摊销运行时间实际上是一个小的常数。
(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.
为什么是阿克曼人?来自
rel = nofollow>克鲁斯卡尔算法
函数lg * n请注意,lg * n是一个非常慢的函数,比lg n慢得多。在中,事实要慢于lg lg n或lg n的任何有限组成。它是函数f(n)= 2 ^ 2 ^ 2 ^ ... ^ 2的逆,n次。对于n> = 5,f(n)大于宇宙中中的原子数。因此,对于所有意图和任何目的,对于的任何实数n值,f(n)的逆都是恒定的。 从工程师的角度来看, Kruskal的算法在O(e)中运行。 当然,请注意,从理论家的角度来看,O(e)的真实结果仍然是的重大突破。 完整的图片并不完整,因为的实际最佳结果表明lg * n可以用A(p,n)的倒数代替lg * n是Ackermann的函数,一个函数,爆炸性地增长。 Ackermann函数的逆是与lg * n相关的,是更好的结果,但证明甚至更难。
更多推荐
为什么Ackermann函数与用于不相交集的联合查找算法的摊余复杂性有关?
发布评论