English

Internal Shortest Absent Word Queries in Constant Time and Linear Space

Data Structures and Algorithms 2021-06-04 v1

Abstract

Given a string TT of length nn over an alphabet Σ{1,2,,nO(1)}\Sigma\subset \{1,2,\ldots,n^{O(1)}\} of size σ\sigma, we are to preprocess TT so that given a range [i,j][i,j], we can return a representation of a shortest string over Σ\Sigma that is absent in the fragment T[i]T[j]T[i]\cdots T[j] of TT. We present an O(n)O(n)-space data structure that answers such queries in constant time and can be constructed in O(nlogσn)O(n\log_\sigma n) time.

Keywords

Cite

@article{arxiv.2106.01763,
  title  = {Internal Shortest Absent Word Queries in Constant Time and Linear Space},
  author = {Golnaz Badkobeh and Panagiotis Charalampopoulos and Dmitry Kosolobov and Solon P. Pissis},
  journal= {arXiv preprint arXiv:2106.01763},
  year   = {2021}
}

Comments

13 pages, 1 figure, 4 tables