Skip to main content

Succinct 2D Dictionary Matching with No Slowdown

  • Conference paper
Algorithms and Data Structures (WADS 2011)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6844))

Included in the following conference series:

  • 1645 Accesses

Abstract

The dictionary matching problem seeks all locations in a given text that match any of the patterns in a given dictionary. Efficient algorithms for dictionary matching scan the text once, searching for all patterns simultaneously. This paper presents the first 2-dimensional dictionary matching algorithm that operates in small space and linear time. Given d patterns, D = {P 1,…,P d }, each of size m ×m, and a text T of size n ×n, our algorithm finds all occurrences of P i , 1 ≤ i ≤ d, in T. The preprocessing stores the dictionary in entropy compressed form, in |D| H k (D) + O(|D|) bits. Our algorithm uses \(O(dm \: \log \: dm)\) bits of extra space. The time complexity of our algorithm is linear O(|D| + |T|).

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Amir, A., Benson, G., Farach, M.: An alphabet independent approach to two-dimensional pattern matching. SICOMP: SIAM Journal on Computing 23 (1994)

    Google Scholar 

  2. Baker, T.J.: A technique for extending rapid exact-match string matching to arrays of more than one dimension. SIAM J. Comp. (7), 533–541 (1978)

    Google Scholar 

  3. Belazzougui, D.: Succinct dictionary matching with no slowdown. In: Amir, A., Parida, L. (eds.) CPM 2010. LNCS, vol. 6129, pp. 88–100. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  4. Bender, M.A., Farach-Colton, M.: The lca problem revisited. In: Gonnet, G.H., Viola, A. (eds.) LATIN 2000. LNCS, vol. 1776, pp. 88–94. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  5. Bird, R.S.: Two dimensional pattern matching. Information Processing Letters 6(5), 168–170 (1977)

    Article  Google Scholar 

  6. Chan, H.L., Hon, W.K., Lam, T.W., Sadakane, K.: Compressed indexes for dynamic text collections. ACM Transactions on Algorithms 3(2) (2007)

    Google Scholar 

  7. Crochemore, M., Gasieniec, L., Plandowski, W., Rytter, W.: Two-dimensional pattern matching in linear time and small space. In: STACS: Annual Symposium on Theoretical Aspects of Computer Science (1995)

    Google Scholar 

  8. Crochemore, M., Perrin, D.: Two-way string-matching. J. ACM 38(3), 650–674 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  9. Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Structuring labeled trees for optimal succinctness, and beyond. In: FOCS 2005, pp. 184–196 (2005)

    Google Scholar 

  10. Galil, Z., Seiferas, J.: Time-space-optimal string matching (preliminary report). In: STOC 1981: Proceedings of the Thirteenth Annual ACM Symposium on Theory of Computing, pp. 106–113. ACM, New York (1981)

    Chapter  Google Scholar 

  11. Gąsieniec, L., Kolpakov, R.: Real-time string matching in sublinear space. In: Sahinalp, S.C., Muthukrishnan, S.M., Dogrusoz, U. (eds.) CPM 2004. LNCS, vol. 3109, pp. 117–129. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  12. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SICOMP: SIAM Journal on Computing 13 (1984)

    Google Scholar 

  13. Hon, W.-K., Ku, T.-H., Shah, R., Thankachan, S.V., Vitter, J.S.: Faster compressed dictionary matching. In: SPIRE, pp. 191–200 (2010)

    Google Scholar 

  14. Hon, W.-K., Lam, T.W., Shah, R., Tam, S.-L., Vitter, J.S.: Compressed index for dictionary matching. In: DCC, pp. 23–32 (2008)

    Google Scholar 

  15. Hon, W.-K., Lam, T., Shah, R., Tam, S.-L., Vitter, J.S.: Succinct index for dynamic dictionary matching. In: Dong, Y., Du, D.-Z., Ibarra, O. (eds.) ISAAC 2009. LNCS, vol. 5878, pp. 1034–1043. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  16. Main, M.G., Lorentz, R.J.: An O(n log n) algorithm for finding all repetitions in a string. ALGORITHMS: Journal of Algorithms 5 (1984)

    Google Scholar 

  17. Neuburger, S., Sokol, D.: Small-space 2D compressed dictionary matching. In: Amir, A., Parida, L. (eds.) CPM 2010. LNCS, vol. 6129, pp. 27–39. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  18. Rytter, W.: On maximal suffixes and constant-space linear-time versions of kmp algorithm. Theor. Comput. Sci. 299(1-3), 763–774 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  19. Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Neuburger, S., Sokol, D. (2011). Succinct 2D Dictionary Matching with No Slowdown. In: Dehne, F., Iacono, J., Sack, JR. (eds) Algorithms and Data Structures. WADS 2011. Lecture Notes in Computer Science, vol 6844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22300-6_52

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22300-6_52

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22299-3

  • Online ISBN: 978-3-642-22300-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics