Persistent Data Structures Version Control Ephemeral v 0

  • Slides: 8
Download presentation
Persistent Data Structures (Version Control) Ephemeral v 0 Partial persistence version list Full persistence

Persistent Data Structures (Version Control) Ephemeral v 0 Partial persistence version list Full persistence version tree v 0 Confluently persistence version DAG v 0 Purely functional v 0 car cdr update v 1 v 2 v 3 v 4 v 5 v 6 update & query v 1 query only query v 1 v 2 v 3 v 6 v 4 v 5 never modify only create new pairs only DAGs v 1 v 2 v 3 v 5 updates at leaves any version can be copied query all versions update/merge/query all versions Retroactive v 0 v 1 v 2 v 3 update & query all versions updates in the past propragate v 4 1

Retroactive Data Structures [E. D. Demaine, J. Iacono, S. Langerman, Retroactive Data Structures, Proc.

Retroactive Data Structures [E. D. Demaine, J. Iacono, S. Langerman, Retroactive Data Structures, Proc. 15 th Annual ACMSIAM Symposium on Discrete Algorithms, 274 -283, 2004] r v 0 v 1 v 2 v 3 v 4 m m Total number of updates/versions r Distance from current time n Maximal data structure size at any time Partial retroactive Update all versions & query current Full retroactive Update & query all versions 2

Rollback Full Retroactivity current v 0 Update u 1 Change 1 v 2 u

Rollback Full Retroactivity current v 0 Update u 1 Change 1 v 2 u 2 2 v 3 u 3 3 + Generic, can always be applied, space efficient v 4 u 4 4 - Slow retroactive operations 3

Lower bounds for Retroactivity a 0 + a 1 x + a 2 x

Lower bounds for Retroactivity a 0 + a 1 x + a 2 x 2 + ∙∙∙ + anxn ( requires Ω(n) multiplications given x by Motzkin’s theorem ) * x 0 x 1 x 2 ∙∙∙ xi ∙∙∙ xn ( prefix sum queries require Ω(log n) ) * [M. Patrascu, E. D. Demaine, Logarithmic Lower Bounds in the Cell-Probe Model, SIAM J. of Computing 35(4): 932 -963, 2006] 4

Partial Full Retroactivity ( m) v 0 u 1 v 1 u 2 partial

Partial Full Retroactivity ( m) v 0 u 1 v 1 u 2 partial retroactive structures (remember using full persistence) current v 2 v 3 u 4 v 4 ½ v 5 v 4 v 5 u 6 v 6 u 7 v 7 u 8 v 8 u 9 v 9 temporary during queries to V 5 (rollback) 5

Partial Retroactive Commutative Data Structures 6

Partial Retroactive Commutative Data Structures 6

Decomposable Search Problems T(2 n)≥(1+ )T(n) n C A AD B D A C

Decomposable Search Problems T(2 n)≥(1+ )T(n) n C A AD B D A C insert(D) CD B delete(D) time 7

Specific Retroactive Data Structures ? * * [D. D. Sleator, R. E. Tarjan, A

Specific Retroactive Data Structures ? * * [D. D. Sleator, R. E. Tarjan, A Data Structure for Dynamic Trees, Proc. 13 th Annual ACM Symposium on Theory of Computing, 114 -122, 1981] 8