Theory of Computation (TOC) — GATE CS Previous Year Questions
Practise GATE Theory of Computation (TOC) previous year questions, organized by topic. Filter by year, marks and MCQ, MSQ or NAT question type. Browse free previews; full access may require a paid plan.
Mapped syllabus topics
- Regular Expressions & Finite Automata
- Context-Free Grammars & Push-Down Automata
- Regular & Context-Free Languages, Pumping Lemma
- Turing Machines & Undecidability
Public question previews
- Consider the following grammar where S is the start symbol, and a and b are terminal symbols. S → aSbS | bS | ϵ. Which of the following statements is/are true? (2026 · 1 mark · MSQ)
- Let M be a nondeterministic finite automaton (NFA) with 6 states over a finite alphabet. Which of the following options CANNOT be the number of states in the minimal deterministic finite automaton (DFA) that is equivalent to M ? (2026 · 1 mark · MSQ)
- Let L1 and L2 be two languages over a finite alphabet, such that L1 ∩ L2 and L2 are regular languages. Which of the following statements is/are always true? (2026 · 2 marks · MSQ)
- Consider the following context-free grammar G. S → abaABAbba, A → aaBBAb | bBaba, B → aBb | ab. In the above grammar, S is the start symbol, a and b are terminal symbols, and A and B are non-terminal symbols. Let L(G) be the language generated by the grammar G. For a string s ∈ L(G), let n1(s) be the number of a’s in s and n2(s) be the number of b’s in s. Which of the following statements is/are true? (2026 · 2 marks · MSQ)
- Which one of the following statements is equivalent to the following assertion? Turing machine M decides the language L ⊆ {0,1}* (2026 · 1 mark · MCQ)