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

GATE 2005

203 questions

MCQ 2031-mark 203

Questions 131–135 of 203

Q131Regular Grammar1 markMCQ−0.33 if wrong
Consider the regular grammar:
S→Xa∣YaS \rightarrow Xa \mid Ya
X→ZaX \rightarrow Za
Z→Sa∣ϵZ \rightarrow Sa \mid \epsilon
Y→WaY \rightarrow Wa
W→SaW \rightarrow Sa
where S is the starting symbol, the set of terminals is {a} and the set of non-terminals is {S, W, X, Y, Z}.
We wish to construct a deterministic finite automaton (DFA) to recognize the same language. What is the minimum number of states required for the DFA?

Q132Regular Language1 markMCQ−0.33 if wrong
A language L satisfies the Pumping Lemma for regular languages, and also the Pumping Lemma for context-free languages. Which of the following statements about L is TRUE?

Q133Push-down Automata1 markMCQ−0.33 if wrong
Let P be a non-deterministic push-down automaton (NPDA) with exactly one state, q, and exactly one symbol, Z, in its stack alphabet. State q is both the starting as well as the accepting state of the PDA. The stack is initialized with one Z before the start of the operation of the PDA. Let the input alphabet of the PDA be Σ\Sigma. Let L(P) be the language accepted by the PDA by reading a string and reaching its accepting state. Let N(P) be the language accepted by the PDA by reading a string and emptying its stack. Which of the following statements is TRUE?

Q134Context Free Language1 markMCQ−0.33 if wrong
The language {0n1n2n∣1≤n≤106}\{0^n 1^n 2^n \mid 1 \leq n \leq 10^6\} is

Q135Context Free Language1 markMCQ−0.33 if wrong
Let L be a regular language and M be a context-free language, both over the alphabet Σ\Sigma. Let LcL^c and McM^c denote the complements of L and M respectively. Which of the following statements about the language Lc∪McL^c\cup M^c is TRUE?