Sorting streamed multisets

被引:0
作者
Gagie, Travis [1 ]
机构
[1] Univ Piemonte Orientale, Dipartimento Informat, Alessandria, AL, Italy
关键词
Algorithms; On-line algorithms; Sorting; Streaming algorithms;
D O I
10.1016/j.ipl.2008.06.006
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Sorting is a classic problem and one to which many others reduce easily. In the streaming model, however, we are allowed only one pass over the input and sublinear memory, so in general we cannot sort. In this paper we show that, to determine the sorted order of a multiset s of size If containing sigma >= 2 distinct elements using one pass and o(n log sigma) bits of memory, it is generally necessary and sufficient that its entropy H = o(log sigma). Specifically, if S = {S-1.....S-n) and S-i1.....S-in is the stable sort of s, then we can compute i(1).....i(n) in one pass using O((H + 1)n) time and O(Hn) bits of memory, with a simple combination of classic techniques. On the other hand, in the worst case it takes that much memory to compute any sorted ordering of s in one pass. (C) 2008 Elsevier B.V. All rights reserved.
引用
收藏
页码:418 / 421
页数:4
相关论文
共 8 条
[1]  
Cormen T. H., 2001, Introduction to Algorithms, V2nd
[2]  
ELIAS P, 1975, IEEE T INFORM THEORY, V21, P194, DOI 10.1109/TIT.1975.1055349
[3]  
GAGIE T, 2007, P 10 IT C THEOR COMP, P130
[4]  
Makinen V., 2005, Nordic Journal of Computing, V12, P40
[5]  
Munro I., 1976, SIAM Journal on Computing, V5, P1, DOI 10.1137/0205001
[6]   SELECTION AND SORTING WITH LIMITED STORAGE [J].
MUNRO, JI ;
PATERSON, MS .
THEORETICAL COMPUTER SCIENCE, 1980, 12 (03) :315-323
[7]  
Muthukrishnan S, 2005, DATA STREAMS ALGORIT
[8]   SELF-ADJUSTING BINARY SEARCH-TREES [J].
SLEATOR, DD ;
TARJAN, RE .
JOURNAL OF THE ACM, 1985, 32 (03) :652-686