Theory of Computation questions

Q1

GATE CS 2021 CS-1Context Free LanguagesMCQ1 mark−1/3 if wrong
Suppose that L1L_1 is a regular language and L2L_2 is a context-free language. Which one of the following languages is NOT necessarily context-free?
Show answer without attempting

Answer: C

Q12

GATE CS 2021 CS-1ComputabilityMSQ1 mark
Let ⟨M⟩\langle M \rangle denote an encoding of an automaton MM. Suppose that Σ={0,1}\Sigma = \{0, 1\}. Which of the following languages is/are NOT recursive?
More than one option can be correct.
Show answer without attempting

Answer: D

Q38

GATE CS 2021 CS-1Regular LanguagesMCQ2 marks−2/3 if wrong
Consider the following language.
L={w∈{0,1}∗∣w ends with the substring 011}L = \{w \in \{0, 1\}^* \mid w \text{ ends with the substring } 011\}
Which one of the following deterministic finite automata accepts LL?
Show answer without attempting

Answer: D

Q39

GATE CS 2021 CS-1ComputabilityMCQ2 marks−2/3 if wrong
For a Turing machine MM, ⟨M⟩\langle M \rangle denotes an encoding of MM. Consider the following two languages.
L1={⟨M⟩∣M takes more than 2021 steps on all inputs}L_1 = \{\langle M \rangle \mid M \text{ takes more than 2021 steps on all inputs}\}
L2={⟨M⟩∣M takes more than 2021 steps on some input}L_2 = \{\langle M \rangle \mid M \text{ takes more than 2021 steps on some input}\}
Which one of the following options is correct?
Show answer without attempting

Answer: A

Q51

GATE CS 2021 CS-1Context Free LanguagesNAT2 marks
In a pushdown automaton P=(Q,Σ,Γ,δ,q0,F)P = (Q, \Sigma, \Gamma, \delta, q_0, F), a transition of the form,
p→a, X→Yqp \xrightarrow{a,\ X \to Y} q
where p,q∈Qp, q \in Q, a∈Σ∪{ϵ}a \in \Sigma \cup \{\epsilon\}, and X,Y∈Γ∪{ϵ}X, Y \in \Gamma \cup \{\epsilon\}, represents
(q,Y)∈δ(p,a,X).(q, Y) \in \delta(p, a, X).
Consider the following pushdown automaton over the input alphabet Σ={a,b}\Sigma = \{a, b\} and stack alphabet Γ={#,A}\Gamma = \{\#, A\}.
The number of strings of length 100 accepted by the above pushdown automaton is ______.
Question figure
Show answer without attempting

Answer: 50

Q9

GATE CS 2021 CS-2Regular LanguagesMCQ1 mark−1/3 if wrong
Let L⊆{0,1}∗L \subseteq \{0,1\}^* be an arbitrary regular language accepted by a minimal DFA with kk states. Which one of the following languages must necessarily be accepted by a minimal DFA with kk states?
Show answer without attempting

Answer: C

Q12

GATE CS 2021 CS-2Context Free LanguagesMSQ1 mark
Let L1L_1 be a regular language and L2L_2 be a context-free language. Which of the following languages is/are context-free?
More than one option can be correct.
Show answer without attempting

Answer: B, C, D

Q17

GATE CS 2021 CS-2Regular LanguagesNAT1 mark
Consider the following deterministic finite automaton (DFA).

The number of strings of length 8 accepted by the above automaton is ____________.
Question figure
Show answer without attempting

Answer: 256

Q36

GATE CS 2021 CS-2Regular LanguagesMCQ2 marks−2/3 if wrong
Consider the following two statements about regular languages:
S1S_1: Every infinite regular language contains an undecidable language as a subset.
S2S_2: Every finite language is regular.
Which one of the following choices is correct?
Show answer without attempting

Answer: C

Q41

GATE CS 2021 CS-2Context Free LanguagesMSQ2 marks
For a string ww, we define wRw^R to be the reverse of ww. For example, if w=01101w = 01101 then wR=10110w^R = 10110.
Which of the following languages is/are context-free?
More than one option can be correct.
Show answer without attempting

Answer: B, C, D

Q47

GATE CS 2021 CS-2Regular LanguagesMSQ2 marks
Which of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string ϵ\epsilon is divisible by three.
More than one option can be correct.
Show answer without attempting

Answer: A, B, C

0/110 correct0 marks

Related topics in GATE CS