Skip to content

GATE CS Theory of Computation questions

Practise Theory of Computation questions for GATE CS. Explore official PYQs and original subject-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2014Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Which one of the following is TRUE?
Official PYQ2014Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let L1={w∈{0,1}∗∣wL_1=\{w\in\{0,1\}^*\mid w  has at least as many occurrences of \text{ has at least as many occurrences of } (110)′s as (110)'\text{s as } (011)′s}(011)'\text{s} \}. Let L2={w∈{0,1}∗ ∣wL_2=\{w \in\{0,1\}^*\ \mid w  has at least as many occurrences of \text{ has at least as many occurrences of } (000)′s as(000)'\text{s as} (111)′s}(111)'\text{s} \}. Which one of the following is TRUE?
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Let ⟨M⟩\langle M \rangle be the encoding of a Turing machine as a string over Σ={0,1}\Sigma=\left\{0,1\right\}. Let L={⟨M⟩∣M is a Turing machine that accepts a string of length 2014}.L=\left\{\langle M \rangle \mid M \text{ is a Turing machine}\\\text{ that accepts a string of length 2014} \right\}. Then LL is:
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Let A ≤m BA\:\leq_m\:B denotes that language AA is mapping reducible (also known as many-to-one reducible) to language BB. Which one of the following is FALSE?
Official PYQ2014Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
If L1 ={an∣n ≥ 0}L_1\:=\{a^n \mid n\:\geq\:0\} and L2 ={bn∣n ≥ 0}L_2\:= \{b^n \mid n\:\geq\:0\} , consider L1.L2L_1.L_2 is a regular language L1.L2={anbn∣n ≥ 0}L_1.L_2 = \{a^nb^n \mid n\: \geq \:0\} Which one of the following is CORRECT?
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Consider the decision problem 2CNFSAT2CNFSAT defined as follows: {ϕ∣ϕ is a satisfiable propositional formula in CNF with at most two literals per clause}\left\{ \phi \mid \phi \text{ is a satisfiable propositional formula in CNF with at most two literals per clause}\right\} For example, ϕ=(x1∨x2)∧(x1∨x3ˉ)∧(x2∨x4)\phi = (x1 \vee x2) \wedge (x1 \vee \bar{x3}) \wedge (x2 \vee x4) is a Boolean formula and it is in 2CNFSAT2CNFSAT. The decision problem 2CNFSAT2CNFSAT is
Official PYQ2014Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Consider the following languages over the alphabet ∑={0,1,c}\sum = \{0, 1, c\} L1={0n1n∣n≥0}L_1 = \left\{0^n1^n\mid n \geq 0\right\} L2={wcwr∣w∈{0,1}∗}L_2 = \left\{wcw^r \mid w \in \{0,1\}^*\right\} L3={wwr∣w∈{0,1}∗}L_3 = \left\{ww^r \mid w \in \{0,1\}^*\right\} Here, wrw^r is the reverse of the string ww. Which of these languages are deterministic Context-free languages?
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Which one of the following problems is undecidable?
Official PYQ2014Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let Σ\Sigma be a finite non-empty alphabet and let 2Σ∗2^{\Sigma^*} be the power set of Σ∗\Sigma^*. Which one of the following is TRUE?
Official PYQ2014Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
The length of the shortest string NOT in the language (over Σ={a,b})\Sigma = \{a, b\}) of the following regular expression is _______. a∗b∗(ba)∗a∗a^*b^*(ba)^*a^*
Official PYQ2013Theory of ComputationUndecidabilityMCQ · 1 mark
Which of the following is/are undecidable? GG is a CFG. Is L(G)=ϕL(G) = \phi? GG is a CFG. Is L(G)=Σ∗L(G) = \Sigma^*? MM is a Turing machine. Is L(M)L(M) regular? AA is a DFA and NN is an NFA. Is L(A)=L(N)L(A) = L(N)?
Official PYQ2013Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the DFA AA given below. Which of the following are FALSE? Complement of L(A)L(A) is context-free. L(A)=L((11∗0+0)(0+1)∗0∗1∗)L(A) = L((11^*0+0)(0 + 1)^*0^*1^*) For the language accepted by A,AA, A is the minimal DFA. AA accepts all strings over {0,1}\{0, 1\} of length at least 22.
Official PYQ2013Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Consider the following languages. L1={0p1q0r∣p,q,r≥0}L_1 = \left \{ 0^p1^q0^r \mid p,q,r \geq 0 \right \} L2={0p1q0r∣p,q,r≥0,p≠r}L_2 = \left \{ 0^p1^q0^r \mid p,q,r \geq 0, p\neq r \right \} Which one of the following statements is FALSE?
Official PYQ2013Theory of ComputationUndecidabilityMCQ · 1 mark
Which of the following statements are TRUE? The problem of determining whether there exists a cycle in an undirected graph is in PP. The problem of determining whether there exists a cycle in an undirected graph is in NPNP. If a problem A is NP−CompleteNP-Complete, there exists a non-deterministic polynomial time algorithm to solve AA
Official PYQ2013Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Which of the following statements is/are FALSE? For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine. Turing recognizable languages are closed under union and complementation. Turing decidable languages are closed under intersection and complementation. Turing recognizable languages are closed under union and …
Official PYQ2013Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Consider the languages L1=ϕL_1 = \phi and L2={a}L_2 = \{a\}. Which one of the following represents L1L2∗∪L1∗L_1 {L_2}^* \cup {L_1}^* ?
Official PYQ2012Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the set of strings on {0,1}\{0,1\} in which, every substring of 33 symbols has at most two zeros. For example, 001110001110 and 011001011001 are in the language, but 100010100010 is not. All strings of length less than 33 are also in the language. A partially completed DFA that accepts this language is shown below. The missing arcs in the DFA are:
Official PYQ2012Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Given the language L={ab,aa,baa}L = \left\{ab, aa, baa\right\}, which of the following strings are in L∗L^{*}? abaabaaabaaabaabaaabaa aaaabaaaaaaaabaaaa baaaaabaaaabbaaaaabaaaab baaaaabaabaaaaabaa
Official PYQ2012Theory of ComputationUndecidabilityMCQ · 1 mark
Which of the following problems are decidable? Does a given program ever produce an output? If LL is a context-free language, then, is Lˉ\bar{L} also context-free? If LL is a regular language, then, is Lˉ\bar{L} also regular? If LL is a recursive language, then, is Lˉ\bar{L} also recursive?
Official PYQ2012Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
What is the complement of the language accepted by the NFA shown below? Assume Σ={a}\Sigma = \{a\} and ϵ\epsilon is the empty string.