Algorithms & Models of Computation
CS/ECE 374, Fall 2017
Context Free Languages and Grammars
Lecture 7
Tuesday, September 19, 2017
Sariel Har-Peled (UIUC) CS374 1 Fall 2017 1 / 36
What stack got to do with it?
What’s a stack but a second hand memory?
1
DFA/NFA/Regular expressions. ≡ constant memory computation.
2
NFA + stack ≡ context free grammars (CFG).
3
Turing machines DFA/NFA + unbounded memory. ≡ a standard computer/program. ≡ NFA with two stacks.
Sariel Har-Peled (UIUC) CS374 2 Fall 2017 2 / 36
Context Free Languages and Grammars
Programming Language Specification Parsing Natural language understanding Generative model giving structure . . .
Sariel Har-Peled (UIUC) CS374 3 Fall 2017 3 / 36
Programming Languages
Sariel Har-Peled (UIUC) CS374 4 Fall 2017 4 / 36