为什么Ackermann函数与用于不相交集的联合查找算法的摊余复杂性有关?

编程入门 行业动态 更新时间:2024-10-12 16:29:32
本文介绍了为什么Ackermann函数与用于不相交集的联合查找算法的摊余复杂性有关?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人可以给我直观的解释为什么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函数与用于不相交集的联合查找算法的摊余复杂性有关?

本文发布于:2023-10-24 20:38:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524946.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:复杂性   算法   函数   Ackermann

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!