English

Optimal Window Queries on Line Segments using the Trapezoidal Search DAG

Computational Geometry 2024-01-17 v3 Data Structures and Algorithms

Abstract

We propose a new query application for the well-known Trapezoidal Search DAG (TSD) of a set of nn~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 kk trapezoids that are intersected by the query segment in O(k+logn)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)O(n) size. In the important case of edges from a connected, planar graph, our simplistic approach yields an expected O(nlog ⁣n)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+logn)O(k + \log n) expected time, where kk is the result size.

Keywords

Cite

@article{arxiv.2111.07024,
  title  = {Optimal Window Queries on Line Segments using the Trapezoidal Search DAG},
  author = {Milutin Brankovic and Martin P. Seybold},
  journal= {arXiv preprint arXiv:2111.07024},
  year   = {2024}
}

Comments

Added proceedings reference

R2 v1 2026-06-24T07:37:02.435Z