{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_851S10_lec12

MIT6_851S10_lec12 - 6.851 Advanced Data Structures Spring...

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

View Full Document Right Arrow Icon
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 0 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
Image of page 1

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

View Full Document Right Arrow Icon
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) log n log log n . Fourth, we use our packed sorting algorithm to build signature sort.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern