arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1208.3663cs.CGcs.DS
收藏

基于栈的算法的时空权衡

Space-Time Trade-offs for Stack-Based Algorithms

Luis Barba, Matias Korman, Stefan Langerman, Kunikiko Sadakane, Rodrigo Silveira

摘要:

在内存受限的算法中,我们只能对输入进行只读访问,并且附加变量的数量是有限的。在本文中,我们介绍了压缩堆栈技术,一种方法,允许转换算法的空间瓶颈是一个堆栈到内存受限的算法。给定一个使用$Θ(n)$变量在O(n)时间内运行的算法\alg \,我们可以修改它,使其使用O(s)变量的工作空间在$O(n^2/s)$时间内运行(对于任何$s\in o(\log n)$)或使用$O(p\log n/\log p)$变量在$O(n\log n/\log p)$时间内运行(对于任何$2\leq p\leq n$)。我们还展示了如何可以应用该技术来解决各种几何问题,即计算一个简单的多边形的凸包,一个单调的多边形的三角剖分,单调的多边形内的两点之间的最短路径,1维金字塔近似的1维向量,和一个简单的多边形内的一个点的可见性轮廓。我们的方法超过或匹配最知名的结果,这些问题在恒定的工作空间模型(当它们存在时),并给出了第一个权衡工作空间的大小和运行时间。据我们所知,这是第一个获得内存约束算法的一般框架。

英文摘要:

In memory-constrained algorithms we have read-only access to the input, and the number of additional variables is limited. In this paper we introduce the compressed stack technique, a method that allows to transform algorithms whose space bottleneck is a stack into memory-constrained algorithms. Given an algorithm \alg\ that runs in O(n) time using $Θ(n)$ variables, we can modify it so that it runs in $O(n^2/s)$ time using a workspace of O(s) variables (for any $s\in o(\log n)$) or $O(n\log n/\log p)$ time using $O(p\log n/\log p)$ variables (for any $2\leq p\leq n$). We also show how the technique can be applied to solve various geometric problems, namely computing the convex hull of a simple polygon, a triangulation of a monotone polygon, the shortest path between two points inside a monotone polygon, 1-dimensional pyramid approximation of a 1-dimensional vector, and the visibility profile of a point inside a simple polygon. Our approach exceeds or matches the best-known results for these problems in constant-workspace models (when they exist), and gives the first trade-off between the size of the workspace and running time. To the best of our knowledge, this is the first general framework for obtaining memory-constrained algorithms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑