Context Free Languages 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

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

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

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

0/40 correct0 marks

Related topics in Theory of Computation