Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2018 | Question 48

Improve Article
Save Article
  • Last Updated : 13 May, 2020
Improve Article
Save Article

A CFG(Context Free Grammar) is said to be in Chomsky Normal Form (CNF), if all the productions are of the form A -> BC or A -> a. Let G be a CFG in CNF. To derive a string of terminals of length x, the number of products to be used is
(A) 2x – 1
(B) 2x
(C) 2x + 1
(D) 2x

Answer: (A)

Explanation: A context free grammar (CFG) is said to be in Chomsky Normal Form (CNF) if all production rules satisfy the following conditions given below as :-

  1. A non-terminal symbol generate a terminal Symbol (e.g.; A->b)
  2. A non-terminal symbol generate two non-terminals symbol adjacently (e.g.; S->AB)
  3. Start symbol generating ?.(e.g.; S-> ε) and For generating string w of length ‘x’ requires ‘2x-1’ production or steps in CNF because in CNF at every step only 1 terminal can replace a variable.

Option (A) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!