1 / 7

Unified A ccess B ound

Unified A ccess B ound. Dictionary : Insert ( x ), Delete ( x ), Search ( x ) Comparison model. Solution 1 : Balanced search t ree Solution 2 : Unordered l inked list. O(log n ) O( n ). move-to-front. 2. 7. 4. 1. 9. 5. 3. Search (2), Search (2), Search (2).

signa
Télécharger la présentation

Unified A ccess B ound

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. UnifiedAccess Bound • Dictionary: Insert(x), Delete(x), Search(x) • Comparison model • Solution 1: Balancedsearchtree • Solution 2: Unorderedlinked list • O(log n) • O(n) move-to-front 2 7 4 1 9 5 3 Search(2), Search(2), Search(2) , Search(5), Search(5), Search(5) 5 2 7 4 1 9 3 • [D.D. Sleator, R.E. Tarjan, Amortized Efficiency of List Update Rules, Pro. 16th Annual ACM Symposium on Theory of Computing, 488-492, 1984] The paperinitiated the study of competitivenesanalysis of online algorithmsfor list ordering, search-trees, pagingalgorithms, ... (move-to-front is 2-competitive) [M. Bădoiu, R. Cole, E.D. Demaine, J.Iacono, A unified access bound on comparison-based dynamic dictionaries, Theoretical Computer Science, 382(2), 86-96, 2007]

  2. Access sequences - examples X1 = 1, 2, 3, ..., n, 1, 2, 3, ..., n, 1, 2, 3, ... X2= 1, n, 1, n, 1, n, ... X3= 1, n/2, 2, n/2+1, 3, n/2+2, ..., n/2, n, 1, ...

  3. Access sequenceX = (x1, x2, ..., xm) Finger searchtree di(f,xi) di(xi,xi-1) Sorted list f xi xi-1 Move-to-front list xi Static optimal O(log (1/p(xi))) Sequential-accessbound O(1) Static finger boundO(log di(f,xi)) Dynamic finger bound O(log di(xi,xi-1)) Working set bound O(log wi(xi)) Unifiedbound O(minySi log(wi(y)+di(xi,y))) wi(xi)

  4. Splaytrees (amortized) 1 2 1 3 1 Open 1 [D.D. Sleator, R.E.Tarjan, Self-Adjusting Binary Search Trees, J. ACM 32(3), 652-686, 1985] 2 [R.E. Tarjan, Sequential access in play trees takes linear time. Combinatorica5(4), 367-378, 1985] 3 [R. Cole, B. Mishra, J.P. Schmidt, A. Siegel, On the Dynamic Finger Conjecture for Splay Trees. Part I: Splay Sorting log n-Block Sequences. SIAM J. Computing, 30(1), 1-43, 2000] [R. Cole,On the Dynamic Finger Conjecture for Splay Trees. Part II: The Proof. SIAM J. Computing, 30(1), 44-85, 2000] Static optimal O(log (1/p(xi))) Sequential-accessbound O(1) Static finger boundO(log di(f,xi)) Dynamic finger bound O(log di(xi,xi-1)) Working set bound O(log wi(xi)) Unifiedbound O(minySiwi(y)+di(xi,y))

  5. Staticoptimality • Split  ½ weightbothchildren • Depthisubtreeweight  (½)i • Depthxi  log(1/p(xi)) • Static optimal D 1.0 G A 0.23 0.17 B F H 0.07 0.11 0.10 C J E 0.02 0.03 0.04 I 0.01 Construction: Computeprefix sums + Exponentialsearch O(n) [T.C. Hu, A.C. Tucker, Optimal computer search trees and variable-length alphabetic codes, SIAM Journal on Applied Mathematics 21 (4), 514–532, 1971] [D.E. Knuth, Optimum binary search trees, ActaInformatica1, 14–25, 1971]

  6. Working-setstructure [M. Bădoiu, R. Cole, E.D. Demaine, J. Iacono, A unified access bound on comparison-based dynamic dictionaries, Theoretical Computer Science, 382(2), 86-96, 2007] T3 T2 T1 T0 L1 L2 L3 L0 wj Search(T0) + ∙∙∙ + Search(Tj) = log(220) + ∙∙∙ + log(22i)  4∙log(22i-1)  4∙log wj L = L0+L1+ ∙∙∙ = move-to-front list |Li|=22i Ti = searchtree over Li Insert, Delete = O(log n), Search = O(log wj)

  7. Unifiedstructure [M. Bădoiu, R. Cole, E.D. Demaine, J. Iacono, A unified access bound on comparison-based dynamic dictionaries, Theoretical Computer Science, 382(2), 86-96, 2007] Searchtrees of a subsetof the elements T3 T2 T1 ( ) T0 Finger searchtreeover all elements Lemma 7 wi(y) 22kand x and y rank distance  22k, thenxwithin rank distance (k+4)22kof somey’T0∙∙∙Tk F predecessor successor

More Related