高级检索

    二路归并分类算法

    Binary Merging/Sorting Algorithm

    • 摘要: 本文提出将n元素的分类问题转化为对m个有序块的归并问题,应用二路归并树来完成对初始数据的分类。算法的最坏时间复杂性为o(nlogm),m∈(1,n/2),最佳时间复杂性为O(n),总的比较次数不超过nlogm+n—1,m∈(1,n/2)。明显优于现行o(nlogn)算法。

       

      Abstract: This paper describes the application of the binary merging tree to the design of the sorting algorithm, to merge m sorted blocks instead of sorting n elements. This algorithm's time complexity is O (nlogm). m∈(1,n/2) for the worst case. Its performance is O(n) for the optimal case, and the comparison time is not more than nlogm +n—1, m∈(1,n/2). This is obviously superior to the currently popular sorting algorithms whose time cost is O (nlogn).

       

    /

    返回文章
    返回