arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1012.0956cs.DScs.CC
收藏

Floyd堆构造算法最坏情况下比较次数的一个紧界

A tight bound on the worst-case number of comparisons for Floyd's heap construction algorithm

Ioannis Paparrizos

摘要:

本文导出了Floyd的著名堆构造算法的最坏情况比较次数的一个严格界。结果表明,在最坏的情况下,最多执行2n-2μ(n)-σ(n)次比较,其中μ(n)是密钥数n的二进制表示中1的个数,σ(n)是最后一个1之后的0的个数.

英文摘要:

In this paper a tight bound on the worst-case number of comparisons for Floyd's well known heap construction algorithm, is derived. It is shown that at most 2n-2μ(n)-σ(n) comparisons are executed in the worst case, where μ(n) is the number of ones and σ(n) is the number of zeros after the last one in the binary representation of the number of keys n.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑