Abstract
Given a deterministic finite automaton (DFA) A, we present a simple algorithm for constructing four deterministic finite automata that accept the shortest forbidden factors, the shortest forbidden suffixes, the shortest allowed suffixes, and the shortest forbidden prefixes. We refer to these automata as the shortest characteristic factors of automaton A. If the given automaton is local, and therefore the language it accepts is strictly locally testable, the sets of its shortest characteristic factors are finite, and these four automata are acyclic. This approach simplifies existing methods for the extraction of forbidden factors and also generalizes it for all classes of input DFAs. Furthermore, we demonstrate that this type of extraction can be used for a sublinear run of an automaton for certain inputs. We define a positive position run of a deterministic finite automaton, representing all positions in an input string where the automaton reaches a final state. Finally, we present an algorithm for computing the positive position run of the automaton, which utilizes pattern set matching of its shortest forbidden factors and its shortest allowed suffixes, provided that the sets are finite. We showcase the computation of the positive position run of a local automaton using backward pattern matching, which can achieve sublinear time.
The authors acknowledge the support of the OP VVV MEYS funded project CZ.02.1.01/0.0/0.0/16_019/0000765 “Research Center for Informatics”.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Apostolico, A., Galil, Z. (eds.): Pattern Matching Algorithms. Oxford University Press, Oxford (1997). https://global.oup.com/academic/product/pattern-matching-algorithms-9780195113679
Baeza-Yates, R.: A unified view to string matching algorithms. In: Jeffery, K.G., Král, J., Bartošek, M. (eds.) SOFSEM 1996. LNCS, vol. 1175, pp. 1–15. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0037393
Béal, M.P., Senellart, J.: On the bound of the synchronization delay of a local automaton. Theoret. Comput. Sci. 205(1), 297–306 (1998). https://doi.org/10.1016/S0304-3975(98)80011-X
Béal, M., Crochemore, M., Mignosi, F., Restivo, A., Sciortino, M.: Computing forbidden words of regular languages. Fundam. Informaticae 56(1–2), 121–135 (2003). http://content.iospress.com/articles/fundamenta-informaticae/fi56-1-2-08
Blažej, V., Janoušek, J., Plachý, Š: On the smallest synchronizing terms of finite tree automata. In: Nagy, B. (ed.) CIAA 2023. LNCS, vol. 14151, pp. 79–90. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-40247-0_5
Caron, P.: Families of locally testable languages. Theoret. Comput. Sci. 242(1), 361–376 (2000). https://doi.org/10.1016/S0304-3975(98)00332-6
Cleophas, L.G., Watson, B.W., Zwaan, G.: A new taxonomy of sublinear right-to-left scanning keyword pattern matching algorithms. Sci. Comput. Program. 75(11), 1095–1112 (2010). https://doi.org/10.1016/j.scico.2010.04.012
Commentz-Walter, B.: A string matching algorithm fast on the average. In: Maurer, H.A. (ed.) ICALP 1979. LNCS, vol. 71, pp. 118–132. Springer, Heidelberg (1979). https://doi.org/10.1007/3-540-09510-1_10
Crochemore, M., Hancart, C.: Automata for matching patterns. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 399–462. Springer, Heidelberg (1997). https://doi.org/10.1007/978-3-662-07675-0_9
Crochemore, M., Hancart, C.: Pattern matching in strings. In: Algorithms and Theory of Computation Handbook. Chapman & Hall/CRC Applied Algorithms and Data Structures Series. CRC Press (1999). https://doi.org/10.1201/9781420049503-c12
Crochemore, M., Rytter, W.: Text Algorithms. Oxford University Press, Oxford (1994). http://www-igm.univ-mlv.fr/%7Emac/REC/B1.html
McNaughton, R., Papert, S.: Counter-Free Automata. MIT Press, Cambridge (1971)
Melichar, B.: String matching with k differences by finite automata. In: ICPR 1996, Vienna, Austria, 25–19 August 1996, pp. 256–260. IEEE Computer Society (1996). https://doi.org/10.1109/ICPR.1996.546828
Melichar, B., Holub, J.: 6D classification of pattern matching problems. In: Proceedings of the Prague Stringology Club Workshop 1997, pp. 24–32 (1997)
Plachý, Š, Janoušek, J.: On synchronizing tree automata and their work–optimal parallel run, usable for parallel tree pattern matching. In: Chatzigeorgiou, A., et al. (eds.) SOFSEM 2020. LNCS, vol. 12011, pp. 576–586. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-38919-2_47
Rogers, J., Lambert, D.: Extracting forbidden factors from regular stringsets. In: Proceedings of the 15th Meeting on the Mathematics of Language, London, UK, pp. 36–46. Association for Computational Linguistics (2017). https://doi.org/10.18653/v1/W17-3404
Rogers, J., Lambert, D.: Extracting subregular constraints from regular stringsets. J. Lang. Model. 7, 143 (2019). https://doi.org/10.15398/jlm.v7i2.209
Sipser, M.: Introduction to the Theory of Computation, 3rd edn. Course Technology, Boston (2013)
Watson, B.W., Zwaan, G.: A taxonomy of sublinear multiple keyword pattern matching algorithms. Sci. Comput. Program. 27(2), 85–118 (1996). https://doi.org/10.1016/0167-6423(96)00008-1
Watson, B.: Taxonomies and toolkits of regular language algorithms. Ph.D. thesis, Mathematics and Computer Science (1995). https://doi.org/10.6100/IR444299
Zalcstein, Y.: Locally testable languages. J. Comput. Syst. Sci. 6(2), 151–167 (1972). https://doi.org/10.1016/S0022-0000(72)80020-5
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Janoušek, J., Plachý, Š. (2024). Shortest Characteristic Factors of a Deterministic Finite Automaton and Computing Its Positive Position Run by Pattern Set Matching. In: Fernau, H., Gaspers, S., Klasing, R. (eds) SOFSEM 2024: Theory and Practice of Computer Science. SOFSEM 2024. Lecture Notes in Computer Science, vol 14519. Springer, Cham. https://doi.org/10.1007/978-3-031-52113-3_23
Download citation
DOI: https://doi.org/10.1007/978-3-031-52113-3_23
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-52112-6
Online ISBN: 978-3-031-52113-3
eBook Packages: Computer ScienceComputer Science (R0)