One of the uses of CNF is to turn parse tree into:
Which of the following grammar is in Greibach Normal Form?
A. S → AB, A → a, B → b
B. S → aA | A → ϵ
C. S → Aa, A → a
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What is the minimum number of productions present in the below given context free grammar to make it Chomsky Normal Form?
S → XYx
X → xxy
Y → Xz
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
Let G = (V, T, S, P) be any context-free grammar without any λ-productions or unit productions. Let K be the maximum number of symbols on the right of any production in P. The maximum number of production rules for any equivalent grammar in Chomsky normal form is given by:
Where |⋅| denotes the cardinality of the set.
To obtain a string of n Terminals from a given Chomsky normal form grammar, the number of productions to be used is:
What is the minimum number of productions needed to add to the below given context free grammar to make it Greibech Normal Form?
S → aSb | ab | bb
If L(G) is accepted by pushdown automaton and x is a string of length 21 in L(G), how long is a derivative of x in G, if G is Chomsky normal form?
If a Context Free Grammar G is in Chomsky Normal Form, to derive a string of length 101 number of productions needed is _____.
Let G be a Context Free Grammar in Chomsky Normal Form. To derive a string (aaaaaa)n where a is terminal variable and n is 5, the number of products to be used is _____.