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

GATE 2007

184 questions

MCQ 1841-mark 184

Questions 116–120 of 184

Q116Regular Language1 markMCQ−0.33 if wrong
Which of the following languages is regular?

Q117Context Free Language1 markMCQ−0.33 if wrong
The two grammars given below generate a language over the alphabet {x,y,z}\{x, y, z\}
G1 : S→x∣z∣x S∣z S∣y BS \rightarrow x \mid z \mid x \ S \mid z \ S \mid y \ B
B→y∣z∣y B∣z BB \rightarrow y \mid z \mid y \ B \mid z \ B
G2 : S→y∣z∣y S∣z S∣x BS \rightarrow y \mid z \mid y \ S \mid z \ S \mid x \ B
B→y∣y SB \rightarrow y \mid y \ S
Which one of the following choices describes the properties satisfied by the strings in these languages?

Q118Context Free Language1 markMCQ−0.33 if wrong
The language L={0i21i∣i≥0}L=\{0^{i}21^{i}|i\geq 0\} over the alphabet {0,1,2} is:

Q119Undecidability1 markMCQ−0.33 if wrong
Which of the following problems is undecidable?

Q120Parsing1 markMCQ−0.33 if wrong
Consider the following grammars. Names representing terminals have been specified in capital letters.
G1 :stmnt→WHILE (expr) stmntstmnt→OTHERexpr→ID G2 :stmnt→WHILE (expr) stmntstmnt→OTHERexpr→expr + exprexpr→expr ∗ exprexpr→ID\begin{array}{llll}\hline \text{$G1$ :} & \text{stmnt} & \text{$\rightarrow$} & \text{WHILE (expr) stmnt} \\ \text{} & \text{stmnt} & \text{$\rightarrow$} & \text{OTHER} \\ \text{} & \text{expr} & \text{$\rightarrow$} & \text{ID} \\\hline \text{ $G2$ :} & \text{stmnt} & \text{$\rightarrow$} & \text{WHILE (expr) stmnt} \\ \text{} & \text{stmnt} & \text{$\rightarrow$} & \text{OTHER} \\ \text{} & \text{expr} & \text{$\rightarrow$} & \text{expr $+$ expr} \\ \text{} & \text{expr} & \text{$\rightarrow$} & \text{expr $*$ expr} \\ \text{} & \text{expr} & \text{$\rightarrow$} & \text{ID} \\\hline \end{array}
Which one of the following statements is true?