The Pattern Matching problem with Swaps consists in finding all occurrences of a pattern P in a text T, when disjoint local swaps in the pattern are allowed. In this paper, we present a new efficient algorithm for the Swap Matching problem with short patterns. In particular, we devise a O(nm 2) general algorithm, named Backward-Cross-Sampling, and show an efficient implementation of it, based on bit-parallelism, which achieves O(nm) worst-case time and O(σ)-space complexity, with patterns whose length m is comparable to the word-size of the target machine (n and σ are respectively the size of the text and of the alphabet). From an extensive comparison with some of the most recent and effective algorithms for the swap matching problem, it turns out that our algorithm is very flexible and achieves very good results in practice.

A New Algorithm for Efficient Pattern Matching with Swaps

CANTONE, Domenico;FARO, SIMONE
2009-01-01

Abstract

The Pattern Matching problem with Swaps consists in finding all occurrences of a pattern P in a text T, when disjoint local swaps in the pattern are allowed. In this paper, we present a new efficient algorithm for the Swap Matching problem with short patterns. In particular, we devise a O(nm 2) general algorithm, named Backward-Cross-Sampling, and show an efficient implementation of it, based on bit-parallelism, which achieves O(nm) worst-case time and O(σ)-space complexity, with patterns whose length m is comparable to the word-size of the target machine (n and σ are respectively the size of the text and of the alphabet). From an extensive comparison with some of the most recent and effective algorithms for the swap matching problem, it turns out that our algorithm is very flexible and achieves very good results in practice.
2009
978-3-642-10216-5
Combinatorial algorithms on words; Design and analysis of algorithms; Nonstandard pattern matching; Pattern matching with swaps
File in questo prodotto:
File Dimensione Formato  
2009 CampanelliCantoneFaro IWOCA.pdf

solo gestori archivio

Tipologia: Versione Editoriale (PDF)
Dimensione 237.78 kB
Formato Adobe PDF
237.78 kB Adobe PDF   Visualizza/Apri

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.11769/76669
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 9
  • ???jsp.display-item.citation.isi??? 7
social impact