Skip to main content

Small-Space 2D Compressed Dictionary Matching

  • Conference paper
Combinatorial Pattern Matching (CPM 2010)

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

Included in the following conference series:

Abstract

The dictionary matching problem seeks all locations in a text that match any of the patterns in a dictionary. In the compressed dictionary matching problem, the input is in compressed form. In this paper we introduce the 2-dimensional compressed dictionary matching problem in Lempel-Ziv compressed images, and present an efficient solution for patterns whose rows are all periodic. Given k patterns, each of (uncompressed) size m ×m, and a text of (uncompressed) size n ×n, all in 2D-LZ compressed form, our algorithm finds all occurrences of the patterns in the text. The algorithm is strongly inplace, i.e., the extra space it uses is proportional to the optimal compression of the dictionary, which is O(km). The preprocessing time of the algorithm is O(km 2), linear in the uncompressed dictionary size, and the time for performing the search is linear in the uncompressed text size, independent of the dictionary size. Our algorithm is general in the sense that it can be used for any 2D compression scheme which can be sequentially decompressed in small space.

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. Aho, A.V., Corasick, M.J.: Efficient string matching: an aid to bibliographic search. Commun. ACM 18(6), 333–340 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  2. Amir, A., Farach, M.: Two-dimensional dictionary matching. Inf. Process. Lett. 44(5), 233–239 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  3. Amir, A., Landau, G.M., Sokol, D.: Inplace 2d matching in compressed images. J. Algorithms 49(2), 240–261 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  4. Amir, A., Landau, G.M., Sokol, D.: Inplace run-length 2d compressed search. Theor. Comput. Sci. 290(3), 1361–1383 (2003)

    Article  MATH  MathSciNet  Google Scholar 

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

  6. Berman, P., Karpinski, M., Larmore, L.L., Plandowski, W., Rytter, W.: On the complexity of pattern matching for highly compressed two-dimensional texts. J. Comput. Syst. Sci. 65(2), 332–350 (2002)

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  Google Scholar 

  8. Crochemore, M., Gasieniec, L., Hariharan, R., Muthukrishnan, S., Rytter, W.: A constant time optimal parallel algorithm for two-dimensional pattern matching. SIAM J. Comput. 27(3), 668–681 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  9. Idury, R.M., Schäffer, A.A.: Multiple matching of rectangular patterns. In: STOC 1993: Proceedings of the twenty-fifth annual ACM symposium on Theory of computing, pp. 81–90. ACM, New York (1993)

    Chapter  Google Scholar 

  10. Kida, T., Takeda, M., Shinohara, A., Miyazaki, M., Arikawa, S.: Multiple pattern matching in lzw compressed text. In: DCC 1998: Proceedings of the Conference on Data Compression, Washington, DC, USA, p. 103. IEEE Computer Society, Los Alamitos (1998)

    Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  12. Lothaire, M.: Applied Combinatorics on Words (Encyclopedia of Mathematics and its Applications). Cambridge University Press, New York (2005)

    Google Scholar 

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

  14. Ziv, J., Lempel, A.: Compression of individual sequences via variable-rate coding. IEEE Transactions on Information Theory  IT-24, 530–536 (1978)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Neuburger, S., Sokol, D. (2010). Small-Space 2D Compressed Dictionary Matching. In: Amir, A., Parida, L. (eds) Combinatorial Pattern Matching. CPM 2010. Lecture Notes in Computer Science, vol 6129. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13509-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13509-5_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13508-8

  • Online ISBN: 978-3-642-13509-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics