Parameterized matching on non-linear structures

Amihood Amir, Gonzalo Navarro

Research output: Contribution to journalArticlepeer-review

6 Scopus citations


The classical pattern matching paradigm is that of seeking occurrences of one string in another, where both strings are drawn from an alphabet set Σ. In the parameterized pattern matching model, a consistent renaming of symbols from Σ is allowed in a match. The parameterized matching paradigm has proven useful in problems in software engineering, computer vision, and other applications. In classical pattern matching, both the text and pattern are strings. Applications such as searching in xml or searching in hypertext require searching strings in non-linear structures such as trees or graphs. There has been work in the literature on exact and approximate parameterized matching, as well as work on exact and approximate string matching on non-linear structures. In this paper we explore parameterized matching in non-linear structures. We prove that exact parameterized matching on trees can be computed in linear time for alphabets in an O (n)-size integer range, and in time O (n log m) in general, where n is the tree size and m the pattern length. These bounds are optimal in the comparison model. We also show that exact parameterized matching on directed acyclic graphs (DAGs) is NP-complete.

Original languageEnglish
Pages (from-to)864-867
Number of pages4
JournalInformation Processing Letters
Issue number15
StatePublished - 16 Jul 2009

Bibliographical note

Funding Information:
E-mail addresses: (A. Amir), (G. Navarro). 1 Tel.: +972 3 531 8770. 2 Partly supported by ISF grant 35/05 and an Israel–Korea bi-national research grant. 3Partially funded by Millennium Institute for Cell Dynamics and Biotechnology (ICDB), Grant ICM P05-001-F, Mideplan, Chile.


  • Algorithms
  • NP-completeness
  • Parameterized matching
  • Pattern matching in trees and DAGs


Dive into the research topics of 'Parameterized matching on non-linear structures'. Together they form a unique fingerprint.

Cite this