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.
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
Aho, A.V., Corasick, M.J.: Efficient string matching: an aid to bibliographic search. Commun. ACM 18(6), 333–340 (1975)
Amir, A., Farach, M.: Two-dimensional dictionary matching. Inf. Process. Lett. 44(5), 233–239 (1992)
Amir, A., Landau, G.M., Sokol, D.: Inplace 2d matching in compressed images. J. Algorithms 49(2), 240–261 (2003)
Amir, A., Landau, G.M., Sokol, D.: Inplace run-length 2d compressed search. Theor. Comput. Sci. 290(3), 1361–1383 (2003)
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)
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)
Bird, R.S.: Two dimensional pattern matching. Information Processing Letters 6(5), 168–170 (1977)
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)
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)
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)
Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977)
Lothaire, M.: Applied Combinatorics on Words (Encyclopedia of Mathematics and its Applications). Cambridge University Press, New York (2005)
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)
Ziv, J., Lempel, A.: Compression of individual sequences via variable-rate coding. IEEE Transactions on Information Theory IT-24, 530–536 (1978)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)