English

Minimal Absent Words on Run-Length Encoded Strings

Data Structures and Algorithms 2022-04-18 v2

Abstract

A string ww is called a minimal absent word (MAW) for another string TT if ww does not occur (as a substring) in TT and any proper substring of ww occurs in TT. State-of-the-art data structures for reporting the set MAW(T)\mathsf{MAW}(T) of MAWs from a given string TT of length nn require O(n)O(n) space, can be built in O(n)O(n) time, and can report all MAWs in O(MAW(T))O(|\mathsf{MAW}(T)|) time upon a query. This paper initiates the problem of computing MAWs from a compressed representation of a string. In particular, we focus on the most basic compressed representation of a string, run-length encoding (RLE), which represents each maximal run of the same characters aa by apa^p where pp is the length of the run. Let mm be the RLE-size of string TT. After categorizing the MAWs into five disjoint sets M1\mathcal{M}_1, M2\mathcal{M}_2, M3\mathcal{M}_3, M4\mathcal{M}_4, M5\mathcal{M}_5 using RLE, we present matching upper and lower bounds for the number of MAWs in Mi\mathcal{M}_i for i=1,2,4,5i = 1,2,4,5 in terms of RLE-size mm, except for M3\mathcal{M}_3 whose size is unbounded by mm. We then present a compact O(m)O(m)-space data structure that can report all MAWs in optimal O(MAW(T))O(|\mathsf{MAW}(T)|) time.

Keywords

Cite

@article{arxiv.2202.13591,
  title  = {Minimal Absent Words on Run-Length Encoded Strings},
  author = {Tooru Akagi and Kouta Okabe and Takuya Mieno and Yuto Nakashima and Shunsuke Inenaga},
  journal= {arXiv preprint arXiv:2202.13591},
  year   = {2022}
}

Comments

Accepted for CPM 2022

R2 v1 2026-06-24T09:55:51.637Z