计算机科学 > 数据结构与算法
[提交于 2015年8月4日]
标题:A Provably, Linear Time, In-place and Stable Merge Algorithm via the Perfect Shuffle
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We reconsider a recently published algorithm (Dalkilic et al.) for merging lists by way of the perfect shuffle. The original publication gave only experimental results which, although consistent with linear execution time on the samples tested, provided no analysis. Here we prove that the time complexity, in the average case, is indeed linear, although there is an Omega(n^2) worst case. This is then the first provably linear time merge algorithm based on the use of the perfect shuffle. We provide a proof of correctness, extend the algorithm to the general case where the lists are of unequal length and show how it can be made stable, all aspects not included in the original presentation and we give a much more concise definition of the algorithm.
提交历史
来自:John Ellis[v1] 2015年8月4日 星期二 00:00:00 UTC