Faster and Simpler Online Computation of String Net Frequency
Abstract
An occurrence of a repeated substring in a string is called a net occurrence if extending the occurrence to the left or to the right decreases the number of occurrences to 1. The net frequency (NF) of a repeated substring in a string is the number of net occurrences of in . Very recently, Guo et al. [SPIRE 2024] proposed an online -time algorithm that maintains a data structure of space which answers Single-NF queries in time and reports all answers of the All-NF problem in time. Here, is the length of the input string , is the query pattern length, and is the alphabet size. The term is a major drawback of their method since computing string net frequencies is originally motivated for Chinese language processing where can be thousands large. This paper presents an improved online -time algorithm, which answers Single-NF queries in time and reports all answers to the All-NF problem in output-optimal time, where is the set of substrings of paired with their positive NF values. We note that always holds. In contract to Guo et al.'s algorithm that is based on Ukkonen's suffix tree construction, our algorithm is based on Weiner's suffix tree construction.
Cite
@article{arxiv.2410.06837,
title = {Faster and Simpler Online Computation of String Net Frequency},
author = {Shunsuke Inenaga},
journal= {arXiv preprint arXiv:2410.06837},
year = {2026}
}