This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 6.851: Advanced Data Structures Spring 2010 Lecture 12 March 16, 2010 Prof. Erik Demaine Scribe: Haitao Mao 1 Overview In the last lecture we covered the round elimination technique and lower bounds on the static predecessor problem. In this lecture we cover the signature sort algorithm for sorting large integers in linear time. 2 Introduction Thorup [7] showed that if we can sort n wbit integers in O ( nS ( n,w )), then we have a priority queue that can support the insertion, deletion, and find minimum operations in O ( S ( n,w )). To get a constant time priority queue, we need linear time sorting, but whether we can get this is still an open problem. Following is a list of results outlining the current progress on this problem. Comparison model: O ( n lg n ) Counting sort: O ( n + 2 w ) Radix sort: O ( n w lg n ) van Emde Boas: O ( n lg w ), improved to O ( n lg w lg n ) (see [6]). Signature sort: linear when w = (lg 2+ n ) (see [2]). Han [4]: O ( n lg lg n ) deterministic, AC RAM. Han and Thorup: O ( n lg lg n ) randomized, improved to O ( n q lg w lg n ) (see [5] and [6])). Today, we will focus entirely on the details of the signature sort. This algorithm works whenever w = (log 2+ n ). Radix sort, which we should already know, works for smaller values of w , namely when w = O (log n ). For all other values of w and n , it is open whether we can sort in linear time. We previously covered the van Emde Boas tree, which allows for O ( n log log n ) sorting whenever w = log O (1) n . The best we have done in the general case is a randomized algorithm in O ( n q log w log n ) time by Han, Thorup, Kirkpatrick, and Reisch. 1 3 Sorting for w = (log 2+ n ) The signature sort was developed in 1998 by Andersson, Hagerup, Nilsson, and Raman [2]. It sorts n wbit integers in O ( n ) time when w = (log 2+ n ) for some > 0. This is a pretty complicated sort, so we will build the algorithm from the ground up. First, we give an algorithm for sorting bitonic sequences using methods from parallel computing. Second, we show how to merge two words of k log n log log n elements in O (log k ) time. Third, using this merge algorithm, we create a variant of mergesort called packed sorting , which sorts n bbit integers in O ( n ) time when w 2( b + 1)log n log log n . Fourth, we use our packed sorting algorithm to build signature sort....
View
Full
Document
 Fall '10
 ErikDemaine
 Data Structures

Click to edit the document details