Average-Case Optimal Encodings and Efficient Worst-Case Indices for Element Distinctness Queries
Philip Bille, Johannes Fischer, Inge Li Gørtz, Filippo Lari
Abstract
We study the data structure version of the element distinctness problem: preprocess an array of n elements from an alphabet of size σ to answer All-Distinct queries, asking whether a given range contains only distinct elements. We first focus on uniformly random arrays: in the encoding model, where access to the input at query time is not allowed, we prove a lower bound on the expected space; for instance, the lower bound is n, 1.3627n, 1.5153n, 1.5824n bits for σ= 2,3,4,5, and approximately nπ/(2σ)\,σ bits for σ=ω(1). We complement this by designing different average-case optimal encodings, supporting All-Distinct queries in worst-case time O(1), o(2n), or O(n) depending on σ, and O(1) expected time for any σ= ω(1). We then switch to worst-case (non-random) arrays: in the indexing model, where access to the input is allowed, we prove a cell-probe space-time tradeoff lower bound showing that any index using n/b bits must have Ω(b/b) query time. We conclude by presenting a simple index almost matching this lower bound.
Create a lesson
Related papers
A Near-Optimal Space Lower Bound for Euclidean Diameter Estimation in Dynamic Streams
Ashwin Padaki, Krish Singal, Erik Waingarten
A Walk From Free Probability to Matrix Discrepancy I: Matrix Spencer
Tarun Kathuria
A Walk From Free Probability to Matrix Discrepancy II: Weaver's Problem and the Kadison-Singer Conjecture
Tarun Kathuria
Degree-Free Spectral Independence for Log-Concave Holant Measures
Xiaoyu Chen, Zejia Chen, Xinyuan Zhang
Optimizing Both Checking and Update Costs in Random Walk Search
Simon Apers, Marin Costes
Routing Multiple Agents Below the Sum of Distances
Matthias Bentert, Eduard Eiben, Fedor V. Fomin et al.