08 TOC
08 TOC
• If the language does not contain ε, then all the ε production can be
eliminated.
• But if ε is present in the language, then other ε production can be
eliminated except for S→ε
𝑆 → 𝑎𝑆𝑏|𝑎𝐴𝑏
𝐴→ε
1. Find all the null production and then all the nullable variable (even after
some number of derivations) 𝐴 → ε
2. Go to the RHS of every production then write the production with and
without the nullable variable
𝑆 → 𝑎𝑆𝑏|𝑎𝐴𝑏|ab
𝐴→ε
3. Finally remove the variable whose production is missing
𝑆 → 𝑎𝑆𝑏|𝑎𝐴𝑏|ab
𝑆 → 𝑎𝑆𝑏|ab
𝑆 → 𝐴𝐵 nullable variable ={A,B,S}
𝐴 → 𝑎𝐴𝐴|ε
𝐵 → 𝑏𝐵𝐵|ε
𝑆 → 𝐴𝐵|𝐵|𝐴|ε
𝐴 → 𝑎𝐴𝐴|𝑎𝐴|𝑎
𝐵 → 𝑏𝐵𝐵|𝑏𝐵|𝑏
𝑆 → 𝐴𝑏𝑎𝐶
𝐴 → 𝐵𝐶 nullable variable ={C,B,A}
𝐵 → 𝑏|ε
𝐶 → 𝐷|ε
𝐷→𝑑
𝑆 → 𝐴𝑏𝑎𝐶|𝑏𝑎𝐶|𝐴𝑏𝑎|𝑏𝑎
𝐴 → 𝐵𝐶|𝐵|𝐶
𝐵→𝑏
𝐶→𝐷
𝐷→𝑑
𝑆→𝐴
𝐴→𝐵
𝐵→𝐶
𝐵→𝑑
Elimination of unit production
𝑆 → 𝐴𝑎|𝐵
𝐵 → 𝐴|𝑏𝑏
𝐴 → 𝑎|𝑏𝑐|𝐵
• Write all the grammars without the unit production
𝑆 → 𝐴𝑎
𝐵 → 𝑏𝑏
𝐴 → 𝑎|𝑏𝑐
• Substitute all the possible derivation from the unit production variables
𝑆 → 𝐴𝑎 𝑏𝑏 𝑎|𝑏𝑐
𝐵 → 𝑏𝑏|𝑎|𝑏𝑐
𝐴 → 𝑎|𝑏𝑐|𝑏𝑏
𝑆 → 𝐴𝐵
𝐴→𝑎
𝐵 → 𝐶|𝑏
𝐶→𝐷
𝐷→𝐸
𝐸→𝑎
𝑆 → 𝐴𝐵
𝐴→𝑎
𝐵 → 𝑏|a
𝐶→𝑎
𝐷→𝑎 Unreachable (useless production or symbols)
𝐸→𝑎
Elimination of Useless symbols
Useful symbols
• If a variable is able to derive a terminal or string of terminals only, then it
might be useful.
• Every variable must be reachable from the start symbol.
• Every derived unit terminals
𝑆 → 𝐴𝐵|𝑎
𝐴 → 𝐵𝐶|𝑏
𝐵 → 𝑎𝐵|𝐶
𝐶 → 𝑎𝐶|𝐵
Identify the set of useful symbols {𝑎, 𝑏, 𝑆, 𝐴}
Delete all the useless symbols and its production in the LHS and useless symbols (the whole term) in the RHS
𝑆 → 𝐴𝐵|𝑎
𝐴 → 𝐵𝐶|𝑏
𝐵 → 𝑎𝐵|𝐶
𝐶 → 𝑎𝐶|𝐵
𝑆→𝑎
𝐴→𝑏
𝑆 → 𝐴𝐵|𝐴𝐶
𝐴 → 𝑎𝐴𝑏 𝑏𝐴𝑎 𝑎
𝐵 → 𝑏𝑏𝐴|𝑎𝑎𝐵|𝐴𝐵 set of useful symbols {𝑎, 𝑏, 𝐴, 𝐵, 𝑆}
𝐶 → 𝑎𝑏𝐶𝐴|𝑎𝐷𝑏
𝐷 → 𝑏𝐷𝑎𝐶
𝑆 → 𝐴𝐵|𝐴𝐶
𝐴 → 𝑎𝐴𝑏 𝑏𝐴𝑎 𝑎
𝐵 → 𝑏𝑏𝐴|𝑎𝑎𝐵|𝐴𝐵
𝐶 → 𝑎𝑏𝐶𝐴|𝑎𝐷𝑏
𝐷 → 𝑏𝐷𝑎𝐶
𝑆 → 𝐴𝐵
𝐴 → 𝑎𝐴𝑏 𝑏𝐴𝑎 𝑎
𝐵 → 𝑏𝑏𝐴|𝑎𝑎𝐵|𝐴𝐵
𝑆 → 𝐴𝐵𝐶|𝐵𝑎𝐵
𝐴 → 𝑎𝐴 𝐵𝑎𝐶 𝑎𝑎𝑎 set of useful symbols {𝑎, 𝑏, 𝐴, 𝐵, 𝑆}
𝐵 → 𝑏𝐵𝑏|𝑎
𝐶 → 𝐶𝐴|𝐴𝐶
𝑆 → 𝐵𝑎𝐵
𝐴 → 𝑎𝐴|𝑎𝑎𝑎
𝐵 → 𝑏𝐵𝑏|𝑎
𝑆 → 𝐵𝑎𝐵
𝐵 → 𝑏𝐵𝑏|𝑎
Self Learning Questions
• Explain using suitable example, the different types of Grammars according to
Noam Chomsky.
• How are the different types of Grammars differ from each other?
• What is the difference between Regular Language and Context Free
Language?
• What do you mean by derivation Tree in the context of TOC? Give example.
• What do you mean by Ambiguous Grammar in the context of TOC? Give
example.
• what is Chomsky normal form in the context of TOC? Give example.
• Define Parsing and Parse Trees using suitable example in the context of TOC?
Hierarchy of languages
Regular Languages Finite State Machines, Regular Expression
Context Free Languages Context Free Grammar, Push-down Automata
Recursive Languages
Context-Free Languages
Regular Languages
14
Pushdown Automata (PDA)
• Informally:
• A PDA is an NFA-ε with a stack.
• Transitions are modified to accommodate stack operations.
• Questions:
• What is a stack?
• How does a stack help?
• A DFA can “remember” only a finite amount of information, whereas a PDA can
“remember” an infinite amount of (certain types of) information, in one memory-stack
15
• Example:
• For k=3:
L = {ε, 01, 0011, 000111}
0 0 0
q0 q1 q2 q3
1 1 1 1
0/1 1 1
0/1 q7 q6 q5 q4
0
0
0
16
• In a DFA, each state remembers a finite amount of information.
• To get {0n1n | 0n} with a DFA would require an infinite number of states using
the preceding technique.
17
Formal Definition of a PDA
tape
Q x (Σ U {ε}) x Г –> finite subsets of Q x Г*
a ε
• Q on the LHS means that at each step in a computation, a PDA must consider its’
current state.
tape head
• Г on the LHS means that at each step in a computation, a PDA must consider the
stack head symbol on top of its’ stack.
• Σ U {ε} on the LHS means that at each step in a computation, a PDA may or may not
consider the current input symbol, i.e., it may have epsilon transitions.
finite
stack • “Finite subsets” on the RHS means that at each step in a computation, a PDA may
control
have several options.
• Q on the RHS means that each option specifies a new state.
• Г* on the RHS means that each option specifies zero or more stack symbols that
will replace the top stack symbol, but in a specific sequence.
19
Example of PDA
Top of the Stack
Push a
a,𝑍0 |𝑎𝑍0 𝑎
𝑞1
𝑍0 𝑍0
𝑏, 𝑎|ε Input symbol
Pop a
𝑞2
𝑎,𝑍0 |𝑎𝑍0 : when 𝑎 is the input and 𝑍0 is on top of the stack, push 𝑎 into the stack
𝑏, ε|ε
𝑏, 𝑎|ε: when 𝑏 is the input, 𝑎 is on top of the stack and right hsnd side of the rule is ε
No operation pop 𝑎 from the stack
• Two types of PDA transitions:
• Current state is q
• Current input symbol is a
• Symbol currently on top of the stack z
• Move to state pi from q
• Replace z with γi on the stack (leftmost symbol on top)
• Move the input head to the next input symbol
a/z/ γ1 p1
q a/z/ γ2 p2
a/z/ γm
:
pm
21
• Two types of PDA transitions:
• Current state is q
• Current input symbol is not considered
• Symbol currently on top of the stack z
• Move to state pi from q
• Replace z with γi on the stack (leftmost symbol on top)
• No input symbol is read
ε/z/ γ1 p1
q ε/z/ γ2 p2
ε/z/ γm
:
pm
22
𝛿: 𝑄 × Σ × Г → 𝑄 × Г∗ (Transition function for Deterministic PDA)
δ 𝑞, 𝑎, 𝑎 = 𝑞, ε Operation = POP
𝑎𝑖
δ 𝑞, 𝑎, 𝑎 = 𝑞, 𝑎𝑎 Operation = PUSH
𝑎𝑖
δ 𝑞, 𝑎, 𝑎 = 𝑞, 𝑎 Operation = No operation
an b n
a a a b b b ε
a
a
a
𝑍0
𝑎, 𝑎|𝑎𝑎 𝑞2
PUSH POP No operation
δ 𝑞𝑜 , 𝑎, 𝑍0 = 𝑞, 𝑍0
PUSH POP No operation
δ 𝑞𝑜 , 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
PUSH POP No operation
δ 𝑞, 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
δ 𝑞, ε, ε = 𝑞, ε
PUSH POP No operation
δ 𝑞, 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
δ 𝑞, ε, ε = 𝑞, ε No operation
PUSH POP No operation
δ 𝑞, 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
δ 𝑞, ε, ε = 𝑞, ε No operation
δ 𝑞, 𝑎, 𝑥 = 𝑞, 𝑦𝑥
PUSH POP No operation
δ 𝑞, 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
δ 𝑞, ε, ε = 𝑞, ε No operation
δ 𝑞, 𝑎, 𝑥 = 𝑞, 𝑦𝑥 Push 𝑦
Whenthe state is q and a comes as an input and x is on top of the stack, then push y into the stack
. . . a . . .
y
x x
. .
PUSH POP No operation
δ 𝑞, 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
δ 𝑞, ε, ε = 𝑞, ε No operation
δ 𝑞, 𝑎, 𝑥 = 𝑞, 𝑦𝑥 Push 𝑦
δ 𝑞, 𝑎, 𝑏 = 𝑞, ε
PUSH POP No operation
δ 𝑞, 𝑎, 𝑍0 = 𝑞, 𝑍0 No operation
δ 𝑞, ε, ε = 𝑞, ε No operation
δ 𝑞, 𝑎, 𝑥 = 𝑞, 𝑦𝑥 Push 𝑦
δ 𝑞, 𝑎, 𝑏 = 𝑞, ε Pop b
𝐹𝐴 < 𝐷𝑃𝐷𝐴 < 𝑁𝐷𝑃𝐷𝐴 𝑜𝑟 𝑃𝐷𝐴
Accepts RL
Accepts DCFL Accepts CFL
PDA
• It can accept using Final state mechanism (After reading whole input, If PDA halts at final
then it accepts given input)
• It can accept using Empty Stack mechanism(After reading whole input, If we can make
stack as empty then given input is accepted)
𝐿1 = 𝑠𝑒𝑡 𝑜𝑓 𝑎𝑙𝑙 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑎𝑐𝑐𝑒𝑝𝑡𝑒𝑑 𝑏𝑦 𝑃𝐷𝐴 𝑢𝑠𝑖𝑛𝑔 𝐹𝑖𝑛𝑎𝑙 𝑠𝑡𝑎𝑡𝑒 𝑎𝑐𝑐𝑒𝑝𝑡𝑎𝑛𝑐𝑒.
1. 𝐿1 ⊂ 𝐿2
2. 𝐿1 ⊃ 𝐿2
3. 𝐿1 = 𝐿2
𝐿1 = 𝑠𝑒𝑡 𝑜𝑓 𝑎𝑙𝑙 𝑙𝑎𝑛𝑔𝑢𝑎𝑔𝑒 𝑎𝑐𝑐𝑒𝑝𝑡𝑒𝑑 𝑏𝑦 𝑃𝐷𝐴 𝑢𝑠𝑖𝑛𝑔 𝐹𝑖𝑛𝑎𝑙 𝑠𝑡𝑎𝑡𝑒 𝑎𝑐𝑐𝑒𝑝𝑡𝑎𝑛𝑐𝑒.
1. 𝐿1 ⊂ 𝐿2
2. 𝐿1 ⊃ 𝐿2
3. 𝐿1 = 𝐿2
𝑎, 𝑍0 |𝑎𝑍0 𝑏, 𝑎|ε
a 𝑏, 𝑎|ε
𝑞0 𝑞1
a ε, 𝑍0 |𝑍0
a 𝑎, 𝑎|𝑎𝑎
ε, 𝑍0 |𝑍0 𝑞2
a
𝑍0
Accepted
an b n
using empty Stack Mechanism
a 𝑏, 𝑎|ε
𝑞0 𝑞1
a ε, 𝑍0 |ε
a
ε, 𝑍0 |ε 𝑞2
a
𝑍0
Accepted
an b n
Using state transition method
If the state is 𝑞𝑜 and 𝑎 is the input and 𝑍0 is on the top of the stack,
δ 𝑞𝑜 , 𝑎, 𝑍0 = 𝑞𝑜 , 𝑎𝑍0 the transition state will be the same 𝑞𝑜 and 𝑎 is pushed on top of 𝑍0
δ 𝑞𝑜 , 𝑎, 𝑎 = 𝑞𝑜 , 𝑎𝑎
δ 𝑞𝑜 , 𝑏, 𝑎 = 𝑞1 , ε If the state is 𝑞𝑜 and if we see 𝑏 as the input and 𝑎 is on the top of the stack,
δ 𝑞1 , 𝑏, 𝑎 = 𝑞1 , ε the transition state will be changed to 𝑞1 and 𝑎 is pop from the top of the stack.
δ 𝑞1 , ε, 𝑍0 = 𝑞2 , 𝑍0 or 𝑞1 , ε
𝑎, 𝑍0 |𝑎𝑍0 𝑏, 𝑎|ε
𝑏, 𝑎|ε
𝑞0 𝑞1
ε, 𝑍0 |𝑍0
𝑎, 𝑎|𝑎𝑎 𝑞2
𝑤#𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
a b a a b b # b b a a b a ε
𝑤#𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
a b a a b b # b b a a b a ε
𝑎, 𝑍0 |𝑎𝑍0
𝑏, 𝑍0 |𝑏𝑍0
𝑎, 𝑎|𝑎𝑎
𝑎, 𝑏|𝑎𝑏
𝑏, 𝑎|𝑏𝑎
𝑏, 𝑏|𝑏𝑏
𝑞0
𝑤#𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
a b a a b b # b b a a b a ε
𝑎, 𝑍0 |𝑎𝑍0
𝑏, 𝑍0 |𝑏𝑍0
𝑎, 𝑎|𝑎𝑎
𝑎, 𝑏|𝑎𝑏
𝑏, 𝑎|𝑏𝑎
𝑏, 𝑏|𝑏𝑏 #, 𝑍0 |𝑍0
#, 𝑎|𝑎
#, 𝑏|𝑏
𝑞0
𝑤#𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
a b a a b b # b b a a b a ε
𝑎, 𝑍0 |𝑎𝑍0
𝑏, 𝑍0 |𝑏𝑍0
𝑎, 𝑎|𝑎𝑎
𝑎, 𝑏|𝑎𝑏
𝑏, 𝑎|𝑏𝑎 𝑏, 𝑏|ε
𝑏, 𝑏|𝑏𝑏 #, 𝑍0 |𝑍0 𝑎, 𝑎|ε
#, 𝑎|𝑎
#, 𝑏|𝑏
𝑞0 𝑞1 𝑞2
ε, 𝑍0 |𝑍0
{𝑎𝑖 #𝑎 𝑗 |𝑖 > 𝑗} a a a a a # a a ε
a
a
a
a
𝑍0
{𝑎𝑖 #𝑎 𝑗 |𝑖 > 𝑗} a a a a a # a a ε
a
a
a
a
𝑍0
𝑎, 𝑍0 |𝑎𝑍0 ε, 𝑎|ε
𝑎, 𝑍0 |𝑎𝑍0 𝑎, 𝑎|ε
𝑎, 𝑎|ε 𝑎, 𝑎|𝑎𝑎 ε , 𝑍0 | ε
𝑎, 𝑎|𝑎𝑎
#, 𝑎|𝑎 𝑞2
#, 𝑎|𝑎 𝑞2 𝑞0 𝑞1
𝑞0 𝑞1 ε, 𝑎|ε
ε, 𝑎|𝑎
𝑏, 𝑎|ε 𝑐, 𝑍0 |𝑍0
𝑎, 𝑎|𝑎𝑎 𝑐, 𝑍0 |𝑍0
𝑎, 𝑍0 |𝑎𝑍0 𝑏, 𝑎|ε ε, 𝑍0 |𝑍0
𝑞0 𝑞2
𝑏, 𝑏|𝑏𝑏 𝑐, 𝑏|ε
𝑏, 𝑎|𝑏𝑎 ε, 𝑎|𝑎
𝑐, 𝑏|ε
𝑎, ε|𝑎 ∶
Push 𝑎 without looking at the Stack valid
only at NDPDA or PDA.
Identify the Languages
an b n
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
an b n
1. Regular
𝑎, ε|𝑎 𝑏, 𝑎|ε
2. DCFL
ε, ε|ε
3. CFL 𝑞0 𝑞1 𝑞2
ε, 𝑍0 |𝑍0
4. Not CFL
Identify the Languages
an b n 𝑐 ∗
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
an b n 𝑐 ∗
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
an b ∗ 𝑐 𝑛
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
an b ∗ 𝑐 𝑛
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
a∗ b n 𝑐 𝑛
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
a∗ b n 𝑐 𝑛
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑚 𝑏 𝑛 𝑐 𝑘 |𝑚 = 𝑛 𝑂𝑟 𝑚 = 𝑘}
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑚 𝑏 𝑛 𝑐 𝑘 |𝑚 = 𝑛 𝑂𝑟 𝑚 = 𝑘}
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑚 𝑏 𝑛 |𝑚 = 2𝑛 𝑂𝑟 𝑛 = 2𝑚}
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑚 𝑏 𝑛 |𝑚 = 2𝑛 𝑂𝑟 𝑛 = 2𝑚}
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
𝑤#𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
𝑤#𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages (Assignment)
𝑤𝑤 𝑅 |𝑤ϵ 𝑎, 𝑏 ∗
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{an bm |𝑚 = 𝑛 𝑂𝑅 𝑚 ≠ 𝑛}
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{an bm |𝑚 = 𝑛 𝑂𝑅 𝑚 ≠ 𝑛}
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{aPrime }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{aPrime }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{an! }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{an! }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
2𝑛
{a }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
2𝑛
{a }
1. Regular
2. DCFL
3. CFL
4. Not CFL
NOTE: IF L is over one symbol then “L is Regular iff L is CFL”
Identify the Languages
{𝑎𝑛 𝑏 𝑛 𝑐 𝑛 }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑛 𝑏 𝑛 𝑐 𝑛 }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
𝑛 𝑛 2 𝑛 3
{𝑎 𝑏 𝑐 }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
𝑛 𝑛 2 𝑛 3
{𝑎 𝑏 𝑐 }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑛 𝑏 2𝑛 𝑐 3𝑛 }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑛 𝑏 2𝑛 𝑐 3𝑛 }
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages (Assignment)
{𝑎𝑛 𝑏 𝑛! }
1. Regular
2. DCFL
3. CFL
4. Not CFL
DPDA PDA(NPDA)
Some PDAs are non DPDA Every DPDA is PDA
It is less powerful than NPDA. It is more powerful than DPDA.
It is possible to convert every DPDA to a It is not possible to convert every NPDA to a
corresponding NPDA. corresponding DPDA.
The language accepted by DPDA is a subset of the The language accepted by NPDA is not a subset of
language accepted by NDPA. the language accepted by DPDA.
The language accepted by DPDA is called The language accepted by NPDA is called
DCFL(Deterministic Context-free Language) which is NCFL(Non-deterministic Context-free Language).
a subset of NCFL(Non-deterministic Context-free
Language) accepted by NPDA.
There is only one state transition from one state to There may or may not be more than one state
another state for an input symbol. transition from one state to another state for
same input symbol.
Closure Properties
{𝑎𝑛 𝑏 𝑛 |𝑛 ≥ 0} is_____________
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
{𝑎𝑛 𝑏 𝑛 |𝑛 ≥ 0} is_____________
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
𝑎𝑛 #𝑎2𝑛 |𝑛 ≥ 0 𝑖𝑠______________
1. Regular
2. DCFL
3. CFL
4. Not CFL
Identify the Languages
𝑎𝑛 #𝑎2𝑛 |𝑛 ≥ 0 𝑖𝑠______________
1. Regular
2. DCFL
3. CFL
4. Not CFL
Self Learning Questions
• What do you mean by Greibach normal form (GNF) in the context of TOC?
Give example.
• Using appropriate example, explain the steps to covert CFG to GNF in the
context of TOC? Give example.
• Using appropriate example, explain the steps to covert Context Free
Grammar to Chomsky Normal Form in the context of TOC? Give example.
• what is Context-sensitive Grammar (CSG) and Language (CSL) in the context
of TOC? Give example.
• Using appropriate example, explain the Closure Properties for Context-
sensitive Language.