Lecture
Lecture
Hierarchy
Lecture 1 - Module I: Languages and Automata
06 January 2025
Objectives of the Lecture
Example Grammar:
▶ Terminals (T): {a, b}
▶ Non-terminals (V): {S}
▶ Start Symbol: S
▶ Productions:
▶ S → aSb
▶ S → ϵ (epsilon)
Language Generated: {”ab”, ”aabb”, ”aaabbb”, ...}
Introduction to Chomsky Hierarchy
▶ Type 0 (Unrestricted):
▶ Most powerful.
▶ No restrictions on production rules.
▶ Type 1 (Context-Sensitive):
▶ Useful for natural languages.
▶ Rules depend on the context of non-terminals.
▶ Type 2 (Context-Free):
▶ Widely used in programming languages.
▶ Parsable with efficient algorithms.
▶ Type 3 (Regular):
▶ Simplest and most restrictive.
▶ Can be represented by finite automata.
Why Study Formal Grammars?