# Simplifying Grammars

Learn how to simplify context-free grammar.

## Reducing the number of variables in a grammar

Under certain circumstances, the number of variables in a CFG can be reduced. Consider the variable $B$ in the grammar below:

Get hands-on with 1200+ tech skills courses.