Theory of Computation questions

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

0/110 correct0 marks

Related topics in GATE CS