GATE 2008 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2008

185 questions

MCQ 1851-mark 52 · 2-mark 133

Questions 126–130 of 185

Q126Context Free Grammar2 marksMCQ−0.67 if wrong
Consider a CFG with the following productions.

S→AA∣BS \to AA \mid B
A→0A∣A0∣1A \to 0A \mid A0 \mid 1
B→0B00∣1B \to 0B00 \mid 1

S is the start symbol, A and B are non-terminals and 0 and 1 are the terminals. The language generated by this grammar is:

Q127Context Free Grammar2 marksMCQ−0.67 if wrong
Which of the following statements are true?

I. Every left-recursive grammar can be converted to a right-recursive grammar and vice-versa

II. All ε\varepsilon-productions can be removed from any context-free grammar by suitable transformations

III. The language generated by a context-free grammar all of whose productions are of the form x →\rightarrow w or x →\rightarrow wY (where, w is a string of terminals and Y is a non-terminal), is always regular

IV. The derivation trees of strings generated by a context-free grammar in Chomsky Normal Form are always binary trees

Q128Context Free Language2 marksMCQ−0.67 if wrong
Consider the following languages.
L1={aibjck∣i=j,k≥1}L_1 = \{a^i b^j c^k \mid i = j, k \geq 1\}
L2={aibj∣j=2i,i≥0}L_2 = \{a^i b^j \mid j = 2i, i \geq 0\}
Which of the following is true?

Q129Context Free Language1 markMCQ−0.33 if wrong
Which of the following is true for the language{ apa^{p}|p is a prime} ?

Q130Recursive Language1 markMCQ−0.33 if wrong
If L and Lˉ\bar{L} are recursively enumerable then L is