Question 1793 – Nielit Scientist-B 17-12-2017
November 5, 2023Question 1798 – Nielit Scientist-B 17-12-2017
November 5, 2023Question 1794 – Nielit Scientist-B 17-12-2017
Let G be a grammar in CFG and Let W 1,W2ɛ L(G) such that |W1|=|W2| then which of the following statement is TRUE?
Correct Answer: C
Question 7 Explanation:
Given data,
W1 and W2 are 2 strings,
|W1|=|W2| means same length
Example CFG grammar:
S→ Cbb | cc
C→ a
W1=cc W2=Cbb
As per the grammar, W1 require only one derivation S→ cc
W2 requires two derivations S→ Cbb→ abb
It means W1 is smaller than W2.
W1 and W2 are 2 strings,
|W1|=|W2| means same length
Example CFG grammar:
S→ Cbb | cc
C→ a
W1=cc W2=Cbb
As per the grammar, W1 require only one derivation S→ cc
W2 requires two derivations S→ Cbb→ abb
It means W1 is smaller than W2.
Any derivation of W1 has exactly the same number of steps as any derivation of W2
Different derivation have different length
Some derivation of W1 may be shorter the derivation of W2
None of the options
Subscribe
Login
0 Comments