scispace - formally typeset
Open AccessProceedings ArticleDOI

Space-Time Trade-offs for Stack-Based Algorithms

Reads0
Chats0
TLDR
This paper introduces the compressed stack technique, a method that allows to transform algorithms whose space bottleneck is a stack into memory-constrained algorithms, and gives a trade-off between the size of the workspace and running time.
Abstract
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 A that runs in O(n) time using a stack of length Theta(n), we can modify it so that it runs in O(n^2/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 <= p <= 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 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.

read more

Citations
More filters
Journal ArticleDOI

Space---Time Trade-offs for Stack-Based Algorithms

TL;DR: This paper introduces 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, and gives a trade-off between the size of the workspace and running time.
Book ChapterDOI

Optimal Time-Space Tradeoff for the 2D Convex-Hull Problem

TL;DR: An algorithm that runs in O(N^2/S + N \lg S) time for constructing the convex hull formed by the given points is presented, and a space-efficient data structure is introduced that is called the augmented memory-adjustable navigation pile.
Journal ArticleDOI

Reprint of: Memory-constrained algorithms for simple polygons

TL;DR: It is shown how to triangulate a plane straight-line graph with n vertices in O(n^2) time and constant work-space and the problem of preprocessing a simple polygon P for shortest path queries is considered, where P is given by the ordered sequence of itsn vertices.
Journal ArticleDOI

Memory-constrained algorithms for simple polygons

TL;DR: This work shows how to triangulate a plane straight-line graph with n vertices in O(n2) time and constant workspace and considers the problem of preprocessing a simple n-gon P for shortest path queries, where P is given by the ordered sequence of its vertices.
Posted Content

Computing a visibility polygon using few variables

TL;DR: In this article, the authors presented several algorithms for computing visibility polygon of a simple polygon from a viewpoint inside the polygon, when the polytex resides in read-only memory and only few working variables can be used.
Related Papers (5)