Space-Time Trade-offs for Stack-Based Algorithms

作者:Barba Luis; Korman Matias*; Langerman Stefan; Sadakane Kunihiko; Silveira Rodrigo I
来源:Algorithmica, 2015, 72(4): 1097-1129.
DOI:10.1007/s00453-014-9893-5

摘要

In memory-constrained algorithms, access to the input is restricted to be read-only, and the number of extra variables that the algorithm can use is bounded. In this paper we introduce the compressed stack technique, a method that allows to transform algorithms whose main memory consumption takes the form of a stack into memory-constrained algorithms. Given an algorithm that runs in time using a stack of length , we can modify it so that it runs in time using a workspace of variables (for any ) or time using variables (for any ). 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, a 1-dimensional pyramid approximation of a 1-dimensional vector, and the visibility profile of a point inside a simple polygon. Our approach improves or matches up to a factor the running time of the best-known results for these problems in constant-workspace models (when they exist), and gives a 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.

  • 出版日期2015-8