What is a Context-Free Grammar?
Here we start context-free grammars (CFG) and context-free languages (CFL), which are the languages of CFGs. The idea is to have every rule's right-hand side allowed to have any combination of variables and terminals. We show that every regular grammar is already a context-free grammar, and not necessarily the other way around because we give an example of a CFG for {0^n 1^n : n at least 0}, which is not regular. We then make a CFG for the language of palindromes over {0,1}. 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. Easy Theory Website: https://www.easytheory.org GoFundMe: https://www.gofundme.com/f/easy-theory-video-studio Patreon: https://www.patreon.com/EasyTheoryYT Fourthwall: https://easy-theory-llc-shop.fourthwall.com Problem Solving channel: @easytheoryprobsolve Timestamps: 0:00 - Intro 0:35 - Grammars (generally) 2:35 - Example grammar that has nonregular language 7:45 - Context-Free Grammar (CFG) definition 11:15 - Example CFG for Palindromes If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
Suggested videos

Context-Free Grammars (CFGs): 15 Examples
Easy Theory · 44:11

Context Free Grammar & Context Free Language
Neso Academy · 7:52

Regex to NFA Conversion Isn't Hard! (Sipser 1.28a)
Easy Theory · 9:15

Context-Free Grammars (CFGs): 5 Easy Examples
Easy Theory · 19:03

Easy Theory Doesn't Support Academic Integrity Violations...Again
Easy Theory · 0:38

Context Free Languages - Programming Languages
Udacity · 2:21

Fourteen DFA Examples? No Problem!
Easy Theory · 38:44

7.1: Intro to Session 7: Context-Free Grammar - Programming with Text
The Coding Train · 14:30

Pumping Lemma for Regular Languages Example: 0ⁿ1ⁿ
Easy Theory · 11:48

What are Grammars (in Theory of Computation)?
Easy Theory · 12:49

[Mathematical Linguistics] Context Free Grammars
TrevTutor · 9:11

What is a Pushdown Automaton (PDA)?
Easy Theory · 12:11