Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

›› 2005, Vol. 31 ›› Issue (06): 76-.

• Papers • Previous Articles     Next Articles

A New Algorithm of Calculating Enumeration Number of Any Max-heap

DONG Zhaoan, SUN Qiang   

  1. ( Dept. of Computer Science and Technology, East China Normal University, Shanghai 200062)
  • Published:2005-03-25

最大值堆的枚举计数公式及其实现

董兆安,孙强   

  1. 华东师范大学计算机科学技术系,华东师范大学计算机科学技术系 上海 200062

Abstract: According to the definition of the max-heap,this paper presents a new enumeration counting formula of the max-heap while generating the n-tuples permutation representing a n-node max-heap. And the special condition when the max-heap is a full binary tree is discussed . At last, an O( n) time algorithm of calculating the enumeration number of any max-heap is given.

摘要: 根据堆的定义,在构造与最大值堆对应的n元排列的过程中推导出了n个结点最大值堆的枚举总数目的计算公式,讨论了当堆为满堆时的情况,给出了一个复杂度为O(n)的算法实现了任意最大值堆的枚举计数公式。

关键词: 最大值堆, 枚举公式, 算法, 排列

CLC Number: