Longest Unbordered Factors in Linear Time
Takuya Mieno
Key points
From the paper's conclusion- In this paper, we resolve this open problem for integer alphabets of size $n^{O(1)}$ by presenting an algorithm that computes all occurrences of longest unbordered factors in $O(n)$ worst-case time.
Abstract
A border of a string is a nonempty proper prefix that is also a suffix. A string is unbordered if it has no border. The length of a longest unbordered factor is closely related to the smallest period of the string. While the smallest period can be computed in linear time, the best previously known algorithm for computing a longest unbordered factor takes $O(n \log n)$ worst-case time for a string of length $n$. Whether this computational problem can be solved in worst-case linear time has remained open. In this paper, we resolve this open problem for integer alphabets of size $n^{O(1)}$ by presenting an algorithm that computes all occurrences of longest unbordered factors in $O(n)$ worst-case time. Our algorithm uses a combinatorial property of longest unbordered factors and scans the input string in both directions to capture all occurrences achieving the global maximum without computing the local maximum at every starting position.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Efficient Lempel-Ziv Prediction with the Run-Length BWTarXiv · 2026
- Abelian maximal pattern complexity and extremal wordsarXiv · 2026
- One partition function call to rule them all: Efficiently computing the equilibrium landscape of multiple nucleic acid strandsarXiv · 2026
- Searching for binary orientable sequencesarXiv · 2026
- Breaking the Square-Root Space Barrier for Longest Increasing SubsequencearXiv · 2026
- Graph and String Parameters: Connections Between Pathwidth, Cutwidth and the Locality NumberAlgorithmica · 2026