Faster Linear-Space Data Structures for Path Frequency Queries

Abstract

We present linear-space data structures for several frequency queries on trees, namely: path mode, path least frequent element, and path α-minority queries. We present the first linear-space data structures, requiring O(n nw) preprocessing time, that can answer path mode and path least frequent element queries in O(n/w) time. This improves upon the best previously known bound of O( n n/w) achieved by Durocher et al. in 2016. For the path α-minority problem, where α is specified at query time, we reduce the query time of the linear-space data structure of Durocher et al. from O(α-1 n) down to O(α-1) by employing a simple randomized algorithm with a success probability ≥ 1/2. We also present the first linear-space data structure supporting "Path Maximum g-value Color" queries in O(n/w) time, requiring O(n nw) preprocessing time. This general framework encapsulates both path mode and path least frequent element queries. For our data structures, we consider the word-RAM model with w∈ Ω( n), where w is the word size in bits.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…