Abstract
We present problems in different application areas: tandem repeats (computational biology), poetry and music analysis, and author validation, that require a more sophisticated pattern matching model that hitherto considered.
We introduce a new matching criterion – generalized function matching – that encapsulates the notion suggested by the above problems. The generalized function matching problem has as its input a text T of length n over alphabet Σ T ∪ {φ } and a pattern P = P[0]P[1]...P[m − 1] of length m over alphabet Σ P ∪ { φ }. We seek all text locations i where the prefix of the substring that starts at i is equal to f(P[0])f(P[1])...f(P[m–1]) for some function f: Σ P → Σ T *.
We give a polynomial time algorithm for the generalized pattern matching problem over bounded alphabets. We identify in this problem an important new phenomenon in pattern matching. One where there is a significant complexity difference between the bounded alphabet and infinite alphabet case. We prove that the generalized pattern matching problem over infinite alphabets is \({\mathcal NP}\)-hard. To our knowledge, this is the first case in the literature where a pattern matching problem over a bounded alphabet can be solved in polynomial time but the infinite alphabet version is \({\mathcal NP}\)-hard.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abrahamson, K.: Generalized string matching. SIAM J. Comp. 16(6), 1039–1051 (1987)
Amir, A., Aumann, A., Cole, R., Lewenstein, M., Porat, E.: Function matching: Algorithms, applications, and a lower bound. In: Proc. 30th ICALP, pp. 929–942 (2003)
Amir, A., Aumann, Y., Landau, G., Lewenstein, M., Lewenstein, N.: Pattern matching with swaps. In: Proc. 38th IEEE FOCS, pp. 144–153 (1997)
Amir, A., Benson, G., Farach, M.: An alphabet independent approach to two dimensional pattern matching. SIAM J. Comp. 23(2), 313–323 (1994)
Amir, A., Church, K.W., Dar, E.: Separable attributes: a technique for solving the submatrices character count problem. In: Proc. 13th ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 400–401 (2002)
Amir, A., Cole, R., Hariharan, R., Lewenstein, M., Porat, E.: Overlap matching. In: Proc. 12th ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 279–288 (2001)
Amir, A., Farach, M.: Efficient 2-dimensional approximate matching of half-rectangular figures. Information and Computation 118(1), 1–11 (1995)
Apostolico, A., Galil, Z.: Pattern Matching Algorithms. Oxford University Press, Oxford (1997)
Babu, G.P., Mehtre, B.M., Kankanhalli, M.S.: Color indexing for efficient image retrieval. Multimedia Tools and Applications 1(4), 327–348 (1995)
Baker, B.S.: A theory of parameterized pattern matching: algorithms and applications. In: Proc. 25th Annual ACM Symposium on the Theory of Computation, pp. 71–80 (1993)
Benson, G.: Tandem repeats finder: a program to analyze dna sequence. Nucleic Acids Research 27(2), 573–580 (1999)
Boyer, R.S., Moore, J.S.: A fast string searching algorithm. Comm. ACM 20, 762–772 (1977)
Chen, M.T., Seiferas, J.: Efficient and elegant subword tree construction. In: Apostolico, A., Galil, Z. (eds.) Combinatorial Algorithms on Words. NATO ASI Series F: Computer and System Sciences, vol. 12, pp. 97–107 (1985)
Crochemore, M., Rytter, W.: Text Algorithms. Oxford University Press, Oxford (1994)
Fischer, M.J., Paterson, M.S.: String matching and other products. In: Karp, R.M. (ed.) Complexity of Computation, SIAM-AMS Proceedings, vol. 7, pp. 113–125 (1974)
Holmes, D.: The evolution of stylometry in humanities scholarship. Literary and Linguistic Computing 13(3), 111–117 (1998)
Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comp. 6, 323–350 (1977)
Rao Kosaraju, S.: Efficient string matching. Manuscript (1987)
Muthukrishnan, S.: New results and open problems related to non-standard stringology. In: Galil, Z., Ukkonen, E. (eds.) CPM 1995. LNCS, vol. 937, pp. 298–317. Springer, Heidelberg (1995)
Swain, M., Ballard, D.: Color indexing. International Journal of Computer Vision 7(1), 11–32 (1991)
Vishkin, U.: Optimal parallel pattern matching in strings. In: Proc. 12th ICALP, pp. 91–113 (1985)
Vishkin, U.: Deterministic sampling - a new technique for fast pattern matching. SIAM J. Comp. 20, 303–314 (1991)
Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Amir, A., Nor, I. (2004). Generalized Function Matching. In: Fleischer, R., Trippen, G. (eds) Algorithms and Computation. ISAAC 2004. Lecture Notes in Computer Science, vol 3341. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30551-4_6
Download citation
DOI: https://doi.org/10.1007/978-3-540-30551-4_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-24131-7
Online ISBN: 978-3-540-30551-4
eBook Packages: Computer ScienceComputer Science (R0)