In this paper we consider the problem of computing the longest common abelian factor (LCAF) between two given strings. We present a simple O(?n2)O(?n2) time algorithm, where n is the length of the strings and ?? is the alphabet size, and a sub-quadratic running time solution for the binary string case, both having linear space requirement. Furthermore, we present a modified algorithm applying some interesting tricks and experimentally show that the resulting algorithm runs faster.

Algorithms for Longest Common Abelian Factors

Langiu Alessio;
2016

Abstract

In this paper we consider the problem of computing the longest common abelian factor (LCAF) between two given strings. We present a simple O(?n2)O(?n2) time algorithm, where n is the length of the strings and ?? is the alphabet size, and a sub-quadratic running time solution for the binary string case, both having linear space requirement. Furthermore, we present a modified algorithm applying some interesting tricks and experimentally show that the resulting algorithm runs faster.
2016
Istituto per l'Ambiente Marino Costiero - IAMC - Sede Napoli
abelian match
abelian properties
algorithm
linear
Longest common factor
Parikh vector
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.14243/321232
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 2
  • ???jsp.display-item.citation.isi??? ND
social impact