Theory of Computation questions — page 1 of 7

Q25

GATE CS 2026 CS-1Context Free LanguagesMSQ1 mark
Consider the following grammar where SS is the start symbol, and aa and bb are terminal symbols.

S→aSbS∣bS∣ϵS \to aSbS \mid bS \mid \epsilon

Which of the following statements is/are true?
More than one option can be correct.
Show answer without attempting

Answer: A, B, C

Q26

GATE CS 2026 CS-1Regular LanguagesMSQ1 mark
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 MM?
More than one option can be correct.
Show answer without attempting

Answer: B, D

Q51

GATE CS 2026 CS-1Regular LanguagesMSQ2 marks
Let L1L_1 and L2L_2 be two languages over a finite alphabet, such that L1∩L2L_1 \cap L_2 and L2L_2 are regular languages.

Which of the following statements is/are always true?
More than one option can be correct.
Show answer without attempting

Answer: C

Q52

GATE CS 2026 CS-1Context Free LanguagesMSQ2 marks
Consider the following context-free grammar GG.

S→abaABAbbaS \to abaABAbba
A→aaBBAIn∣bBabaaA \to aaBBAIn \mid bBabaa
B→aBb∣abB \to aBb \mid ab

In the above grammar, SS is the start symbol, aa and bb are terminal symbols, and AA and BB are non-terminal symbols.

Let L(G)L(G) be the language generated by the grammar GG. For a string s∈L(G)s \in L(G), let n1(s)n_1(s) be the number of aa’s in ss and n2(s)n_2(s) be the number of bb’s in ss.

Which of the following statements is/are true?
More than one option can be correct.
Show answer without attempting

Answer: B, D

Q13

GATE CS 2026 CS-2ComputabilityMCQ1 mark−1/3 if wrong
Which one of the following statements is equivalent to the following assertion?
Turing machine MM decides the language L⊆{0,1}∗L \subseteq \{0,1\}^*
Show answer without attempting

Answer: D

Q29

GATE CS 2026 CS-2Context Free LanguagesMSQ1 mark
Which of the following grammars is/are ambiguous?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q47

GATE CS 2026 CS-2Regular LanguagesMSQ2 marks
Consider the following two finite automata D1D_1 and D2D_2.

Which of the following statements is/are true?
Question figure
More than one option can be correct.
Show answer without attempting

Answer: C, D

Q48

GATE CS 2026 CS-2Context Free LanguagesMSQ2 marks
Let Σ={a,b,c,d}\Sigma = \{a, b, c, d\} and let L={aibjckdℓ∣i,j,k,ℓ≥0}L = \{a^i b^j c^k d^\ell \mid i, j, k, \ell \ge 0\}.

Which of the following constraints ensure(s) that the language LL is context-free?
More than one option can be correct.
Show answer without attempting

Answer: A, C, D

Q19

GATE CS 2025 CS-1Context Free LanguagesMCQ1 mark−1/3 if wrong
Consider the following context-free grammar GG, where S,AS, A, and BB are the variables (non-terminals), aa and bb are the terminal symbols, SS is the start variable, and the rules of GG are described as:
S→aaB∣AbbS \rightarrow aaB \mid Abb
A→a∣aAA \rightarrow a \mid aA
B→b∣bBB \rightarrow b \mid bB
Which ONE of the languages L(G)L(G) is accepted by GG?
Show answer without attempting

Answer: A

Q28

GATE CS 2025 CS-1Regular LanguagesMSQ1 mark
A regular language LL is accepted by a non-deterministic finite automaton (NFA) with nn states. Which of the following statement(s) is/are FALSE?
More than one option can be correct.
Show answer without attempting

Answer: D

Q44

GATE CS 2025 CS-1Regular LanguagesMCQ2 marks−2/3 if wrong
Consider the following two languages over the alphabet \{a, b\}:
L1={αβα∣α∈{a,b}+ AND β∈{a,b}+}L_1 = \{ \alpha\beta\alpha \mid \alpha \in \{a, b\}^+ \text{ AND } \beta \in \{a, b\}^+ \}
L2={αβα∣α∈{a}+ AND β∈{a,b}+}L_2 = \{ \alpha\beta\alpha \mid \alpha \in \{a\}^+ \text{ AND } \beta \in \{a, b\}^+ \}
Which ONE of the following statements is CORRECT?
Show answer without attempting

Answer: C

Q45

GATE CS 2025 CS-1Context Free LanguagesMCQ2 marks−2/3 if wrong
Consider the following two languages over the alphabet \{a, b, c\}, where mm and nn are natural numbers.
L1={ambmcm+n∣m,n≥1}L_1 = \{a^mb^mc^{m+n} \mid m, n \ge 1\}
L2={ambncm+n∣m,n≥1}L_2 = \{a^mb^nc^{m+n} \mid m, n \ge 1\}
Which ONE of the following statements is CORRECT?
Show answer without attempting

Answer: C

Q50

GATE CS 2025 CS-1Regular LanguagesMSQ2 marks
Consider the following deterministic finite automaton (DFA) defined over the alphabet, Σ={a,b}\Sigma = \{a, b\}. Identify which of the following language(s) is/are accepted by the given DFA.
Question figure
More than one option can be correct.
Show answer without attempting

Answer: C

Q59

GATE CS 2025 CS-1Regular LanguagesNAT2 marks
Consider a finite state machine (FSM) with one input XX and one output ff, represented by the given state transition table. The minimum number of states required to realize this FSM is ________. (Answer in integer)
Question figure
Show answer without attempting

Answer: 5

Q24

GATE CS 2025 CS-2Context Free LanguagesMCQ1 mark−1/3 if wrong
Which ONE of the following languages is accepted by a deterministic pushdown automaton?
Show answer without attempting

Answer: A

Q25

GATE CS 2025 CS-2ComputabilityMCQ1 mark−1/3 if wrong
Let G1,G2G_1, G_2 be Context Free Grammars (CFGs) and RR be a regular expression. For a grammar GG, let L(G)L(G) denote the language generated by GG.

Which ONE among the following questions is decidable?
Show answer without attempting

Answer: D

Q30

GATE CS 2025 CS-2Context Free LanguagesMSQ1 mark
Consider the two lists List I and List II given below:
List IList II
(i) Context free languages(a) Closed under union
(ii) Recursive languages(b) Not closed under complementation
(iii) Regular languages(c) Closed under intersection
For matching of items in List I with those in List II, which of the following option(s) is/are CORRECT?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q52

GATE CS 2025 CS-2Regular LanguagesMSQ2 marks
Let Σ={a,b,c}\Sigma = \{a, b, c\}. For x∈Σ∗x \in \Sigma^*, and α∈Σ\alpha \in \Sigma, let #α(x)\#_\alpha(x) denote the number of occurrences of α\alpha in xx.

Which one or more of the following option(s) define(s) regular language(s)?
More than one option can be correct.
Show answer without attempting

Answer: A, C

Q60

GATE CS 2025 CS-2Regular LanguagesNAT2 marks
Let Σ={1,2,3,4}\Sigma = \{1,2,3,4\}. For x∈Σ∗x \in \Sigma^*, let prod(x)prod(x) be the product of symbols in xx modulo 7. We take prod(ϵ)=1prod(\epsilon) = 1, where ϵ\epsilon is the null string.

For example, prod(124)=(1×2×4)(mod7)=1prod(124) = (1 \times 2 \times 4) \pmod 7 = 1.

Define L={x∈Σ∗∣prod(x)=2}L = \{x \in \Sigma^* \mid prod(x) = 2\}.

The number of states in a minimum state DFA for LL is ___________. (Answer in integer)
Show answer without attempting

Answer: 6

Q23

GATE CS 2024 CS-1Regular LanguagesMSQ1 mark
Let L1,L2L_1, L_2 be two regular languages and L3L_3 a language which is not regular. Which of the following statements is/are always TRUE?
More than one option can be correct.
Show answer without attempting

Answer: C, D

0/200 correct0 marks

Related topics in GATE CS