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
关键词
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
相关论文
共 50 条
  • [1] A simple algorithm for in-place merging
    Chen, JC
    INFORMATION PROCESSING LETTERS, 2006, 98 (01) : 34 - 40
  • [2] A simple algorithm for in-place merging
    Department of Communication, Donghua University, 1882 Yan-An West Road, Shanghai, 200051, China
    Inf. Process. Lett., 1 (34-40):
  • [3] THE ANALYSIS OF A SIMPLE IN-PLACE MERGING ALGORITHM
    SPRUGNOLI, R
    JOURNAL OF ALGORITHMS, 1989, 10 (03) : 366 - 380
  • [4] Shuffle-Based Verification of Component Compatibility
    Zuberek, W. M.
    NEW RESULTS IN DEPENDABILITY AND COMPUTER SYSTEMS, 2013, 224 : 543 - 552
  • [5] Ratio based stable in-place merging
    Kim, Pok-Son
    Kutzner, Arne
    THEORY AND APPLICATIONS OF MODELS OF COMPUTATION, PROCEEDINGS, 2008, 4978 : 246 - +
  • [6] A SHUFFLE-BASED ALTERNATIVE TO THE ADM INTERCONNECTION ARCHITECTURE
    PADMANABHAN, K
    JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 1993, 18 (01) : 14 - 24
  • [7] A Shuffle-Based Artificial Bee Colony Algorithm for Solving Integer Programming and Minimax Problems
    Brajevic, Ivona
    MATHEMATICS, 2021, 9 (11)
  • [8] An in-place Quickhull algorithm
    Park, Kyuseo
    Schneider, Markus
    GEOINFORMATICA, 2025,
  • [9] Optimizing stable in-place merging
    Chen, JC
    THEORETICAL COMPUTER SCIENCE, 2003, 302 (1-3) : 191 - 210
  • [10] Shuffle-based Private Set Union: Faster and More Secure
    Jia, Yanxue
    Sun, Shi-Feng
    Zhou, Hong-Sheng
    Du, Jiajun
    Gu, Dawu
    PROCEEDINGS OF THE 31ST USENIX SECURITY SYMPOSIUM, 2022, : 2947 - 2964