Article ID Journal Published Year Pages File Type
427964 Information Processing Letters 2010 5 Pages PDF
Abstract

We design an algorithm to count the number of distinct palindromes in a word w in time O(|w|), by adapting an algorithm to detect all occurrences of maximal palindromes in a given word and using the longest previous factor array. As a direct consequence, this shows that the palindromic richness (or fullness) of a word can be checked in linear time.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics