SlideShare a Scribd company logo
1 of 13
18.404/6.840 Lecture 4
Last time:
- Finite automata → regular expressions
- Proving languages aren’t regular
- Context free grammars
Today: (Sipser §2.2)
- Context free grammars (CFGs) – definition
- Context free languages (CFLs)
- Pushdown automata (PDA)
- Converting CFGs to PDAs
1
Context Free Grammars (CFGs)
Recall that a CFG has terminals, variables, and rules.
Grammars generate strings
1. Write down start variable
2. Replace any variable according to a rule
Repeat until only terminals remain
3. Result is the generated string
4. 𝐿(𝐺) is the language of all generated strings
5. We call 𝐿(𝐺) a Context Free Language.
Example of 𝐺1 generating a string
S → 0S1
S → R
R → ε
𝐺1
S
0 S 1
0 S 1
R
ε
S
0S1
00S11
00R11
0011
𝐿 𝐺1 = 0𝑘
1𝑘
𝑘 ≥ 0}
Tree of
substitutions
“parse tree”
Resulting
string
∈ 𝐿 𝐺1
S → 0S1 | R
R → ε
Shorthand:
2
CFG – Formal Definition
Defn: A Context Free Grammar (CFG) 𝐺 is a 4-tuple (𝑉, Σ, 𝑅, 𝑆)
𝑉 finite set of variables
Σ finite set of terminal symbols
𝑅 finite set of rules (rule form: 𝑉 → 𝑉 ∪ Σ ∗
)
𝑆 start variable
For 𝑢, 𝑣 ∈ 𝑉 ∪ Σ ∗ write
1) 𝑢 ⇒ 𝑣 if can go from 𝑢 to 𝑣 with one substitution step in 𝐺
2) 𝑢 ⇒ 𝑣 if can go from 𝑢 to 𝑣 with some number of substitution steps in 𝐺
𝑢 ⇒ 𝑢1 ⇒ 𝑢2 ⇒ ⋯ ⇒ 𝑢𝑘 = 𝑣 is called a derivation of 𝑣 from 𝑢.
If 𝑢 = 𝑆 then it is a derivation of 𝑣.
𝐿 𝐺 = 𝑤 𝑤 ∈ Σ∗ and 𝑆 ⇒ 𝑤}
Defn: 𝐴 is a Context Free Language (CFL) if 𝐴 = 𝐿(𝐺) for some CFG 𝐺.
∗
∗
Check-in 4.1
Check-in 4.1
Which of these are valid CFGs?
a) 𝐶1 only
b) 𝐶2 only
c) Both 𝐶1 and 𝐶2
d) Neither
B → 0B1 | ε
B1 → 1B
0B → 0B
𝐶1: S → 0S | S1
R → RR
𝐶2:
3
CFG – Example
𝑉 = {E, T, F}
Σ = {+, ×, (, ), a}
𝑅 = the 6 rules above
𝑆 = E
Observe that the parse tree contains additional information,
such as the precedence of × over + .
If a string has two different parse trees then it is derived ambiguously
and we say that the grammar is ambiguous.
E → E+T | T
T → T×F | F
F → ( E ) | a
𝐺2 Parse
tree
∈ 𝐿 𝐺2
Generates a+a×a, (a+a)×a, a, a+a+a, etc.
E
E+T
T+T×F
F+F×a
a+a×a
E
E + T
T T × F
F F a
a a a
Resulting
string
Check-in 4.2
Check-in 4.2
How many reasonable distinct meanings
does the following English sentence have?
The boy saw the girl with the mirror.
(a) 1
(b) 2
(c) 3 or more
4
Both 𝐺2 and 𝐺3 recognize the same language, i.e., 𝐿 𝐺2 = 𝐿 𝐺3 .
However 𝐺2 is an unambiguous CFG and 𝐺3 is ambiguous.
Ambiguity
E → E+T | T
T → T×F | F
F → ( E ) | a
𝐺2
E → E+E | E×E | ( E ) | a
𝐺3
E
E E
E E
a + a × a
E E
E E
E
5
Pushdown Automata (PDA)
Example: PDA for 𝐷 = 0𝑘1𝑘 𝑘 ≥ 0
1) Read 0s from input, push onto stack until read 1.
2) Read 1s from input, while popping 0s from stack.
3) Enter accept state if stack is empty. (note: acceptance only at end of input)
c
d
d
(pushdown)
stack
Finite
control
a b a b a a
…
input appears on a “tape”
Schematic diagram for DFA or NFA
Schematic diagram for PDA
Operates like an NFA except can write-add or read-remove symbols
from the top of stack.
push pop
“head”
6
PDA – Formal Definition
Defn: A Pushdown Automaton (PDA) is a 6-tuple (𝑄, Σ, Γ, 𝛿, 𝑞0, 𝐹)
Σ input alphabet
Γ stack alphabet
𝛿: Q × Σ𝜀 × Γ𝜀 → 𝒫(𝑄 × Γ𝜀)
𝛿 𝑞, a, c = 𝑟1, d , 𝑟2, e
Example: PDA for 𝐵 = {𝑤𝑤ℛ| 𝑤 ∈ 0,1 ∗ }
1) Read and push input symbols.
Nondeterministically either repeat or go to (2).
2) Read input symbols and pop stack symbols, compare.
If ever ≠ then thread rejects.
3) Enter accept state if stack is empty. (do in “software”)
Accept if some thread is in the accept state
at the end of the input string.
The nondeterministic forks replicate the stack.
This language requires nondeterminism.
Our PDA model is nondeterministic.
0 1 1 1 1 0
Sample input:
7
Converting CFGs to PDAs
Theorem: If 𝐴 is a CFL then some PDA recognizes 𝐴
Proof: Convert 𝐴’s CFG to a PDA
IDEA: PDA begins with starting variable and guesses substitutions.
It keeps intermediate generated strings on stack. When done, compare with input.
Problem! Access below the top of stack is cheating!
Instead, only substitute variables when on the top of stack.
If a terminal is on the top of stack, pop it and compare with input. Reject if ≠.
…
PDA
E → E+T | T
T → …
F → … CFG
E
E
E + T
T T × F
F F a
a a a
E
E+T
T+T×F
F+F×a
a+a×a
E → E+T | T
T → T×F | F
F → ( E ) | a
𝐺2
E
+
T
T
+
T
T
+
T
×
F
a + a × a
Input:
8
Theorem: If 𝐴 is a CFL then some PDA recognizes 𝐴
Proof construction: Convert the CFG for 𝐴 to the following PDA.
1) Push the start symbol on the stack.
2) If the top of stack is
Variable: replace with right hand side of rule (nondet choice).
Terminal: pop it and match with next input symbol.
3) If the stack is empty, accept.
Example:
E
E + T
T T × F
F F a
a a a
E
E+T
T+T×F
F+F×a
a+a×a
E E
+
T
F
+
T
Converting CFGs to PDAs (contd)
T
+
T
a
+
T
+
T
T T
×
F
a + a × a
E → E+T | T
T → T×F | F
F → ( E ) | a
𝐺2
9
Theorem: 𝐴 is a CFL iff* some PDA recognizes 𝐴
Done.
In book. You are responsible for knowing
it is true, but not for knowing the proof.
* “iff” = “if an only if” means the implication goes both ways.
So we need to prove both directions: forward (→) and reverse (←).
Equivalence of CFGs and PDAs
Check-in 4.3
Check-in 4.3
Is every Regular Language also
a Context Free Language?
(a) Yes
(b) No
(c) Not sure
10
Recap
Recognizer Generator
Regular
language
DFA or NFA
Regular
expression
Context Free
language
PDA
Context Free
Grammar
Regular
languages
Context Free
languages
11
Quick review of today
1. Defined Context Free Grammars (CFGs)
and Context Free Languages (CFLs)
2. Defined Pushdown Automata(PDAs)
3. Gave conversion of CFGs to PDAs.
12
MIT OpenCourseWare
https://ocw.mit.edu
18.404J Theory of Computation
Fall 2020
For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.

More Related Content

Similar to a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx

ContextFreeGrammars.pptx
ContextFreeGrammars.pptxContextFreeGrammars.pptx
ContextFreeGrammars.pptx
PEzhumalai
 
Chapter Three(2)
Chapter Three(2)Chapter Three(2)
Chapter Three(2)
bolovv
 
Pushdown AutomataChapter 12Recognizing Context-F.docx
Pushdown AutomataChapter 12Recognizing Context-F.docxPushdown AutomataChapter 12Recognizing Context-F.docx
Pushdown AutomataChapter 12Recognizing Context-F.docx
woodruffeloisa
 
0015.register allocation-graph-coloring
0015.register allocation-graph-coloring0015.register allocation-graph-coloring
0015.register allocation-graph-coloring
sean chen
 
2. context free langauages
2. context free langauages2. context free langauages
2. context free langauages
danhumble
 

Similar to a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx (20)

ContextFreeGrammars.pptx
ContextFreeGrammars.pptxContextFreeGrammars.pptx
ContextFreeGrammars.pptx
 
ContextFreeGrammars (1).pptx
ContextFreeGrammars (1).pptxContextFreeGrammars (1).pptx
ContextFreeGrammars (1).pptx
 
Chapter Three(2)
Chapter Three(2)Chapter Three(2)
Chapter Three(2)
 
Finals-review.pptx
Finals-review.pptxFinals-review.pptx
Finals-review.pptx
 
FPGA - Programmable Logic Design
FPGA - Programmable Logic DesignFPGA - Programmable Logic Design
FPGA - Programmable Logic Design
 
Lecture4 lexical analysis2
Lecture4 lexical analysis2Lecture4 lexical analysis2
Lecture4 lexical analysis2
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdf
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
Pushdown AutomataChapter 12Recognizing Context-F.docx
Pushdown AutomataChapter 12Recognizing Context-F.docxPushdown AutomataChapter 12Recognizing Context-F.docx
Pushdown AutomataChapter 12Recognizing Context-F.docx
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
 
0015.register allocation-graph-coloring
0015.register allocation-graph-coloring0015.register allocation-graph-coloring
0015.register allocation-graph-coloring
 
Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3Formal Languages and Automata Theory unit 3
Formal Languages and Automata Theory unit 3
 
Lecture 05 syntax analysis 2
Lecture 05 syntax analysis 2Lecture 05 syntax analysis 2
Lecture 05 syntax analysis 2
 
Lex analysis
Lex analysisLex analysis
Lex analysis
 
TOC question bank.pdf
TOC question bank.pdfTOC question bank.pdf
TOC question bank.pdf
 
inbound6417574391896884649.pptx
inbound6417574391896884649.pptxinbound6417574391896884649.pptx
inbound6417574391896884649.pptx
 
Unit iv
Unit ivUnit iv
Unit iv
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
 
2. context free langauages
2. context free langauages2. context free langauages
2. context free langauages
 

Recently uploaded

Performance enhancement of machine learning algorithm for breast cancer diagn...
Performance enhancement of machine learning algorithm for breast cancer diagn...Performance enhancement of machine learning algorithm for breast cancer diagn...
Performance enhancement of machine learning algorithm for breast cancer diagn...
IJECEIAES
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
benjamincojr
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
IJECEIAES
 

Recently uploaded (20)

NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Performance enhancement of machine learning algorithm for breast cancer diagn...
Performance enhancement of machine learning algorithm for breast cancer diagn...Performance enhancement of machine learning algorithm for breast cancer diagn...
Performance enhancement of machine learning algorithm for breast cancer diagn...
 
Low Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s HandbookLow Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s Handbook
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 

a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx

  • 1. 18.404/6.840 Lecture 4 Last time: - Finite automata → regular expressions - Proving languages aren’t regular - Context free grammars Today: (Sipser §2.2) - Context free grammars (CFGs) – definition - Context free languages (CFLs) - Pushdown automata (PDA) - Converting CFGs to PDAs 1
  • 2. Context Free Grammars (CFGs) Recall that a CFG has terminals, variables, and rules. Grammars generate strings 1. Write down start variable 2. Replace any variable according to a rule Repeat until only terminals remain 3. Result is the generated string 4. 𝐿(𝐺) is the language of all generated strings 5. We call 𝐿(𝐺) a Context Free Language. Example of 𝐺1 generating a string S → 0S1 S → R R → ε 𝐺1 S 0 S 1 0 S 1 R ε S 0S1 00S11 00R11 0011 𝐿 𝐺1 = 0𝑘 1𝑘 𝑘 ≥ 0} Tree of substitutions “parse tree” Resulting string ∈ 𝐿 𝐺1 S → 0S1 | R R → ε Shorthand: 2
  • 3. CFG – Formal Definition Defn: A Context Free Grammar (CFG) 𝐺 is a 4-tuple (𝑉, Σ, 𝑅, 𝑆) 𝑉 finite set of variables Σ finite set of terminal symbols 𝑅 finite set of rules (rule form: 𝑉 → 𝑉 ∪ Σ ∗ ) 𝑆 start variable For 𝑢, 𝑣 ∈ 𝑉 ∪ Σ ∗ write 1) 𝑢 ⇒ 𝑣 if can go from 𝑢 to 𝑣 with one substitution step in 𝐺 2) 𝑢 ⇒ 𝑣 if can go from 𝑢 to 𝑣 with some number of substitution steps in 𝐺 𝑢 ⇒ 𝑢1 ⇒ 𝑢2 ⇒ ⋯ ⇒ 𝑢𝑘 = 𝑣 is called a derivation of 𝑣 from 𝑢. If 𝑢 = 𝑆 then it is a derivation of 𝑣. 𝐿 𝐺 = 𝑤 𝑤 ∈ Σ∗ and 𝑆 ⇒ 𝑤} Defn: 𝐴 is a Context Free Language (CFL) if 𝐴 = 𝐿(𝐺) for some CFG 𝐺. ∗ ∗ Check-in 4.1 Check-in 4.1 Which of these are valid CFGs? a) 𝐶1 only b) 𝐶2 only c) Both 𝐶1 and 𝐶2 d) Neither B → 0B1 | ε B1 → 1B 0B → 0B 𝐶1: S → 0S | S1 R → RR 𝐶2: 3
  • 4. CFG – Example 𝑉 = {E, T, F} Σ = {+, ×, (, ), a} 𝑅 = the 6 rules above 𝑆 = E Observe that the parse tree contains additional information, such as the precedence of × over + . If a string has two different parse trees then it is derived ambiguously and we say that the grammar is ambiguous. E → E+T | T T → T×F | F F → ( E ) | a 𝐺2 Parse tree ∈ 𝐿 𝐺2 Generates a+a×a, (a+a)×a, a, a+a+a, etc. E E+T T+T×F F+F×a a+a×a E E + T T T × F F F a a a a Resulting string Check-in 4.2 Check-in 4.2 How many reasonable distinct meanings does the following English sentence have? The boy saw the girl with the mirror. (a) 1 (b) 2 (c) 3 or more 4
  • 5. Both 𝐺2 and 𝐺3 recognize the same language, i.e., 𝐿 𝐺2 = 𝐿 𝐺3 . However 𝐺2 is an unambiguous CFG and 𝐺3 is ambiguous. Ambiguity E → E+T | T T → T×F | F F → ( E ) | a 𝐺2 E → E+E | E×E | ( E ) | a 𝐺3 E E E E E a + a × a E E E E E 5
  • 6. Pushdown Automata (PDA) Example: PDA for 𝐷 = 0𝑘1𝑘 𝑘 ≥ 0 1) Read 0s from input, push onto stack until read 1. 2) Read 1s from input, while popping 0s from stack. 3) Enter accept state if stack is empty. (note: acceptance only at end of input) c d d (pushdown) stack Finite control a b a b a a … input appears on a “tape” Schematic diagram for DFA or NFA Schematic diagram for PDA Operates like an NFA except can write-add or read-remove symbols from the top of stack. push pop “head” 6
  • 7. PDA – Formal Definition Defn: A Pushdown Automaton (PDA) is a 6-tuple (𝑄, Σ, Γ, 𝛿, 𝑞0, 𝐹) Σ input alphabet Γ stack alphabet 𝛿: Q × Σ𝜀 × Γ𝜀 → 𝒫(𝑄 × Γ𝜀) 𝛿 𝑞, a, c = 𝑟1, d , 𝑟2, e Example: PDA for 𝐵 = {𝑤𝑤ℛ| 𝑤 ∈ 0,1 ∗ } 1) Read and push input symbols. Nondeterministically either repeat or go to (2). 2) Read input symbols and pop stack symbols, compare. If ever ≠ then thread rejects. 3) Enter accept state if stack is empty. (do in “software”) Accept if some thread is in the accept state at the end of the input string. The nondeterministic forks replicate the stack. This language requires nondeterminism. Our PDA model is nondeterministic. 0 1 1 1 1 0 Sample input: 7
  • 8. Converting CFGs to PDAs Theorem: If 𝐴 is a CFL then some PDA recognizes 𝐴 Proof: Convert 𝐴’s CFG to a PDA IDEA: PDA begins with starting variable and guesses substitutions. It keeps intermediate generated strings on stack. When done, compare with input. Problem! Access below the top of stack is cheating! Instead, only substitute variables when on the top of stack. If a terminal is on the top of stack, pop it and compare with input. Reject if ≠. … PDA E → E+T | T T → … F → … CFG E E E + T T T × F F F a a a a E E+T T+T×F F+F×a a+a×a E → E+T | T T → T×F | F F → ( E ) | a 𝐺2 E + T T + T T + T × F a + a × a Input: 8
  • 9. Theorem: If 𝐴 is a CFL then some PDA recognizes 𝐴 Proof construction: Convert the CFG for 𝐴 to the following PDA. 1) Push the start symbol on the stack. 2) If the top of stack is Variable: replace with right hand side of rule (nondet choice). Terminal: pop it and match with next input symbol. 3) If the stack is empty, accept. Example: E E + T T T × F F F a a a a E E+T T+T×F F+F×a a+a×a E E + T F + T Converting CFGs to PDAs (contd) T + T a + T + T T T × F a + a × a E → E+T | T T → T×F | F F → ( E ) | a 𝐺2 9
  • 10. Theorem: 𝐴 is a CFL iff* some PDA recognizes 𝐴 Done. In book. You are responsible for knowing it is true, but not for knowing the proof. * “iff” = “if an only if” means the implication goes both ways. So we need to prove both directions: forward (→) and reverse (←). Equivalence of CFGs and PDAs Check-in 4.3 Check-in 4.3 Is every Regular Language also a Context Free Language? (a) Yes (b) No (c) Not sure 10
  • 11. Recap Recognizer Generator Regular language DFA or NFA Regular expression Context Free language PDA Context Free Grammar Regular languages Context Free languages 11
  • 12. Quick review of today 1. Defined Context Free Grammars (CFGs) and Context Free Languages (CFLs) 2. Defined Pushdown Automata(PDAs) 3. Gave conversion of CFGs to PDAs. 12
  • 13. MIT OpenCourseWare https://ocw.mit.edu 18.404J Theory of Computation Fall 2020 For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.

Editor's Notes

  1. Type equation here.
  2. Type equation here.
  3. Type equation here.
  4. Type equation here.
  5. Type equation here.
  6. Type equation here.
  7. Type equation here.
  8. Type equation here.
  9. Type equation here.
  10. Type equation here.
  11. Type equation here.