Skip to main content

Two-Dimensional Pattern Matching Against Basic Picture Languages

  • Conference paper
  • First Online:
Implementation and Application of Automata (CIAA 2019)

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

Included in the following conference series:

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.

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 EPUB and 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

Notes

  1. 1.

    E.g. the local picture languages \(L_\mathrm{corn}\) and \(L_\mathrm{corn2}\) are not in \(\mathsf{bu\text {-}LOC} \).

References

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

  2. 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)

    Google Scholar 

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

    Chapter  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

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

  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)

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  13. Morgan, C.: Programming from Specifications. Prentice Hall International Series in Computer Science, 2nd edn. Prentice Hall, Upper Saddle River (1994)

    MATH  Google Scholar 

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

    Chapter  Google Scholar 

  15. Potechin, A., Shallit, J.: Lengths of words accepted by nondeterministic finite automata. CoRR abs/1802.04708 (2018). http://arxiv.org/abs/1802.04708

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

    Article  MathSciNet  MATH  Google Scholar 

  17. 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)

    Google Scholar 

  18. Siromoney, G., Siromoney, R., Krithivasan, K.: Abstract families of matrices and picture languages. Comput. Graph. Image Process. 1(3), 284–307 (1972)

    Article  MathSciNet  Google Scholar 

  19. 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)

    MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

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

  23. Yuster, R., Zwick, U.: Finding even cycles even faster. SIAM J. Discrete Math. 10(2), 209–222 (1997). https://doi.org/10.1137/S0895480194274133

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Průša .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics