Abstract
Given a two-dimensional array of symbols and a picture language over a finite alphabet, we study the problem of finding rectangular subarrays of the array that belong to the picture language. We formulate four particular problems – finding maximum, minimum, any or all match(es) – and describe algorithms solving them for basic classes of picture languages, including local picture languages and picture languages accepted by deterministic on-line tessellation automata or deterministic four-way finite automata. We also prove that the matching problems cannot be solved for the class of local picture languages in linear time unless the problem of triangle finding is solvable in quadratic time. This shows there is a fundamental difference in the pattern matching complexity regarding the one-dimensional and two-dimensional setting.
D. Průša—Supported by the Czech Science Foundation grant 19-09967S.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
E.g. the local picture languages \(L_\mathrm{corn}\) and \(L_\mathrm{corn2}\) are not in \(\mathsf{bu\text {-}LOC} \).
References
Abboud, A., Backurs, A., Williams, V.V.: If the current clique algorithms are optimal, so is Valiant’s parser. In: Guruswami, V. (ed.) FOCS 2015, pp. 98–117. IEEE Computer Society (2015). https://doi.org/10.1109/FOCS.2015.16
Aho, A.V.: Algorithms for finding patterns in strings. In: van Leeuwen, J. (ed.) Algorithms and Complexity, Handbook of Theoretical Computer Science, vol. A, pp. 255–300. The MIT Press, Cambridge (1990)
Anselmo, M., Giammarresi, D., Madonia, M.: From determinism to non-determinism in recognizable two-dimensional languages. In: Harju, T., Karhumäki, J., Lepistö, A. (eds.) DLT 2007. LNCS, vol. 4588, pp. 36–47. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73208-2_7
Baeza-Yates, R., Régnier, M.: Fast two-dimensional pattern matching. Inf. Process. Lett. 45(1), 51–57 (1993). https://doi.org/10.1016/0020-0190(93)90250-D
Blum, M., Hewitt, C.: Automata on a 2-dimensional tape. In: SWAT 1967, pp. 155–160. IEEE Computer Society (1967). https://doi.org/10.1109/FOCS.1967.6
Borchert, B., Reinhardt, K.: Deterministically and sudoku-deterministically recognizable picture languages. In: Loos, R., Fazekas, S., Martín-Vide, C. (eds.) LATA 2007, pp. 175–186. Report 35/07, Tarragona (2007)
Giammarresi, D., Restivo, A.: Two-dimensional languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 215–267. Springer, Heidelberg (1997). https://doi.org/10.1007/978-3-642-59126-6_4
Han, Y.-S., Průša, D.: Template-based pattern matching in two-dimensional arrays. In: Brimkov, V.E., Barneva, R.P. (eds.) IWCIA 2017. LNCS, vol. 10256, pp. 79–92. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59108-7_7
Inoue, K., Nakamura, A.: Some properties of two-dimensional on-line tessellation acceptors. Inf. Sci. 13(2), 95–121 (1977). https://doi.org/10.1016/0020-0255(77)90023-8
Itai, A., Rodeh, M.: Finding a minimum circuit in a graph. In: Hopcroft, J.E., Friedman, E.P., Harrison, M.A. (eds.) STOC 1977, pp. 1–10. ACM (1977). https://doi.org/10.1145/800105.803390
Karp, R.M., Rabin, M.O.: Efficient randomized pattern-matching algorithms. IBM J. Res. Dev. 31(2), 249–260 (1987). https://doi.org/10.1147/rd.312.0249
Lee, L.: Fast context-free grammar parsing requires fast Boolean matrix multiplication. J. ACM 49(1), 1–15 (2002). https://doi.org/10.1145/505241.505242
Morgan, C.: Programming from Specifications. Prentice Hall International Series in Computer Science, 2nd edn. Prentice Hall, Upper Saddle River (1994)
de Oliveira Oliveira, M., Wehar, M.: Intersection non-emptiness and hardness within polynomial time. In: Hoshi, M., Seki, S. (eds.) DLT 2018. LNCS, vol. 11088, pp. 282–290. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-98654-8_23
Potechin, A., Shallit, J.: Lengths of words accepted by nondeterministic finite automata. CoRR abs/1802.04708 (2018). http://arxiv.org/abs/1802.04708
Průša, D., Mráz, F., Otto, F.: Two-dimensional Sgraffito automata. RAIRO Theor. Inf. Appl. 48, 505–539 (2014). https://doi.org/10.1051/ita/2014023
Richards, D., Liestman, A.L.: Finding cycles of a given length. In: Alspach, B., Godsil, C. (eds.) Annals of Discrete Mathematics (27): Cycles in Graphs, North-Holland Mathematics Studies, vol. 115, pp. 249–255, North-Holland (1985)
Siromoney, G., Siromoney, R., Krithivasan, K.: Abstract families of matrices and picture languages. Comput. Graph. Image Process. 1(3), 284–307 (1972)
Sun, X., Nobel, A.B.: On the size and recovery of submatrices of ones in a random binary matrix. J. Mach. Learn. Res. 9(Nov), 2431–2453 (2008)
Toda, M., Inoue, K., Takanami, I.: Two-dimensional pattern matching by two-dimensional on-line tessellation acceptors. Theor. Comput. Sci. 24, 179–194 (1983). https://doi.org/10.1016/0304-3975(83)90048-8
Williams, V.V.: Multiplying matrices faster than Coppersmith-Winograd. In: STOC 2012, pp. 887–898. ACM, New York (2012). https://doi.org/10.1145/2213977.2214056
Williams, V.V.: Hardness of easy problems: basing hardness on popular conjectures such as the strong exponential time hypothesis (invited talk). In: Husfeldt, T., Kanj, I.A. (eds.) IPEC 2015. LIPIcs, vol. 43, pp. 17–29. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2015). https://doi.org/10.4230/LIPIcs.IPEC.2015.17
Yuster, R., Zwick, U.: Finding even cycles even faster. SIAM J. Discrete Math. 10(2), 209–222 (1997). https://doi.org/10.1137/S0895480194274133
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Mráz, F., Průša, D., Wehar, M. (2019). Two-Dimensional Pattern Matching Against Basic Picture Languages. In: Hospodár, M., Jirásková, G. (eds) Implementation and Application of Automata. CIAA 2019. Lecture Notes in Computer Science(), vol 11601. Springer, Cham. https://doi.org/10.1007/978-3-030-23679-3_17
Download citation
DOI: https://doi.org/10.1007/978-3-030-23679-3_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-23678-6
Online ISBN: 978-3-030-23679-3
eBook Packages: Computer ScienceComputer Science (R0)