[Paper Review] Space-efficient Algorithms for Visibility Problems in Simple Polygon
This paper presents space-efficient algorithms for visibility problems in simple polygons, achieving O(1) extra workspace for computing the visibility polygon of a point, weak visibility of a segment, and minimum link paths. The algorithms run in O(n) time for point visibility and O(kn) time for minimum link paths, with one in-place variant that modifies the input array, while another uses O(√n) space on read-only input, solving open problems in constant-work-space computational geometry.
Given a simple polygon $P$ consisting of $n$ vertices, we study the problem of designing space-efficient algorithms for computing (i) the visibility polygon of a point inside $P$, (ii) the weak visibility polygon of a line segment inside $P$ and (iii) the minimum link path between a pair of points inside $P$. For problem (i) two algorithms are proposed. The first one is an in-place algorithm where the input array may be lost. It uses only O(1) extra space apart from the input array. The second one assumes that the input is given in a read-only array, and it needs $O(\sqrt{n})$ extra space. The time complexity of both the algorithms are O(n). For problem (ii), we have assumed that the input polygon is given in a read-only array. Our proposed algorithm runs in $O(n^2)$ time using O(1) extra space. For problem (iii) the time and space complexities of our proposed algorithm are $O(kn)$ and O(1) respectively; $k$ is the length (number of links) in a minimum link path between the given pair of points.
Motivation & Objective
- To design space-efficient algorithms for visibility problems in simple polygons under strict memory constraints.
- To resolve the open question of whether visibility computation can be done in sub-quadratic time with constant workspace when the input is read-only.
- To provide in-place and read-only algorithms for visibility polygon, weak visibility of a segment, and minimum link path computation.
- To achieve optimal time complexity O(n) or O(kn) while minimizing workspace usage to O(1) or O(√n).
Proposed method
- An in-place algorithm (Inplace_Visibility) computes the visibility polygon using only O(1) extra space by maintaining a stack within the input array and tracking angular relationships via index variables and angle buffers.
- A read-only algorithm (Readonly_Visibility) uses O(√n) extra space and O(n) time by leveraging a two-phase traversal with angular comparisons and stack simulation in the input array.
- For weak visibility of a segment, the algorithm uses a two-phase approach: first computing a chord that separates the source and target, then iteratively refining the visibility boundary using angular and edge intersection checks.
- For minimum link path, the algorithm uses a dual-path traversal along polygon boundaries (Π and Π′), alternately updating a visibility line L and computing chords that separate s and t, with iterative refinement to find the first visible edge.
- The algorithms rely on geometric observations such as the order of visibility loss and angular monotonicity to ensure correctness under space constraints.
- Key data structures include index-based stack simulation, angle tracking (Φ and Ψ), and iterative edge intersection checks to compute visibility boundaries.
Experimental results
Research questions
- RQ1Can the visibility polygon of a point inside a simple polygon be computed in O(n) time with O(1) extra space?
- RQ2Can weak visibility of a line segment be computed in O(n²) time with O(1) extra space when the polygon is given in a read-only array?
- RQ3Can a minimum link path between two points be computed in O(kn) time with O(1) extra space, where k is the number of links in the path?
- RQ4Is it possible to achieve sub-quadratic time complexity for visibility computation in constant work-space models with read-only input?
Key findings
- An in-place algorithm computes the visibility polygon of a point in O(n) time and O(1) extra space, though the input polygon is modified and cannot be recovered.
- A read-only algorithm computes the same visibility polygon in O(n) time using O(√n) extra space, preserving the input array.
- An O(n²)-time, O(1)-space algorithm computes the weak visibility polygon of a line segment inside a simple polygon from a read-only input array.
- An O(kn)-time, O(1)-space algorithm computes the minimum link path between two points inside a simple polygon, where k is the number of links in the path.
- The proposed algorithms resolve an open problem in computational geometry by achieving O(n) time for point visibility in constant workspace, improving upon prior O(n²) bounds.
- The algorithms are correct and efficient under strict space constraints, relying on geometric invariants such as angular ordering and visibility loss sequence.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.