首页> 外文会议>International Symposium on Algorithms and Computation >Three Sorting Algorithms Using Priority Queues
【24h】

Three Sorting Algorithms Using Priority Queues

机译:使用优先级队列的三种排序算法

获取原文

摘要

We establish a lower bound of B(n) = n「log n」-2~「log n」+ 1~1 on the number of comparisons performed by any algorithm that uses priority queues to sort n elements. Three sorting algorithms using priority queues are introduced. The first algorithm performs the same comparisons as the classical Mergesort algorithm, but in a different order. The second algorithm performs at most 2nlogn+O(n) comparisons, with the advantage of being adaptive; meaning that it runs faster when the input equence has some presortedness. In particular, we show that this algorithm sorts an already sorted sequence in linear time; a fact that is not obvious since there is no special checks to guarantee this behavior. The third algorithm is almost implicit; it can be implemented using the input array and less than n extra bits. The number of comparisons performed by this algorithm is at most B(n) + 2.5ri. The three algorithms have the advantage of producing every element of the sorted output, after the first, in O(logn), and can be implemented to be practically efficient.
机译:我们建立了B(n)= n「log n「-2 = log n 1〜1的下限,根据任何使用优先级队列对n个元素进行排序的任何算法执行的比较数。介绍了使用优先级队列的三种排序算法。第一算法执行与经典合并算法相同的比较,但是以不同的顺序。第二种算法以最多2nLogn + O(n)比较执行,具有适应性的优点;意味着当输入股票有一些推出时,它运行得更快。特别是,我们表明该算法在线性时间中排序已经排序;由于没有特殊检查以保证这种行为,因此不明显的事实。第三种算法几乎隐含;它可以使用输入阵列和额外的位数来实现。通过该算法执行的比较数最多是B(n)+ 2.5ri。这三种算法具有在O(LOGN)中的第一个中产生排序输出的每个元素的优点,并且可以实现为实际有效。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号