Article ID Journal Published Year Pages File Type
430216 Journal of Computer and System Sciences 2014 12 Pages PDF
Abstract

•Definition of a bio-inspired operation on words: prefix–suffix duplication.•Language theoretical results for prefix–suffix duplication languages.•Efficient recognition algorithm for prefix–suffix duplication languages.•Efficient algorithms for computing prefix–suffix duplication distance between two words.

We consider a bio-inspired formal operation on words called prefix–suffix duplication which consists in the duplication of a prefix or suffix of a given word. The class of languages defined by the iterated application of the prefix–suffix duplication to a word is considered. We show that such a language is context-free if and only if the initial word contains just one letter. Moreover, every language in this class is semilinear and belongs to NL. We propose a O(n2logn) time and O(n2)O(n2) space recognition algorithm. Two algorithms are further proposed for computing the prefix–suffix duplication distance between two words, defined as the minimal number of prefix–suffix duplications applied to one of them in order to get the other one. The first algorithm runs in cubic time and uses quadratic space while the second one is more efficient, having O(n2logn) time complexity, but needs O(n2logn) space.

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