Context-Free Language

Definition. A language is context-free if it is L(G)L(G) for some context-free grammar GG, equivalently, by a theorem stated without proof in Lecture 5, if some pushdown automaton recognizes it.

Every regular language is context-free (by that same unproved theorem), and the containment is proper: {0n1n}\{0^n1^n\} is context-free but not regular. The containment is proper in the other direction too, since {anbncn}\{a^nb^nc^n\} is not context-free, which Lecture 5 states without proof.

Created · Updated
Copyright © 2026 Jared Coleman. All rights reserved.