Table of Contents
Fetching ...

Optimal Window Queries on Line Segments using the Trapezoidal Search DAG

Milutin Brankovic, Martin P. Seybold

TL;DR

This work introduces a simple DFS-based approach on the Trapezoidal Search DAG (TSD) to support window queries on line segments, achieving an output-sensitive expected time of $O(k + \\log n)$ for vertical queries, independent of query location. It provides a generalized TSD construction that handles degeneracies via segment bundles and tie-breaking, with trapezoid boundaries stored explicitly, enabling exact reporting without extra data structures. For connected planar graphs, the paper shows how to achieve axis-aligned window queries in $O(k + \\log n)$ time using two rotated TSDs and a BFS over interior edges, with an $O(n \\log^* n)$ expected preprocessing time. The results offer a simple, size-efficient alternative to more complex data structures for vertical and window queries in planar settings, and extend naturally to general input through careful handling of degeneracies.

Abstract

We propose a new query application for the well-known Trapezoidal Search DAG (TSD) of a set of $n$~line segments in the plane, where queries are allowed to be {\em vertical line segments}. We show that a simple Depth-First Search reports the $k$ trapezoids that are intersected by the query segment in $O(k+\log n)$ expected time, regardless of the spatial location of the query. This bound is optimal and matches known data structures with $O(n)$ size. In the important case of edges from a connected, planar graph, our simplistic approach yields an expected $O(n \log^*\!n)$ construction time, which improves on the construction time of known structures for vertical segment-queries. Also for connected input, a simple extension allows the TSD approach to directly answer axis-aligned window-queries in $O(k + \log n)$ expected time, where $k$ is the result size.

Optimal Window Queries on Line Segments using the Trapezoidal Search DAG

TL;DR

This work introduces a simple DFS-based approach on the Trapezoidal Search DAG (TSD) to support window queries on line segments, achieving an output-sensitive expected time of for vertical queries, independent of query location. It provides a generalized TSD construction that handles degeneracies via segment bundles and tie-breaking, with trapezoid boundaries stored explicitly, enabling exact reporting without extra data structures. For connected planar graphs, the paper shows how to achieve axis-aligned window queries in time using two rotated TSDs and a BFS over interior edges, with an expected preprocessing time. The results offer a simple, size-efficient alternative to more complex data structures for vertical and window queries in planar settings, and extend naturally to general input through careful handling of degeneracies.

Abstract

We propose a new query application for the well-known Trapezoidal Search DAG (TSD) of a set of ~line segments in the plane, where queries are allowed to be {\em vertical line segments}. We show that a simple Depth-First Search reports the trapezoids that are intersected by the query segment in expected time, regardless of the spatial location of the query. This bound is optimal and matches known data structures with size. In the important case of edges from a connected, planar graph, our simplistic approach yields an expected construction time, which improves on the construction time of known structures for vertical segment-queries. Also for connected input, a simple extension allows the TSD approach to directly answer axis-aligned window-queries in expected time, where is the result size.

Paper Structure

This paper contains 7 sections, 4 theorems, 4 equations, 1 figure, 1 table.

Key Result

theorem 1

Let $S$ be a set of $n$ segments, $q$ a vertical segment, and $k=|\{s \in S: s\cap q \neq \emptyset\}|$. The expected number of TSD nodes, whose regions intersect $q$, is $\mathcal{O}(k + \log n)$.

Figures (1)

  • Figure 1: Incremental construction of the TSD (right) for the insertion order $(s_1,s_2,s_3)$ and the respective trapezoidations (left). The TSD has $14$ leaves, one for each face in the final trapezoidation.

Theorems & Definitions (7)

  • theorem 1
  • lemma 1
  • proof
  • lemma 2
  • proof
  • proof : Proof of Theorem \ref{['query-bound']}
  • corollary 1