Abstract
The rational index \(\rho _L\) of a language L is an integer function, where \(\rho _L(n)\) is the maximum length of the shortest string in \(L \cap R\), over all regular languages R recognized by n-state nondeterministic finite automata (NFA). This paper investigates the rational index of languages defined by grammars with bounded parse tree dimension: this is a numerical measure of the amount of branching in a tree (with trees in a linear grammar having dimension 1). For context-free grammars, a grammar with tree dimension bounded by d has rational index at most \(O(n^{2d})\), and it is known from the literature that there exists a grammar with rational index \(\Theta (n^{2d})\). In this paper, it is shown that for multi-component grammars with at most k components (k-MCFG) and with a tree dimension bounded by d, the rational index is at most \(O(n^{2kd})\), where the constant depends on the grammar, and there exists such a grammar with rational index \(\frac{k}{2^{kd^2 - kd -2k -1} \cdot (8k+1)^{2kd}} n^{2kd}\). Also, for the case of ordinary context-free grammars, a more precise lower bound \(\frac{1}{2^{d^2 + d - 3} 3^{2d}} n^{2d}\) is established.
Similar content being viewed by others
References
Alpoge, L., Ang, T., Schaeffer, L., Shallit, J.O.: Decidability and shortest strings in formal languages. In: Holzer, M., Kutrib, M., Pighizzini, G. (eds.) Descriptional Complexity of Formal Systems–13th International Workshop, DCFS 2011, Gießen/Limburg, Germany, July 25-27, 2011. Proceedings. Lecture Notes in Computer Science, vol. 6808, pp. 55–67. Springer (2011). https://doi.org/10.1007/978-3-642-22600-7_5
Autebert, J.M., Berstel, J., Boasson, L.: Context-Free Languages and Pushdown Automata, pp. 111–174. Springer Berlin Heidelberg, Berlin, Heidelberg (1997)
Bar-Hillel, Y., Perles, M., Shamir, E.: On formal properties of simple phreise structure grammars. STUF - Language Typology and Universals 14(1–4), 143–172 (1961). https://doi.org/10.1524/stuf.1961.14.14.143
Boasson, L., Courcelle, B., Nivat, M.: The rational index: A complexity measure for languages. SIAM J. Comput. 10(2), 284–296 (1981). https://doi.org/10.1137/0210020
Brzozowski, J.A.: Regular-like expressions for some irregular languages. In: 9th Annual Symposium on Switching and Automata Theory, Schenectady, New York, USA, October 15–18, 1968. pp. 278–286. IEEE Computer Society (1968). https://doi.org/10.1109/SWAT.1968.24
Chistikov, D., Czerwinski, W., Hofman, P., Pilipczuk, M., Wehar, M.: Shortest paths in one-counter systems. Log. Methods Comput. Sci. 15(1) (2019). https://doi.org/10.23638/LMCS-15(1:19)2019
Chytil, M., Monien, B.: Caterpillars and context-free languages. In: Choffrut, C., Lengauer, T. (eds.) STACS 90, 7th Annual Symposium on Theoretical Aspects of Computer Science, Rouen, France, February 22–24, 1990, Proceedings. Lecture Notes in Computer Science, vol. 415, pp. 70–81. Springer (1990). https://doi.org/10.1007/3-540-52282-4_33
Dobronravov, E., Dobronravov, N., Okhotin, A.: On the length of shortest strings accepted by two-way finite automata. Fundam. Informaticae 180(4), 315–331 (2021). https://doi.org/10.3233/FI-2021-2044
Ellul, K., Krawetz, B., Shallit, J.O., Wang, M.: Regular expressions: New results and open problems. J. Autom. Lang. Comb. 10(4), 407–437 (2005). https://doi.org/10.25596/jalc-2005-407
Engelfriet, J.: Context-free graph grammars. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, Volume 3: Beyond Words, pp. 125–213. Springer (1997). https://doi.org/10.1007/978-3-642-59126-6_3
Esparza, J., Ganty, P., Kiefer, S., Luttenberger, M.: Parikh’s theorem: A simple and direct automaton construction. Inf. Process. Lett. 111(12), 614–619 (2011). https://doi.org/10.1016/j.ipl.2011.03.019
Esparza, J., Luttenberger, M., Schlund, M.: A brief history of Strahler numbers. In: Dediu, A., Martín-Vide, C., Sierra-Rodríguez, J.L., Truthe, B. (eds.) Language and Automata Theory and Applications - 8th International Conference, LATA 2014, Madrid, Spain, March 10-14, 2014. Proceedings. Lecture Notes in Computer Science, vol. 8370, pp. 1–13. Springer (2014). https://doi.org/10.1007/978-3-319-04921-2_1
Ganty, P., Valput, D.: Bounded-oscillation pushdown automata. In: Cantone, D., Delzanno, G. (eds.) Proceedings of the Seventh International Symposium on Games, Automata, Logics and Formal Verification, GandALF 2016, Catania, Italy, 14–16 September 2016. EPTCS, vol. 226, pp. 178–197 (2016). https://doi.org/10.4204/EPTCS.226.13
Gebhardt, K., Meunier, F., Salvati, S.: On is an n-MCFL. J. Comput. Syst. Sci. 127, 41–52 (2022). https://doi.org/10.1016/j.jcss.2022.02.003
Greenlaw, R., Hoover, H.J., Ruzzo, W.L.: Limits to Parallel Computation: P-completeness Theory. Oxford University Press Inc, New York, NY, USA (1995)
Hellings, J.: Explaining results of path queries on graphs-single-path results for context-free path queries. In: Qin, L., Zhang, W., Zhang, Y., Peng, Y., Kato, H., Wang, W., Xiao, C. (eds.) Software Foundations for Data Interoperability and Large Scale Graph Data Analytics - 4th International Workshop, SFDI 2020, and 2nd International Workshop, LSGDA 2020, held in Conjunction with VLDB 2020, Tokyo, Japan, September 4, 2020, Proceedings. Communications in Computer and Information Science, vol. 1281, pp. 84–98. Springer (2020). https://doi.org/10.1007/978-3-030-61133-0_7
Holzer, M., Kutrib, M., Leiter, U.: Nodes connected by path languages. In: Mauri, G., Leporati, A. (eds.) Developments in Language Theory - 15th International Conference, DLT 2011, Milan, Italy, July 19-22, 2011. Proceedings. Lecture Notes in Computer Science, vol. 6795, pp. 276–287. Springer (2011). https://doi.org/10.1007/978-3-642-22321-1_24
Kanazawa, M.: Ogden’s lemma, multiple context-free grammars, and the control language hierarchy. Inf. Comput. 269 (2019). https://doi.org/10.1016/j.ic.2019.104449
Komarath, B., Sarma, J., Sunil, K.S.: On the complexity of l-reachability. In: Jürgensen, H., Karhumäki, J., Okhotin, A. (eds.) Descriptional Complexity of Formal Systems-16th International Workshop, DCFS 2014, Turku, Finland, August 5–8, 2014. Proceedings. Lecture Notes in Computer Science, vol. 8614, pp. 258–269. Springer (2014). https://doi.org/10.1007/978-3-319-09704-6_23
Krymski, S., Okhotin, A.: Longer shortest strings in two-way finite automata. In: Jirásková, G., Pighizzini, G. (eds.) Descriptional Complexity of Formal Systems-22nd International Conference, DCFS 2020, Vienna, Austria, August 24–26, 2020, Proceedings. Lecture Notes in Computer Science, vol. 12442, pp. 104–116. Springer (2020). https://doi.org/10.1007/978-3-030-62536-8_9
Lohrey, M., Rosowski, A., Zetzsche, G.: Membership problems in finite groups. In: Szeider, S., Ganian, R., Silva, A. (eds.) 47th International Symposium on Mathematical Foundations of Computer Science, MFCS 2022, August 22-26, 2022, Vienna, Austria. LIPIcs, vol. 241, pp. 71:1–71:16. Schloss Dagstuhl–Leibniz–Zentrum für Informatik (2022). https://doi.org/10.4230/LIPIcs.MFCS.2022.71
Luttenberger, M., Schlund, M.: Convergence of Newton’s method over commutative semirings. In: Dediu, A., Martín–Vide, C., Truthe, B. (eds.) Language and Automata Theory and Applications–7th International Conference, LATA 2013, Bilbao, Spain, April 2–5, 2013. Proceedings. Lecture Notes in Computer Science, vol. 7810, pp. 407–418. Springer (2013). https://doi.org/10.1007/978-3-642-37064-9_36
Martynova, O., Okhotin, A.: Shortest accepted strings for two-way finite automata: Approaching the \(2^{n}\) lower bound 13918, 134–145 (2023). https://doi.org/10.1007/978-3-031-34326-1_10
Okhotin, A.: Conjunctive and Boolean grammars: The true general case of the context-free grammars. Comput. Sci. Rev. 9, 27–59 (2013). https://doi.org/10.1016/j.cosrev.2013.06.001
Okhotin, A.: A tale of conjunctive grammars. In: Hoshi, M., Seki, S. (eds.) Developments in Language Theory–22nd International Conference, DLT 2018, Tokyo, Japan, September 10–14, 2018, Proceedings. Lecture Notes in Computer Science, vol. 11088, pp. 36–59. Springer (2018). https://doi.org/10.1007/978-3-319-98654-8_4
Pierre, L.: Rational indexes of generators of the cone of context-free languages. Theor. Comput. Sci. 95(2), 279–305 (1992). https://doi.org/10.1016/0304-3975(92)90269-L
Pierre, L., Farinone, J.: Context-free languages with rational index in \(\theta (n \lambda )\) for algebraic numbers \(\lambda \). RAIRO Theor. Informatics Appl. 24, 275–322 (1990). https://doi.org/10.1051/ita/1990240302751
Ramanujan, S.: A proof of Bertrand’s postulate. Journal of the Indian Mathematical Society 11(181–182), 27 (1919)
Reps, T.W.: Program analysis via graph reachability. Inf. Softw. Technol. 40(11–12), 701–726 (1998). https://doi.org/10.1016/S0950-5849(98)00093-7
Reps, T.W.: Undecidability of context-sensitive data-independence analysis. ACM Trans. Program. Lang. Syst. 22(1), 162–186 (2000). https://doi.org/10.1145/345099.345137
Rubtsov, A., Vyalyi, M.: Regular realizability problems and context-free languages. In: Shallit, J., Okhotin, A. (eds.) Descriptional Complexity of Formal Systems, pp. 256–267. Springer International Publishing, Cham (2015)
Salomaa, A.: On the index of a context-free grammar and language. Inf. Control 14(5), 474–477 (1969). https://doi.org/10.1016/S0019-9958(69)90164-8
Seki, H., Matsumura, T., Fujii, M., Kasami, T.: On multiple context-free grammars. Theor. Comput. Sci. 88(2), 191–229 (1991). https://doi.org/10.1016/0304-3975(91)90374-B
Sondow, J.: Ramanujan primes and Bertrand’s postulate. Am. Math. Mon. 116(7),630–635 (2009). http://www.jstor.org/stable/40391170
Späth, J., Ali, K., Bodden, E.: Context-, flow-, and field-sensitive data-flow analysis using synchronized pushdown systems. Proc. ACM Program. Lang. 3(POPL) (2019). https://doi.org/10.1145/3290361
Ullman, J.D., Gelder, A.V.: Parallel complexity of logical query programs. Algorithmica 3, 5–42 (1988). https://doi.org/10.1007/BF01762108
Vijay-Shanker, K., Weir, D.J., Joshi, A.K.: Characterizing structural descriptions produced by various grammatical formalisms. In: Sidner, C.L. (ed.) 25th Annual Meeting of the Association for Computational Linguistics, Stanford University, Stanford, California, USA, July 6–9, 1987. pp. 104–111. ACL (1987). https://doi.org/10.3115/981175.981190
Wechsung, G.: The oscillation complexity and a hierarchy of context-free languages. In: Budach, L. (ed.) Fundamentals of Computation Theory, FCT 1979, Proceedings of the Conference on Algebraic, Arthmetic, and Categorial Methods in Computation Theory, Berlin/Wendisch-Rietz, Germany, September 17–21, 1979. pp. 508–515. Akademie-Verlag, Berlin (1979)
Yannakakis, M.: Graph-theoretic methods in database theory. In: Rosenkrantz, D.J., Sagiv, Y. (eds.) Proceedings of the Ninth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, April 2–4, 1990, Nashville, Tennessee, USA. pp. 230–242. ACM Press (1990). https://doi.org/10.1145/298514.298576
Zhang, Q., Su, Z.: Context-sensitive data-dependence analysis via linear conjunctive language reachability. In: Castagna, G., Gordon, A.D. (eds.) Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18–20, 2017. pp. 344–358. ACM (2017). https://doi.org/10.1145/3009837.3009848
Acknowledgements
The authors would like to express their gratitude to the anonymous reviewer for explaining the previous work on closely related notions done by the French school to the authors, for attracting the authors’ attention to the shortcomings of the original submission, and for most helpful suggestions on the presentation of the results.
Author information
Authors and Affiliations
Contributions
E. Shemetova, A. Okhotin, S. Grigorev wrote the main manuscript text and prepared figures 1-7. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Shemetova, E., Okhotin, A. & Grigorev, S. Rational Index of Languages Defined by Grammars with Bounded Dimension of Parse Trees. Theory Comput Syst (2023). https://doi.org/10.1007/s00224-023-10159-3
Accepted:
Published:
DOI: https://doi.org/10.1007/s00224-023-10159-3