Some classifications of context-free languages (original) (raw)

Abstract

sparkles

AI

This paper explores various classifications of context-free languages through the lens of grammar complexity. It builds upon previous studies and definitions to investigate classifications based on the minimal number of variables and the intrinsic structure of grammars. Key findings include upper bounds for recognition steps, relationships among different language classes, and existence results for specific types of inherently context-free languages.

Loading...

Loading Preview

Sorry, preview is currently unavailable. You can download the paper by clicking the button above.

References (15)

  1. Var (R,+I) = n + 1. Since R.+I is a regular event we have Dep (R~+I) = 1, Lev, (R,+x) = 0. Finally we shall prove that Prod (R,+I) = 3n. To do this let G = (V, {a, b}, P, z} be a grammar for R~+I such that Prod (G) = Prod (R~+I). Similarly as in point one we can show that if A is a variable and A ~ z, then in G there are at least two productions ~Sth A on the left-hand side. Next, by using similar arguments as those in the proof of Lemma 1, Gruska (1967), we can show that if A is a variable in G and there are terminal strings x, y, xy ~ e, such that A ~ xAy, then the assertion (2) from the proof of Theorem 5.3 holds. Then we say that A is an R-vari- able of the type i (as to the i see (2) in Theorem 5.3). From the struc- ture of the language R~+~ it follows that for every integer i -< n there is an R-variable of the type i and, moreover, if Aj. is an R-variable of the type ~j, j = 1, 2, ix ~ i2, then neither A~ ~ A2 nor A2 ~,~ A~ nor are there strings x, y, z such that z ~ xAlyA2z. Whence it follows that for every R-variable A there are at least two productions with A on the left-hand side and at least one production with A on the right-hand side and such that the variable on the left-hand side is not A. Thus Prod (G)> 3n. Summarizing the foregoing results we get (C1) Var (R~+I) = n -~ 1 = Lev (R~+x), Dep (R~+I) = 1, Lev~ (R~+I) = 0, Prod (R.+I) = 3n
  2. and hence, by (C) and (C1), K(~.j) (R~+I) = n + 1 for 1 =< j -< 5. (iv) i = 4. Let n>_-1. Denote by G~ the grammar (1) in the proof of Theorem 5.4. Clearly (D) Var (G~) = 2n~-1, Lev(G~) = n-~ 1, Dep (G~) = 2, Lev~ (G~) = n, Prod (G~) = 6n
  3. Denote L(G,~) = L,~. By Theorem 5.4, Lev~ (L,) = n and hence Dep (L~) > 1. Since Dep (G~) = 2 we have Dep (L~) = 2. Now let G = (V, Z, P, z} be a reduced grammar for L~. Let z ~ xzy for some strings x and y. According to the properties of strings in L~--see (i) to (v) in the proof of Theorem 5.4--we get G(x) = G(y) = {e} and therefore we can omit in G all productions having z on the right-hand side without changing the language and without increasing the number of variables or grammatical levels. This fact, together with Lev~ (L.) = n, Var (G~) = 2n -k 1, Lev (G~) = n -b 1, implies Lev (L~) = n q-1, Vat (L~) = 2n -k 1. Finally wehaveProd (L.) ---6n. REFERENCES
  4. I. CVLiK, K., (Roma 1962) Formal structure of ALGOL and simplification of its description. Symbolic languages in data processing, pp. 75-82.
  5. CULIK, K., FRI~, I., GRUSKA, ft., HAVEL, I., KOPf~IVA, J., AND NOVOTNY, I~[., The mathematical theory of grammars and languages. (To be published).
  6. GINSBURG, S., (1966) "The mathematical theory of context-free languages." McGraw-Hill, New York.
  7. GINSBURG, S., AND ROSE, G. F., (1963a) Some recursively unsolvable problems in ALGOL-like languages. J.ACM. 10, 29-47.
  8. GINSBURG, S., AND ROSE, G. F., (1963b) Operations which preserve definability in languages. J.ACM. 10,175-195.
  9. GRUSKA, J., (1967) On a classification of context-free grammars. Kybernelika 3, 22-29.
  10. HARTMANIS, J., AND STEARNS, R. E., (1965) On the computational complexity of algorithms. Trans. Am. Math. Soe. 117,285-306.
  11. HARTMANIS, J., LEWIS, 2nd, P. M., AND STEARNS, R. E., (1965) Classifications of computations by time and memory requirements. Proceedings of IFIP Congress, 31-35.
  12. KASAMI, T., (1967) A note on computing time for recognition of languages generated by linear grammars. Inform. and Control 10,209-214.
  13. KoPfiIvA, J., (1964) Some notes on the formal structure of ALGOL 60. Publ. Fac. Sci. Univ. J. E. Purkyne, 409-418.
  14. N•UR, P., (1963) Revised report on the algorithmic language ALGOL 60. CACM. 6, 1-20.
  15. REDKO, V. N (1965), Some problems of language theory. Kibernetika 1, 12-21.