Context-Free Grammar (CFG) Example: Empty Set

Опубликовано: 29 Сентябрь 2024
на канале: Easy Theory
6,986
74

Here we give several context-free grammars for the empty set. It's not as easy as it sounds! The subtlety lies in the definition: any CFG must have a start variable. But some definitions leave out whether there must be a terminal, or whether there must be a variable. In any case, I show how to create a CFG for the empty set.

Emptiness for CFGs is decidable:    • Emptiness for CFGs is Decidable (what...  

What is a context-free grammar? It is a set of 4 items: a set of "variables," a set of "terminals," a "start variable," and a set of rules. Each rule must involve a single variable on its "left side", and any combination of variables and terminals on its right side. See    • Context-Free Grammars (CFG) and Conte...   for more details.

Easy Theory Website: https://www.easytheory.org
Discord:   / discord  

If you like this content, please consider subscribing to my channel:    / @easytheory  

▶SEND ME THEORY QUESTIONS◀
[email protected]

▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.