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|).
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
Amir, A., Benson, G., Farach, M.: An alphabet independent approach to two-dimensional pattern matching. SICOMP: SIAM Journal on Computing 23 (1994)
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)
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)
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)
Bird, R.S.: Two dimensional pattern matching. Information Processing Letters 6(5), 168–170 (1977)
Chan, H.L., Hon, W.K., Lam, T.W., Sadakane, K.: Compressed indexes for dynamic text collections. ACM Transactions on Algorithms 3(2) (2007)
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)
Crochemore, M., Perrin, D.: Two-way string-matching. J. ACM 38(3), 650–674 (1991)
Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Structuring labeled trees for optimal succinctness, and beyond. In: FOCS 2005, pp. 184–196 (2005)
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)
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)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SICOMP: SIAM Journal on Computing 13 (1984)
Hon, W.-K., Ku, T.-H., Shah, R., Thankachan, S.V., Vitter, J.S.: Faster compressed dictionary matching. In: SPIRE, pp. 191–200 (2010)
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)
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)
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)
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)
Rytter, W.: On maximal suffixes and constant-space linear-time versions of kmp algorithm. Theor. Comput. Sci. 299(1-3), 763–774 (2003)
Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)