If a CFG has only productions of the form nonterminal → string of two nonterminals or nonterminal → one terminal then the CFG is said to be in ________
AChomsky Normal Form
BAmbiguous Form
CLeft Aligned Form
DRight Aligned Form
These two production forms are exactly the definition of Chomsky Normal Form.
2.
★ Final term Fall 2012
________ and ________ are removed in order to make a CFG in Chomsky Normal Form(CNF).
ANull, nullable productions
BNullable , unit productions
CNull, unit productions
DString of length 0, null
Converting to CNF first removes null productions and unit productions.
3.
★ Final term past paper
Identify the TRUE statement about following CFG: S -> SB|AB A -> CC B -> b C -> a
AThe given CFG has 8 Nonterminals
BThe given CFG has 8 Terminals
CThe given CFG is in CNF
DThe given CFG is not in CNF
Every production is either two nonterminals or one terminal, so it is in CNF.
4.
★ Final term past paper
CNF is stands for
AContext Normal Form
BComplete Normal Form
CChomsky Normal Form
DCompared Null Form
CNF means Chomsky Normal Form.
5.
★ Final term past paper
All NonNull words of the CFL can be generated by the corresponding CFG which is in CNF i.e the grammar in CNF will generate the same language except the :
Astring
Bregular language
Cnull string
Dnon of above
A CNF grammar has no null productions, so only Λ is lost.
No MCQs match this filter.Is filter mein koi MCQ nahi.
1.
★ Final term past paperLecture 36
How we can distinguish between CFG and CNF in the questions?
Show answerJawab dekhein
A CFG is in Chomsky Normal Form only if every production is of the form nonterminal → two nonterminals or nonterminal → one terminal. If any production has another form (e.g. mixed terminals and nonterminals, more than two nonterminals, unit or null productions), the CFG is not in CNF.
2.
★ Final term past paperLecture 36
Give a example of converting a CFG to CNF?
Show answerJawab dekhein
CFG: S → ABC, A → aa | b, B → c, C → d. Replace the terminal a in A → aa by a new nonterminal E → a, and break S → ABC into two-nonterminal productions with D → AB. CNF: S → DC, D → AB, A → EE | b, E → a, B → c, C → d.
1.
★ Final term past paperLecture 365 marks
Derive Chomsky Normal Form (CNF) corresponding to the Context Free Grammar (CFG) given below:
A → BAB | B | Λ
B → 00 | Λ
Show answerJawab dekhein
A and B are both nullable. Removing the Λ-productions (CNF generates the language without Λ) gives A → BAB | AB | BA | BB | B and B → 00 (A → A is dropped). Removing the unit production A → B gives A → BAB | AB | BA | BB | 00, B → 00. Now replace the terminal 0 by Z → 0 and break the long right side using R → AB. The CNF is: A → BR | AB | BA | BB | ZZ; R → AB; B → ZZ; Z → 0.