 
Summary: Alphabet Dependence in Parameterized Matching
Amihood Amir \Lambda Martin Farach y S. Muthukrishnan z
Georgia Tech DIMACS Courant Institute
& Rutgers U.
Abstract
The classical pattern matching paradigm is that of seeking occurrences of one string in
another, where both strings are drawn from an alphabet set \Sigma. A recently introduced model is
that of parameterized pattern matching. The main motivation for this scheme lies in software
maintenance where program fragments are considered ``identical'' even if variables names are
different. Besides the fixed symbols from \Sigma, strings under this model have additional symbols
from a variable set \Pi and occurrences of one string in the other are sought, where renaming of
the variables from \Pi is allowed in a match.
In this paper we provide an algorithm to find all occurrences of a pattern string of length m
in a text string of length n under the parameterized pattern matching model. Our algorithm
takes time O(n log ß), where ß = min(m; j\Pij), independent of j\Sigmaj. Our algorithm is optimal
since we show that this dependence on j\Pij is inherent to any algorithm for this problem in the
comparison model.
1 Introduction
In the classical pattern matching model, we seek occurrences of a string, or more generally a set
of strings, in a distinguished string. All strings are comprised of symbols from an alphabet set \Sigma.
