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 PYQ2005Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Consider the languages: L1={anbncm∣n,m>0}L_1 = \left\{ a^nb^nc^m \mid n,m >0\right\} and L2={anbmcm∣n,m>0}L_2 = \left\{a^nb^mc^m\mid n, m > 0\right\} Which one of the following statements is FALSE?
Official PYQ2005Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let NfN_f and NpN_p denote the classes of languages accepted by non-deterministic finite automata and non-deterministic push-down automata, respectively. Let DfD_f and DpD_p denote the classes of languages accepted by deterministic finite automata and deterministic push-down automata respectively. Which one of the following is TRUE?
Official PYQ2005Theory of ComputationUndecidabilityMCQ · 1 mark
Consider three decision problems P1P_1, P2P_2 and P3P_3. It is known that P1P_1 is decidable and P2P_2 is undecidable. Which one of the following is TRUE?
Official PYQ2004Theory of ComputationUndecidabilityMCQ · 1 mark
L1L_1 is a recursively enumerable language over Σ\Sigma. An algorithm AA effectively enumerates its words as ω1,ω2,ω3,… .\omega_1, \omega_2, \omega_3, \dots . Define another language L2L_2 over Σ∪{#}\Sigma \cup \left\{\text{\#}\right\} as {wi#wj∣wi,wj∈L1,i<j}\left\{w_i \text{\#} w_j \mid w_i, w_j \in L_1, i < j \right\}. Here # is new symbol. Consider the following …
Official PYQ2004Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The following finite state machine accepts all those binary strings in which the number of 11’s and 00’s are respectively:
Official PYQ2004Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
The language {ambncm+n∣m,n≥1}\left\{a^mb^nc^{m+n} \mid m, n \geq1\right\} is
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the NFA MM shown below. Let the language accepted by MM be LL. Let L1L_1 be the language accepted by the NFA M1M_1 obtained by changing the accepting state of MM to a non-accepting state and by changing the non-accepting states of MM to accepting states. Which of the following statements is true?
Official PYQ2003Theory of ComputationUndecidabilityMCQ · 1 mark
A single tape Turing Machine MM has two states q0q0 and q1q1, of which q0q0 is the starting state. The tape alphabet of MM is {0,1,B}\{0, 1, B\} and its input alphabet is {0,1}\{0, 1\}. The symbol BB is the blank symbol used to indicate end of an input string. The transition function of MM is described in the following table. …
Official PYQ2003Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 1 mark
Let G=({S},{a,b},R,S)G=\left(\left\{S\right\}, \left\{a,b\right\},R,S\right) be a context free grammar where the rule set R is S→aSb∣SS∣ϵS \to a S b \mid S S \mid \epsilon Which of the following statements is true?
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following deterministic finite state automaton MM. Let SS denote the set of seven bit binary strings in which the first, the fourth, and the last bits are 11. The number of strings in SS that are accepted by MM is
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The regular expression 0∗(10∗)∗0^*(10^*)^* denotes the same set as
Official PYQ2003Theory of ComputationUndecidabilityMCQ · 1 mark
Nobody knows yet if P=NPP=NP. Consider the language LL defined as follows.L={(0+1)∗ if P=NPϕotherwiseL = \begin{cases} (0+1)^* & \text{ if } P = NP \\ \phi & otherwise \end{cases}Which of the following statements is true?
Official PYQ2003Theory of ComputationUndecidabilityMCQ · 1 mark
Consider two languages L1L_1 and L2L_2 each on the alphabet Σ\Sigma. Let f:Σ∗→Σ∗f : \Sigma^* \to \Sigma^* be a polynomial time computable bijection such that (∀x)[x∈L1(\forall x) [ x\in L_1 iff f(x)∈L2]f(x) \in L_2]. Further, let f−1f^{-1} be also polynomial time computable. Which of the following CANNOT be true?
Official PYQ2003Theory of ComputationUndecidabilityMCQ · 1 mark
Define languages L0L_0 and L1L_1 as follows : L0={⟨M,w,0⟩∣M halts on w}L_0 = \{\langle M, w, 0 \rangle \mid M \text{ halts on }w\} L1={⟨M,w,1⟩∣M does not halts on w}L_1 = \{\langle M, w, 1 \rangle \mid M \text{ does not halts on }w\} Here ⟨M,w,i⟩\langle M, w, i \rangle is a triplet, whose first component MM is an encoding of a Turing Machine, second component ww is a string, and third component ii …
Official PYQ2003Theory of ComputationUndecidabilityMCQ · 1 mark
If the strings of a language LL can be effectively enumerated in lexicographic (i.e., alphabetic) order, which of the following statements is true?
Official PYQ2002Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The smallest finite automaton which accepts the language {x∣\{x \mid length of xx is divisible by 3}3\} has
Official PYQ2002Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Which of the following is true?
Official PYQ2002Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The finite state machine described by the following state diagram with AA as starting state, where an arc label is x/y,x/y, and xx stands for 11-bit input and yy stands for 22-bit output
Official PYQ2002Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
The language accepted by a Pushdown Automaton in which the stack is limited to 1010 items is best described as
Official PYQ2001Theory of ComputationUndecidabilityMCQ · 1 mark
Consider the following problem XX. Given a Turing machine MM over the input alphabet Σ\Sigma, any state qq of MM and a word w∈Σ∗w \in \Sigma^*, does the computation of MM on ww visit the state of qq? Which of the following statements about XX is correct?