Skip to main content

Generalized Function Matching

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3341))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abrahamson, K.: Generalized string matching. SIAM J. Comp. 16(6), 1039–1051 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  2. 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)

    Google Scholar 

  3. Amir, A., Aumann, Y., Landau, G., Lewenstein, M., Lewenstein, N.: Pattern matching with swaps. In: Proc. 38th IEEE FOCS, pp. 144–153 (1997)

    Google Scholar 

  4. Amir, A., Benson, G., Farach, M.: An alphabet independent approach to two dimensional pattern matching. SIAM J. Comp. 23(2), 313–323 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. Amir, A., Farach, M.: Efficient 2-dimensional approximate matching of half-rectangular figures. Information and Computation 118(1), 1–11 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  8. Apostolico, A., Galil, Z.: Pattern Matching Algorithms. Oxford University Press, Oxford (1997)

    MATH  Google Scholar 

  9. Babu, G.P., Mehtre, B.M., Kankanhalli, M.S.: Color indexing for efficient image retrieval. Multimedia Tools and Applications 1(4), 327–348 (1995)

    Article  Google Scholar 

  10. 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)

    Google Scholar 

  11. Benson, G.: Tandem repeats finder: a program to analyze dna sequence. Nucleic Acids Research 27(2), 573–580 (1999)

    Article  MathSciNet  Google Scholar 

  12. Boyer, R.S., Moore, J.S.: A fast string searching algorithm. Comm. ACM 20, 762–772 (1977)

    Article  Google Scholar 

  13. 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)

    Google Scholar 

  14. Crochemore, M., Rytter, W.: Text Algorithms. Oxford University Press, Oxford (1994)

    MATH  Google Scholar 

  15. 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)

    Google Scholar 

  16. Holmes, D.: The evolution of stylometry in humanities scholarship. Literary and Linguistic Computing 13(3), 111–117 (1998)

    Article  Google Scholar 

  17. Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comp. 6, 323–350 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  18. Rao Kosaraju, S.: Efficient string matching. Manuscript (1987)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Swain, M., Ballard, D.: Color indexing. International Journal of Computer Vision 7(1), 11–32 (1991)

    Article  Google Scholar 

  21. Vishkin, U.: Optimal parallel pattern matching in strings. In: Proc. 12th ICALP, pp. 91–113 (1985)

    Google Scholar 

  22. Vishkin, U.: Deterministic sampling - a new technique for fast pattern matching. SIAM J. Comp. 20, 303–314 (1991)

    Article  MathSciNet  Google Scholar 

  23. Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics