1 / 13

Ian Munro University of Waterloo Joint work with Andrej Brodnik (Ljubljana & Luleå)

A Worst Case, Constant Time Priority Queue: Beating a Lower Bound. Ian Munro University of Waterloo Joint work with Andrej Brodnik (Ljubljana & Luleå) Svante Carlsson (Blekinge Inst. Tech.) Johan Karlsson (Luleå).

korene
Download Presentation

Ian Munro University of Waterloo Joint work with Andrej Brodnik (Ljubljana & Luleå)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Worst Case, Constant Time Priority Queue:Beating a Lower Bound Ian Munro University of Waterloo Joint work with • Andrej Brodnik (Ljubljana & Luleå) • Svante Carlsson (Blekinge Inst. Tech.) • Johan Karlsson (Luleå)

  2. Lower Bounds:What do they mean? • If upper and lower bounds match, the problem is solved. • If lower bound exceeds the time you can take … give up

  3. Lower Bounds:What do they mean? • If upper and lower bounds match, the problem is solved. • If lower bound exceeds the time you can take … give up • Lower bounds, and upper bounds, are proven under a model. • So if you have to “get under” a lower bound -focus on the operations the model does not permit • It’s time to become imaginative in terms of permitted operations

  4. Beating Lower Bounds: Examples • Searching: lg n lower bound on comparisons, so hash • lg n time becomes constant • Sorting: n lg n lower bound on comparisons, so use variants of bucketing • n lg n time easily linear on average • n lg n time becomes n lg lg n even in worst case

  5. Beating the Lower Bound … Another Case Self organizing linear search… • Move to front heuristic (rheuistic) is within a constant factor of offline optimal for linear search, amortized cost of searching is ~ 1/pi under “exchange adjacent” model • But 1 2 3 4 … n/2 n/2+1 … n costs (n2) • Under “exchange any two” model offline cost is ~lg(1/pi) … comparable to splay trees

  6. The Problem at hand: Extended Priority Queue • van Emde Boas (SWAT i.e. FOCS 1975) • Universe integers [1,..m] {n of which are present} • Operations: insert / delete find least value  x (or greatest ) • Bound: O(lg lg m) time • Space: Improved to O(m) bits • Model: Standard RAM, with bit twiddling

  7. Some Subsequent Work • Kurt Mehlhorn, Stephan Näher and Helmut Alt (SiComp ‘88): vEB is optimal - Lower bound(lg lg m) on pointer machine • Peter Miltersen (STOC ‘94): Lower bound( lg lg m) on a RAM • Paul Beame and Faith Fich (STOC ‘99): parameterization by number of values present matching upper & lower bounds- (lg n/ lg lg n) • Ram model is rather powerful, how can we extend it for our problem?

  8. Another Model: Rambo • Random Access Machine with Byte Overlap Mike Fredman and Dan Willard • Several words can share bits:

  9. Elements are at leaves; an internal node is flagged if it has a descendant lg n bit RAMBO word at leaf takes bit pattern of flags on path to root Can find lowest ancestor in O(1) time Can we do better under this model?

  10. The vEB Stratified Tree Internal node keeps track of “outside” bottom elements 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

  11. A Problem • Any individual leaf may be referred to by many ancestors • So one insertion/deletion can require up to 2lg n reference changes • Modify the approach

  12. Split Tagged Tree Keep track of left / right inside leaf … if different from parent’s Each leaf can be referred to by at most two ancestors

  13. So what do we have? • Constant time “extended priority queue” … two memory accesses for search, three for update on our model • How much space do we need? • 2m + O(lg m) bits of ordinary RAM • m bits of RAMBO memory in a particular configuration we call Yggdrasil • and it has been implemented in hardware

More Related