Journal Article10.1007/BF01178508
Sorting multisets stably in minimum space
Jyrki Katajainen,Tomi Pasanen +1 more
27
TL;DR: This paper presents an aminimum space algorithm that sortsstably a multiset in asymptoticallyOptimal worst-case time and develops linear-time in-place algorithms for the following problems, which have interest of their own.
read more
Abstract: We consider the problem of sorting a multiset of sizen containingm distinct elements, where theith distinct element appearsn i times. Under the assumption that our model of computation allows only the operations of comparing elements and moving elements in the memory,Ω(n logn ? ? i=1 m n i logn i +n) is known to be a lower bound for the computational complexity of the sorting problem. In this paper we present aminimum space algorithm that sortsstably a multiset in asymptoticallyOptimal worst-case time. A Quicksort type approach is used, where at each recursive step the median is chosen as the partitioning element. To obtain a stable minimum space implementation, we develop linear-time in-place algorithms for the following problems, which have interest of their own:
Stable unpartitioning: Assume that ann-element arrayA is stably partitioned into two subarraysA 0 andA 1. The problem is to recoverA from its constitutentsA 0 andA 1. The information available is the partitioning element used and a bit array of sizen indicating whether an element ofA 0 orA 1 was originally in the corresponding position ofA.
Stable selection: The task is to find thekth smallest element in a multiset ofn elements such that the relative order of identical elements is retained.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Space-efficient geometric divide-and-conquer algorithms
TL;DR: An approach to simulate divide-and-conquer space-efficiently, stably selecting and unselecting a subset from a sorted set, and computing the kth smallest element in one dimension from a multi-dimensional set that is sorted in another dimension are developed.
•Posted Content
Radix Sorting With No Extra Space
TL;DR: This work presents a simple, stable, integer sorting algorithm for words of size O(log n), which works in O(n) time and uses only O(1) words of extra memory on a RAM model.
Radix sorting with no extra space
Gianni Franceschini,S. Muthukrishnan,Mihai Patrascu +2 more
- 08 Oct 2007
TL;DR: In this paper, a stable, stable integer sorting algorithm for words of size O(log n) was presented, which works in O(n) time and uses only O(1) words of extra memory on a RAM model.
42
Selection and sorting in the "restore" model
Timothy M. Chan,J. Ian Munro,Venkatesh Raman +2 more
- 05 Jan 2014
TL;DR: This model considers the classical selection and sorting problems in a model where the initial permutation of the input has to be restored after completing the computation, and shows how to match the time bound of any word-RAM integer-sorting algorithms using O(ne) words of extra space.
38
Space-efficient algorithms for computing the convex hull of a simple polygonal line in linear time
Hervé Brönnimann,Timothy M. Chan +1 more
TL;DR: In this article, the convex hull of a simple polygonal line is computed in O(log n) space, and a simple self-contained solution that uses O(1) space is presented.
30
References
Time bounds for selection
TL;DR: The number of comparisons required to select the i-th smallest of n numbers is shown to be at most a linear function of n by analysis of a new selection algorithm-PICK.
1.5K
Sorting and Searching in Multisets
J. Ian Munro,Philip M. Spira +1 more
TL;DR: A lower bound on finding the mode of a multiset as a function of the actual multiplicity is given, and it is demonstrated that the bound can be achieved to within a multiplicative constant.
96