A simple shuffle-based stable in-place merge algorithm

被引:10
|
作者
Dalkilic, Mehmet Emin [1 ]
Acar, Elif [1 ]
Tokatli, Gorkem [1 ]
机构
[1] Ege Univ, Int Comp Enstitute, TR-35100 Izmir, Turkey
来源
WORLD CONFERENCE ON INFORMATION TECHNOLOGY (WCIT-2010) | 2011年 / 3卷
关键词
Algorithms; merge; in-place merging; perfect shuffle; stable sorting; TIME;
D O I
10.1016/j.procs.2010.12.172
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Sorting is one of the most fundamental problems in computer science. Divide-and-conquer based sorting algorithms use successive merging to combine sorted arrays; therefore performance of merging is critical for these types of applications. The classic merge algorithm uses an extra O(m+n) memory for combining arrays of size m and n. Some improvements on merge algorithms include in-place methods which reduce or eliminate additional memory space, thus getting more practical value. We present a new in-place, stable and shuffle-based merge algorithm which is simple to understand and program. The algorithm starts applying perfect shuffle on two sorted arrays. Then, using the knowledge that odd and even-indexed numbers are sorted among themselves, comparisons are made and then misplaced elements are relocated by applying successive inverse perfect shuffle and swap operations on blocks. We have implemented and compared the new algorithm with the classical merge algorithm and the shuffle-based algorithm of Ellis and Markov (Comp. J. 1(2000)). Through experiments we have observed that the new algorithm exhibits linear run time behaviour and has dramatic performance improvement compared to the Ellis and Markov's algorithm [1]. (C) 2010 Published by Elsevier Ltd. Selection and/or peer-review under responsibility of the Guest Editor.
引用
收藏
页数:6
相关论文
共 14 条
  • [1] A simple algorithm for in-place merging
    Chen, JC
    INFORMATION PROCESSING LETTERS, 2006, 98 (01) : 34 - 40
  • [2] A Time-space Efficient Algorithm for Parallel k-way In-place Merging based on Sequence Partitioning and Perfect Shuffle
    Salah, Ahmad
    Li, Kenli
    Liao, Qing
    Hashem, Mervat
    Li, Zhiyong
    Chronopoulos, Anthony T.
    Zomaya, Albert Y.
    ACM TRANSACTIONS ON PARALLEL COMPUTING, 2020, 7 (02)
  • [3] Lazy-Merge: A Novel Implementation for Indexed Parallel K-Way In-Place Merging
    Salah, Ahmad
    Li, Kenli
    Li, Keqin
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2016, 27 (07) : 2049 - 2061
  • [4] IN-PLACE RADIX-3 FAST HARTLEY TRANSFORM ALGORITHM
    ZHAO, ZJ
    ELECTRONICS LETTERS, 1992, 28 (03) : 319 - 321
  • [5] Dynamic Algorithm based on split and merge for Data Streams Clustering
    Ounali, Chedi
    Ben Rejab, Fahmi
    Nouira, Kaouther
    JOURNAL OF INFORMATION ASSURANCE AND SECURITY, 2018, 13 (04): : 137 - 148
  • [6] An in-place heapsort algorithm requiring n log n plus n log* n-0.546871n comparisons
    Hasan, Md. Mahbubul
    Shahjalal, Md.
    Kaykobad, M.
    INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 2011, 88 (16) : 3350 - 3360
  • [7] A split-merge clustering algorithm based on the k-nearest neighbor graph
    Wang, Yan
    Ma, Yan
    Huang, Hui
    Wang, Bin
    Acharjya, Debi Prasanna
    INFORMATION SYSTEMS, 2023, 111
  • [8] A Simple Truly Self-Starting and L-Stable Integration Algorithm for Structural Dynamics
    Li, Jinze
    Yu, Kaiping
    INTERNATIONAL JOURNAL OF APPLIED MECHANICS, 2020, 12 (10)
  • [9] A novel Move-Split-Merge based Fuzzy C-Means algorithm for clustering time series
    Ba, Wei
    Gu, Zongquan
    EVOLVING SYSTEMS, 2024, 15 (06) : 2273 - 2295
  • [10] Development of a Simulation-Based Approach for Cold In-Place Recycled Pavement Moisture-Content Prediction Using Ground-Penetrating Radar
    Cao, Qingqing
    Abufares, Lama
    Al-Qadi, Imad
    TRANSPORTATION RESEARCH RECORD, 2022, 2676 (10) : 682 - 694