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

GATE 2006

191 questions

MCQ 1911-mark 191

Questions 131–135 of 191

Q131Context Free Grammar1 markMCQ−0.33 if wrong
Consider the following statements about the context-free grammer
G={S→SS,S→ab,S→ba,S→ε}G=\{S\rightarrow SS, S\rightarrow ab, S\rightarrow ba, S\rightarrow \varepsilon \}
1. G is ambiguous
2. G produces all strings with equal number of a's and b's
3. G can be accepted by a deterministic PDA.
Which combination below expresses all the true statements about G?

Q132Push-down Automata1 markMCQ−0.33 if wrong
Consider the pushdown automaton (PDA) below which runs over the input alphabet (a, b, c). It has the stack alphabet {Z0,X}\{Z_0, X\} where Z0Z_0 is the bottom-of-stack marker. The set of states of the PDA is (s, t, u, f} where s is the start state and f is the final state. The PDA accepts by final state. The transitions of the PDA given below are depicted in a standard manner. For example, the transition (s,b,X)→(t,XZ0)(s, b, X) \rightarrow (t, XZ_0) means that if the PDA is in state s and the symbol on the top of the stack is X, then it can read b from the input and move to state t after popping the top of stack and pushing the symbols Z0Z_0 and X (in that order) on the stack.
(s,a,Z0)→(s,XXZ0)(s, a, Z_0) \rightarrow (s, XXZ_0)
(s,ϵ,Z0)→(f,ϵ)(s, \epsilon, Z_0) \rightarrow (f, \epsilon)
(s,a,X)→(s,XXX)(s, a, X) \rightarrow (s, XXX)
(s,b,X)→(t,ϵ)(s, b, X) \rightarrow (t, \epsilon)
(t,b,X)→(t,ϵ)(t, b, X) \rightarrow (t,\epsilon)
(t,c,X)→(u,ϵ)(t, c, X) \rightarrow (u, \epsilon)
(u,c,X)→(u,ϵ)(u, c, X) \rightarrow (u, \epsilon)
(u,ϵ,Z0)→(f,ϵ)(u, \epsilon, Z_0) \rightarrow (f, \epsilon)
The language accepted by the PDA is

Q133Push-down Automata1 markMCQ−0.33 if wrong
Which of the following languages is accepted by a non-deterministic pushdown automaton (PDA) but NOT by a deterministic PDA?

Q134Context Free Language1 markMCQ−0.33 if wrong
Let L be a context-free language and M a regular language. Then the language L∩ML \cap M is

Q135Context Free Language1 markMCQ−0.33 if wrong
Let L1={0n+m1n0m∣n,m≥0}L_{1}=\{0^{n+m}1^{n}0^{m}|n,m\geq 0\}
L2={0n+m1n+m0m∣n,m≥0}L_{2}=\{0^{n+m}1^{n+m}0^{m}|n,m\geq 0\}
L3={0n+m1n+m0n+m∣n,m≥0}L_{3}=\{0^{n+m}1^{n+m}0^{n+m}|n,m\geq 0\}

Which of these languages are NOT context free?