列表遍历概要的高效pebbling
Efficient pebbling for list traversal synopses
摘要:
我们将展示如何支持高效的反向遍历在一个单向列表中,使用小内存,基本上没有放缓前进的步骤。将$O(\log n)$存储器用于大小为$n$的列表,在最坏的情况下,从迄今为止到达的最远点开始的第$i$个后退步骤花费$O(\log i)$时间,而对于任意小常数$ε>0$,每个前进步骤的开销至多为$ε$。允许任意顺序的前进和后退步骤。给出了存储器使用量和每次后退所需时间之间的完整权衡:$k$与$kn^{1/k}$,反之亦然。我们的算法是基于一种新的卵石技术,移动卵石上的虚拟二进制,或$t$ -ary,树,只能在一个前序的方式遍历。pebbling算法使用的紧凑数据结构,称为列表遍历概要,扩展到一般的有向图,并有其他有趣的应用,包括内存高效的哈希链实现。也许最令人惊讶的应用是表明,对于任何程序,可以有效地支持任意回滚步骤,内存开销很小,并且在其普通执行中有边际开销。更具体地说:让$P$是一个程序,运行最多$T$步骤,使用大小为$M$的内存。然后,以记录程序使用的输入为代价,并将存储器增加$O(\log T)$的因子到$O(M \log T)$,程序$P$可以扩展为支持向前执行和回滚步骤的任意序列:在最坏情况下,第$i$回滚步骤花费$O(\log i)$时间,而在最坏情况下,向前步骤花费O(1)时间,并且每个步骤花费$1+ε$摊销时间。
英文摘要:
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(\log n)$ memory for a list of size $n$, the $i$'th back-step from the farthest point reached so far takes $O(\log i)$ time in the worst case, while the overhead per forward step is at most $ε$ 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. $kn^{1/k}$ and vice versa. Our algorithms are based on a novel pebbling technique which moves pebbles on a virtual binary, or $t$-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(\log T)$ to $O(M \log 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(\log i)$ time in the worst case, while forward steps take O(1) time in the worst case, and $1+ε$ amortized time per step.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。