MIT6_851S10_lec12

MIT6_851S10_lec12 - 6.851: Advanced Data Structures Spring...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6.851: Advanced Data Structures Spring 2010 Lecture 12 — March 16, 2010 Prof. Erik Demaine 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 w-bit 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 · lg w n ) • van Emde Boas: O ( n lg w ), improved to O ( n lg lg w n ) (see [6]). Signature sort: linear when w = Ω(lg 2+ ε n ) (see [2]). • Han [4]: O ( n lg lg n ) deterministic, AC RAM. • w Han and Thorup: O ( n √ lg lg n ) randomized, improved to O ( n lg 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 log log w 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 w-bit 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 b-bit integers in O ( n ) time when w ≥ 2( b + 1)...
View Full Document

This note was uploaded on 03/31/2011 for the course EECS 6.851 taught by Professor Erikdemaine during the Spring '10 term at MIT.

Page1 / 7

MIT6_851S10_lec12 - 6.851: Advanced Data Structures Spring...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online