Alphabet Dependence in Parameterized Matching
MetadataShow full item record
The classical pattern matching paradigm is that of seeking occurrences of one string in another, where both strings are drawn from an alphabet set ∑. A recently introduced model is that of parameterized pattern matching; the main motivation for this scheme lies in software maintenance where programs are considered "identical" even if variables are different. Strings, under this model, additionally have symbols from a variable set Π and occurrences of one string in the other up to a renaming of the variables are sought. In this paper we show that finding the occurrences of a m-length string in a n-length string under the parameterized pattern matching paradigm can be done in time O (n log π), where π = min (m, ∣Π∣); that is , independent of ∣∑∣. Additionally, we show that in general this dependence on ∣Π∣ is inherent to any algorithm for this problem in the comparison model – that is, our algorithm is optimal.