佩尔堆,就像斐波那契堆
是否有基于佩尔序列(或佩尔数)而不是斐波那契数的堆(如斐波那契堆)?
Is there any heap based on Pell sequence(or Pell number) instead of Fibonacci number(like the Fibonacci heap)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
需要注意的一件事是,斐波那契堆并不是真正“基于”斐波那契数(它的结构看起来完全不像与斐波那契数相关);这是对斐波那契数出现的斐波那契堆的分析。您使用斐波那契数列将 n 个元素堆中的树数与第 n 个斐波那契数相关的值绑定起来,从而证明某些操作的最坏情况行为不会比 O(log n )。
至于你关于佩尔数的问题,我不知道任何依赖于该序列的数据结构(我实际上以前没有遇到过该序列!)。斐波那契序列比其他类似的循环序列出现得如此之多,是因为该序列有许多有趣的属性,而这些属性不一定适用于其他循环关系;我在对此问题的回答中写到了这一点。我假设佩尔数可能在某些数据结构或分析中可用,但满足递归关系所需的结构似乎在我遇到的任何数据结构或算法中都没有出现。
编辑:我确实发现了一篇有趣的论文,使用佩尔数来分析某些值序列,您可以找到这里。
希望这有帮助!
One thing to note is that the Fibonacci heap is not really "based" on the Fibonacci number (its structure doesn't look at all like it's related to Fibonacci numbers); it's the analysis of the Fibonacci heap where the Fibonacci numbers appear. You use the Fibonacci sequence to bound the number of trees in the heap of n elements with a value related to the nth Fibonacci number, thus demonstrating that the worst-case behavior of some of the operations can't be worse than O(log n).
As for your question about Pell numbers, I am not aware of any data structures that rely on the sequence (I actually hadn't encountered that sequence before!). The Fibonacci sequence arises so much instead of other similar recurrent sequences due to a lot of interesting properties of the sequence that aren't necessarily true of other recurrence relations; I wrote about this in my answer to this question. I would assume that Pell numbers might be usable in some data structures or analyses, but the structure required to satisfy the recurrence relation doesn't seem to arise in any data structures or algorithms I have encountered.
EDIT: I did find an interesting paper using Pell numbers in the analysis of certain sequences of values, which you can find here.
Hope this helps!