GATE CS Theory of Computation: 1 units and 4 chapters, weightage from 47 previous year questions across 10 papers, a study order by exam weight and 1270 pract
A question from this chapter
Question 1
Level 1: Warm-up
Assertion (A): The regular expression for binary strings divisible by $3$ is $(0 + 1(01^0)^1)^*$.
Reason (R): In the DFA for this language, the start state $q_0$ has a self-loop on input $0$.
Which of the following is correct?
Question 2
Level 1: Warm-up
Consider a grammar where the only rules are S→aSb and S→ϵ. What is the minimum number of applications of the recursive rule S→aSb required to generate a string of length 4?
Question 3
Level 1: Warm-up
Consider the language L={a}∗ over the alphabet {a}. Which of the following statements about L and its subsets is TRUE?
Question 4
Level 1: Warm-up
A language L and its complement L are both recursively enumerable. What is the minimum number of Turing machines required to decide L?
Free preview ends here
Login to view the complete notes
Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.
Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.
Built around you, not around a syllabus PDF
Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.
Revision that hits your weak spots
We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.
Questions calibrated to the real exam
Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.
Notes written for recall, not for volume
Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.
One place for everything
Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.
Honest progress
No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.
Unlock the whole course
Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.
GATE CS Theory of Computation: 1 units and 4 chapters, weightage from 47 previous year questions across 10 papers, a study order by exam weight and 1270 practice questions.
About Theory of Computation Notes
Full study notes for Theory of Computation in GATE CS, organised across 4 chapters. Each chapter page explains concepts from the basics with worked examples and the formulas you need.
GATE CS Theory of Computation Unit-wise Weightage from Past Papers
We counted every GATE CS Theory of Computation previous year question in our bank (47 questions from 10 papers) and grouped them by unit.
One Solved Question from Each Theory of Computation Chapter
Question 1 · Finite Automata and Regular ExpressionsMCQ
Assertion (A): The regular expression for binary strings divisible by $3$ is $(0 + 1(01^0)^1)^*$.
Reason (R): In the DFA for this language, the start state $q_0$ has a self-loop on input $0$.
Which of the following is correct?
A.
Both A and R are true, and R is the correct explanation of A
B.
Both A and R are true, but R is NOT the correct explanation of A
C.
A is true but R is false
D.
A is false but R is true
Correct Answer:
B
Step-by-Step Solution
Key idea: This tests understanding of the regex derivation process and whether the reason fully explains the assertion.
Step 1: Verify Assertion (A):
From the card, the canonical regex for binary strings divisible by 3 is indeed (0+1(01∗0)∗1)∗.
Assertion A is true.
Step 2: Verify Reason (R):
In the DFA, from state q0 (remainder 0), reading input 0 gives (2×0+0)mod3=0, so we stay in q0.
This means q0 has a self-loop on input 0.
Reason R is true.
Step 3: Check if R explains A:
R only explains the "$0$" part of the regex (the self-loop on q0).
The full regex (0+1(01∗0)∗1)∗ comes from state elimination, which involves eliminating q2 and q1, not just the self-loop on q0.
R is true but does NOT fully explain A.
Answer: B
Question 2 · Context-Free Grammars and Pushdown AutomataMCQ
Consider a grammar where the only rules are S→aSb and S→ϵ. What is the minimum number of applications of the recursive rule S→aSb required to generate a string of length 4?
A.
1
B.
2
C.
3
D.
4
Correct Answer:
B
Step-by-Step Solution
Key idea: This is a minimum calculation question based on the length contribution of recursive rules.
Step 1: Analyze the base rule S→ϵ. It adds 0 to the length of the string.
Step 2: Analyze the recursive rule S→aSb. Each application adds exactly 2 terminals (a and b) to the string.
Step 3: We want a final string of length 4.
Step 4: Since the base rule adds 0, the entire length of 4 must come from the recursive rule.
Step 5: Divide the target length by the length added per recursive step: 4/2=2.
Step 6: The minimum number of applications of the recursive rule is 2.
Answer: 2.
Question 3 · Closure Properties and Language ClassificationMCQ
Consider the language L={a}∗ over the alphabet {a}. Which of the following statements about L and its subsets is TRUE?
A.
Every subset of L is regular because L itself is regular.
B.
L contains only countably many subsets, all of which are decidable.
C.
L contains uncountably many subsets, most of which are undecidable.
D.
No subset of L can be undecidable since L itself is decidable.
Correct Answer:
C
Step-by-Step Solution
Key idea: This is a bounding question about the infinite subset trap. An infinite regular language has uncountably many subsets.
Step 1: L={a}∗ is an infinite regular language.
Step 2: Any infinite set has uncountably many subsets (2ℵ0).
Step 3: There are only countably many Turing machines, so only countably many decidable languages.
Step 4: Therefore, most subsets of L are undecidable.
Answer: L contains uncountably many subsets, most of which are undecidable.
Question 4 · Turing Machines, Decidability and UndecidabilityMCQ
A language L and its complement L are both recursively enumerable. What is the minimum number of Turing machines required to decide L?
A.
2
B.
3
C.
1
D.
0
Correct Answer:
C
Step-by-Step Solution
Key idea: This is a direct application of the bidirectional theorem — if both L and L are RE, then L is recursive, meaning a single decider exists.
Step 1: The bidirectional theorem states: L is recursive if and only if both L and L are recursively enumerable.
Step 2: Since the problem states both L and L are RE, the theorem immediately tells us L is recursive.
Step 3: A recursive language has a decider — a single Turing machine that halts on all inputs and correctly accepts or rejects. Therefore, exactly 1 TM is needed.
Step 4: The construction works by running the recognizer for L and the recognizer for L in parallel. One of them must halt, giving a definitive answer. This parallel simulation is itself a single TM.