Counting distinct palindromes in a word in linear time - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Information Processing Letters Année : 2010

Counting distinct palindromes in a word in linear time

Résumé

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.

Dates et versions

hal-00507481 , version 1 (30-07-2010)

Identifiants

Citer

Richard Groult, Elise Prieur-Gaston, Gwenaël Richomme. Counting distinct palindromes in a word in linear time. Information Processing Letters, 2010, 110, pp.908-912. ⟨10.1016/j.ipl.2010.07.018⟩. ⟨hal-00507481⟩
295 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More