$mathrm{Pal}^k$ Is Linear Recognizable Online
Given a language $L$ that is online recognizable in linear time and space, we construct a linear time and space online recognition algorithm for the language $L\cdot\mathrm{Pal}$, where $\mathrm{Pal}$ is the language of all nonempty palindromes. Hence for every fixed positive $k$, $\mathrm{Pal}^k$ is online recognizable in linear time and space. Thus we solve an open problem posed by Galil and Seiferas in 1978.
💡 Research Summary
The paper addresses a long‑standing open problem posed by Galil and Seiferas (1978): whether the language consisting of a concatenation of a fixed number k of non‑empty palindromes, denoted Pal^k, can be recognized online in linear time and space. The authors prove a much more general theorem: if a language L is online recognizable in f(n) time and space, then the concatenation L·Pal (where Pal is the set of all non‑empty palindromes) is online recognizable in f(n)+O(n) time and space. From this, by induction on k, they obtain that Pal^k is online recognizable in O(k·n) time and space for any fixed k, thus solving the open problem.
The technical core of the work consists of two novel data structures. First, the “palindromic iterator” is a refined version of Manacher’s algorithm that, while processing the input one character at a time, maintains for the current text: (i) the center of the longest suffix‑palindrome, (ii) the radius of the longest palindrome centered at any given position, and (iii) the center of the next longest suffix‑palindrome after a given one. All operations (append, query radius, move to next suffix‑palindrome) run in amortized O(1) time, and the whole structure uses linear space. The iterator is implemented with a radius array, a fractional array, and a linked list of centers, together with auxiliary arrays that map positions to the list nodes.
Second, the “palindromic engine” builds on the iterator. It stores the processed text, a bit array m that marks positions where the prefix belongs to L, and a result bit array res that marks positions where the prefix belongs to L·Pal. The fundamental operation app_end(a, b) appends a new character a, sets m
Comments & Academic Discussion
Loading comments...
Leave a Comment