TY - JOUR

T1 - Efficient pebbling for list traversal synopses with application to program rollback

AU - Matias, Yossi

AU - Porat, Ely

N1 - Funding Information:
We thank Martin Dietzfelbinger and an anonymous referee for most helpful comments. The first author’s research supported in part by grants from the ISF. The second author’s research supported in part by grants from the GIF.

PY - 2007/6/15

Y1 - 2007/6/15

N2 - We show how to support efficient back traversal in a unidirectional list, using small memory and with essentially no slowdown in forward steps. Using O (lg n) memory for a list of size n, the i'th back-step from the farthest point reached so far takes O (lg i) time in the worst case, while the overhead per forward step is at most ε{lunate} for arbitrary small constant ε{lunate} > 0. An arbitrary sequence of forward and back steps is allowed. A full trade-off between memory usage and time per back-step is presented: k vs. k n1 / k and vice versa. Our algorithms are based on a novel pebbling technique which moves pebbles on a virtual binary, or n1 / k-ary, tree that can only be traversed in a pre-order fashion. The compact data structures used by the pebbling algorithms, called list traversal synopses, extend to general directed graphs, and have other interesting applications, including memory efficient hash-chain implementation. Perhaps the most surprising application is in showing that for any program, arbitrary rollback steps can be efficiently supported with small overhead in memory, and marginal overhead in its ordinary execution. More concretely: let P be a program that runs for at most T steps, using memory of size M. Then, at the cost of recording the input used by the program, and increasing the memory by a factor of O (lg T) to O (M lg T), the program P can be extended to support an arbitrary sequence of forward execution and rollback steps: the i'th rollback step takes O (lg i) time in the worst case, while forward steps take O (1) time in the worst case, and 1 + ε{lunate} amortized time per step.

AB - We show how to support efficient back traversal in a unidirectional list, using small memory and with essentially no slowdown in forward steps. Using O (lg n) memory for a list of size n, the i'th back-step from the farthest point reached so far takes O (lg i) time in the worst case, while the overhead per forward step is at most ε{lunate} for arbitrary small constant ε{lunate} > 0. An arbitrary sequence of forward and back steps is allowed. A full trade-off between memory usage and time per back-step is presented: k vs. k n1 / k and vice versa. Our algorithms are based on a novel pebbling technique which moves pebbles on a virtual binary, or n1 / k-ary, tree that can only be traversed in a pre-order fashion. The compact data structures used by the pebbling algorithms, called list traversal synopses, extend to general directed graphs, and have other interesting applications, including memory efficient hash-chain implementation. Perhaps the most surprising application is in showing that for any program, arbitrary rollback steps can be efficiently supported with small overhead in memory, and marginal overhead in its ordinary execution. More concretely: let P be a program that runs for at most T steps, using memory of size M. Then, at the cost of recording the input used by the program, and increasing the memory by a factor of O (lg T) to O (M lg T), the program P can be extended to support an arbitrary sequence of forward execution and rollback steps: the i'th rollback step takes O (lg i) time in the worst case, while forward steps take O (1) time in the worst case, and 1 + ε{lunate} amortized time per step.

UR - http://www.scopus.com/inward/record.url?scp=34248571259&partnerID=8YFLogxK

U2 - 10.1016/j.tcs.2007.02.048

DO - 10.1016/j.tcs.2007.02.048

M3 - ???researchoutput.researchoutputtypes.contributiontojournal.article???

AN - SCOPUS:34248571259

VL - 379

SP - 418

EP - 436

JO - Theoretical Computer Science

JF - Theoretical Computer Science

SN - 0304-3975

IS - 3

ER -