算法发现的大小为N最大堆最大的K个为O(K)的时间?

编程入门 行业动态 更新时间:2024-10-27 13:31:41
本文介绍了算法发现的大小为N最大堆最大的K个为O(K)的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

的O(K *的logK)算法以寻找最大K个在大小为N最大堆是众所周知的。我听说,有一个O(K)算法来解决这个问题。我不觉得这个文献。任何人都可以给这个任何指针?谢谢!

The O(K * logK) algorithm for finding the largest K numbers in a max heap of size N is well known. I heard about that there is an O(K) algorithm for solving this problem. I do not find the literature on this. Could anyone give any pointers on this? Thanks!

推荐答案

我终于发现,描述了算法的纸张。有关于 Quora的。

I finally find the paper that describes the algorithm. There is a similar question on Quora.

该文件,的优化算法选择在闽堆 ,由GN弗雷德里克森,描述的算法。以下是摘要:

The paper, "An Optimal Algorithm for Selection in a Min-Heap", by G.N. Frederickson, describes the algorithm. The following is the abstract:

这是O(K) - 时间的算法是psented为二进制最小堆大小n⪢k中选择第k个最小元素$ P $。该方法使用递归定义的数据结构中要求在堆中的某些元素的层次分组。结果建立的部分顺序的量,第k个最小的元素可以在时间正比于信息理论下限来确定进一步的例子。两个应用程序,以一个资源分配问题和第k最小生成树的枚举,识别

An O(k)-time algorithm is presented for selecting the kth smallest element in a binary min-heap of size n⪢k. The approach uses recursively defined data structures that impose a hierarchical grouping on certain elements in the heap. The result establishes a further example of a partial order for which the kth smallest element can be determined in time proportional to the information theory lower bound. Two applications, to a resource allocation problem and to the enumeration of the k smallest spanning trees, are identified.

更多推荐

算法发现的大小为N最大堆最大的K个为O(K)的时间?

本文发布于:2023-11-29 18:12:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1647205.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:算法   大堆   大小   发现   时间

发布评论

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

>www.elefans.com

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