Succinct Data Structures for Segments
Abstract
We consider succinct data structures for representing a set of horizontal line segments in the plane given in rank space to support \emph{segment access}, \emph{segment selection}, and \emph{segment rank} queries. A segment access query finds the segment given its -coordinate (-coordinates of the segments are distinct), a segment selection query finds the th smallest segment (the segment with the th smallest -coordinate) among the segments crossing the vertical line for a given -coordinate, and a segment rank query finds the number of segments crossing the vertical line through -coordinate with -coordinate at most , for a given and . This problem is a central component in compressed data structures for persistent strings supporting random access. Our main result is data structure using bits of space and query time for all operations. We show that this space bound is optimal up to lower-order terms. We will also show that the query time for segment rank is optimal. The query time for segment selection is also optimal by a previous bound. To obtain our results, we present a novel segment wavelet tree data structure of independent interest. This structure is inspired by and extends the classic wavelet tree for sequences. This leads to a simple, succinct solution with query times. We then extend this solution to obtain optimal query time. Our space lower bound follows from a simple counting argument, and our lower bound for segment rank is obtained by a reduction from 2-dimensional counting.
Cite
@article{arxiv.2412.04965,
title = {Succinct Data Structures for Segments},
author = {Philip Bille and Inge Li Gørtz and Simon R. Tarnow},
journal= {arXiv preprint arXiv:2412.04965},
year = {2024}
}