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

GATE 2005

203 questions

MCQ 2031-mark 203

Questions 136–140 of 203

Q136Context Free Language1 markMCQ−0.33 if wrong
Consider the languages:

L1={wwR∣w∈{0,1}∗}L_{1}=\{ww^{R}|w\in \{0,1\}*\}
L2={w#wR∣w∈{0,1}∗}L_{2}=\{w\#w^{R}|w\in \{0,1\}*\},where # is a special symbol
L3={ww∣w∈{0,1}∗}L_{3}=\{ww|w\in \{0,1\}*\}

Which one of the following is TRUE?

Q137Context Free Language1 markMCQ−0.33 if wrong
Consider the languages:
L1={anbncm∣n,m>0}L_{1}=\{a^{n}b^{n}c^{m}|n,m \gt 0\} and L2={anbmcm∣n,m>0}L_{2}=\{a^{n}b^{m}c^{m}|n,m \gt 0\}
Which one of the following statements is FALSE?

Q138Recursive Language1 markMCQ−0.33 if wrong
Let L1 be a recursive language, and let L2 be a recursively enumerable but not a recursive language. Which one of the following is TRUE?

Q139Undecidability1 markMCQ−0.33 if wrong
Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is true?

Q140Parsing1 markMCQ−0.33 if wrong
Consider the context-free grammar
E→E+EE\rightarrow E+E
E→(E∗E)E\rightarrow (E *E)
E→idE\rightarrow \text{id}
where E is the starting symbol, the set of terminals is {id, (,+,),*}, and the set of non-terminals is {E}.
For the terminal string id + id + id + id, how many parse trees are possible?