Download presentation
Presentation is loading. Please wait.
Published byJoleen Bradley Modified over 9 years ago
1
Unified Access Bound 1 [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] Dictionary: Insert(x), Delete(x), Search(x) Comparison model 7423591 Solution 1: Balanced search tree Solution 2: Unordered linked list Search(2), Search(2), Search(2), Search(5), Search(5), Search(5) 2753914 O(log n) O(n) move-to-front The paper initiated the study of competitivenes analysis of online algorithms for list ordering, search-trees, paging algorithms,... (move-to-front is 2-competitive) [D.D. Sleator, R.E. Tarjan, Amortized Efficiency of List Update Rules, Pro. 16 th Annual ACM Symposium on Theory of Computing, 488-492, 1984]
2
Access sequences - examples X 1 = 1, 2, 3,..., n, 1, 2, 3,..., n, 1, 2, 3,... X 2 = 1, n, 1, n, 1, n,... X 3 = 1, n/2, 2, n/2+1, 3, n/2+2,..., n/2, n, 1,... 2
3
Access sequence X = (x 1, x 2,..., x m ) Static optimal O(log (1/p(x i ))) Sequential-access boundO(1) Static finger boundO(log d i (f,x i )) Dynamic finger boundO(log d i (x i, x i-1 )) Working set boundO(log w i (x i )) Unified boundO(min y S i log(w i (y)+d i (x i, y))) 3 Sorted list Move-to-front list xixi xixi wi (xi)wi (xi) x i-1 f di(f,xi)di(f,xi)d i (x i,x i-1 ) Finger search tree
4
Splay trees (amortized) Static optimal O(log (1/p(x i ))) Sequential-access boundO(1) Static finger boundO(log d i (f,x i )) Dynamic finger boundO(log d i (x i, x i-1 )) Working set boundO(log w i (x i )) Unified boundO(min y S i w i (y)+d i (x i, y)) 4 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. Combinatorica 5(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] 1 2 1 1 3 Open
5
[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, Acta Informatica 1, 14–25, 1971] 5 Static optimality xixi ABCDEFGHIJ p(x i )0.100.050.020.600.030.080.020.060.010.03 D A G 1.0 0.17 0.23 B 0.07 C 0.02 F 0.11 E 0.03 H 0.10 I 0.01 J 0.04 Split ½ weight both children Depth i subtree weight (½) i Depth x i log(1/p(x i )) Static optimal Construction: Compute prefix sums + Exponential search O(n)
6
Working-set structure 6 T1T1 T2T2 T3T3 T0T0 L3L3 L2L2 L1L1 L0L0 L = L 0 +L 1 + ∙∙∙ = move-to-front list |L i |=2 2 i T i = search tree over L i Insert, Delete = O(log n), Search = O(log w j ) Search(T 0 ) + ∙∙∙ + Search(T j ) = log(2 2 0 ) + ∙∙∙ + log(2 2 i ) 4∙log(2 2 i-1 ) 4∙log w j wjwj [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]
7
( ) Unified structure 7 T1T1 T2T2 T3T3 T0T0 [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] Search trees of a subset of the elements Finger search tree over all elements predecessor successor F Lemma 7 w i (y) 2 2 k and x and y rank distance 2 2 k, then x within rank distance (k+4)2 2 k of some y’ T 0 ∙∙∙ T k
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.