We exhibit an online algorithm finding all distinct palindromes inside a given string in time Θ(n log |Σ|) over an ordered alphabet and in time Θ(n|Σ|) over an unordered alphabet. Using a reduction from a dictionary-like data structure, we prove the optimality of this algorithm in the comparison-based computation model.
We prove that a random word of length n over a k-ary fixed alphabet contains, on expectation , Θ(√ n) distinct palindromic factors. We study this number of factors, E(n, k), in detail, showing that the limit lim n→∞ E(n, k)/ √ n does not exist for any k ≥ 2, lim inf n→∞ E(n, k)/ √ n = Θ(1), and lim sup n→∞ E(n, k)/ √ n = Θ(√ k). Such a complicated behaviour… (More)
We propose a new linear-size data structure which provides a fast access to all palindromic substrings of a string or a set of strings. This structure inherits some ideas from the construction of both the suffix trie and suffix tree. Using this structure, we present simple and efficient solutions for a number of problems involving palindromes.
A palindrome is a string equal to its reversal. Since letters are palindromes, each string can be obtained by concatenating palindromes. The minimum number of factors in such concatenation is the palindromic length of a string, denoted by PL(S). Thus, if S = 01001001, then PL(S) = 2 because S = 0 · 1001001 and S is not a palindrome. Dynamic programming is a… (More)
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 · Pal, where Pal is the language of all nonempty palindromes. Hence for every fixed positive k, Pal k is online recognizable in linear time and space. Thus we solve an open problem posed by Galil and… (More)