Efficient Algorithms to Compute Closed Substrings
Data Structures and Algorithms
2026-01-12 v3
Abstract
A closed string is either of length one or contains a border that occurs only as a prefix and as a suffix in and nowhere else within . In this paper, we present fast time algorithms to compute all closed substrings by introducing a compact representation for all closed substrings of a string , using only space. These simple and space-efficient algorithms also compute maximal closed strings. Furthermore, we compare the performance of these algorithms and identify classes of strings where each performs best. Finally, we show that the exact number of MCSs () in a Fibonacci word , for , is , where is the golden ratio.
Cite
@article{arxiv.2506.06452,
title = {Efficient Algorithms to Compute Closed Substrings},
author = {Samkith K Jain and Neerja Mhaskar},
journal= {arXiv preprint arXiv:2506.06452},
year = {2026}
}
Comments
Submitted to TOCS 2026