Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

On the equivalence and containment problems for context-free languages


LetG andG 0 be context-free grammars. Necessary and sufficient conditions onG 0 are obtained for the decidability ofL(G 0)\( \subseteq \) L((G) It is also shown that it is undecidable for whichG 0,L(G) \( \subseteq \) is decidable. Furthermore, given thatL(G) \( \subseteq \) is decidable for a fixedG 0, there is no effective procedure to determine the algorithm which decidesL(G) \( \subseteq \) IfL(G 0) is a regular set,L(G) = L(G 0) is decidable if and only ifL(G 0) is bounded. However, there exist non-regular, unboundedL(G 0) for whichL(G) = L(G 0) is decidable.

This is a preview of subscription content, log in to check access.


  1. [1]

    S. Greibach, A note on undecidable properties of formal languages. SDC Document TM-738/038/00, August 1967.

  2. [2]

    S. Ginsburg andE. H. Spanier, BoundedAlgol-like languages,Trans. Amer. Math. Soc. 113 (1964), 333–368.

Download references

Author information

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Hopcroft, J.E. On the equivalence and containment problems for context-free languages. Math. Systems Theory 3, 119–124 (1969). https://doi.org/10.1007/BF01746517

Download citation


  • Computational Mathematic
  • Effective Procedure
  • Containment Problem