Efficient pebbling for list traversal synopses

Yossi Matias, Ely Porat

Research output: Chapter in Book/Report/Conference proceedingChapterpeer-review

5 Scopus citations


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 worst case, while the overhead per forward step is at most epsilon for arbitrary small constant ε > 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. kn1/k and vice versa. Our algorithm is based on a novel pebbling technique which moves pebbles on a "virtual binary tree" that can only be traversed in a pre-order fashion. The list traversal synopsis extends to general directed graphs, and has 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, as follows. The i'th rollback step takes O(lg i) time in the worst case, while forward steps take O(l) time in the worst case, and 1 + ε amortized time per step.

Original languageEnglish
Title of host publicationLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
EditorsJos C. M. Baeten, Jan Karel Lenstra, Joachim Parrow, Gerhard J. Woeginger
PublisherSpringer Verlag
Number of pages11
ISBN (Print)3540404937, 9783540404934
StatePublished - 2003

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Dive into the research topics of 'Efficient pebbling for list traversal synopses'. Together they form a unique fingerprint.

Cite this