Context Free Language: GATE CS Previous Year Questions

Context Free Language · Theory of Computation

41 questions · asked in 24 of 27 years (2000–2026)

MCQ 36 · MSQ 51-mark 23 · 2-mark 18

2000Questions per year2026

Questions 26–30 of 41

Q26GATE 20092 marksMCQ−0.67 if wrong
Let L=L1∩L2L=L_{1}\cap L_{2} , where L1L_{1} and L2L_{2} are languages as defined below:
L1={ambmcanbn∣m,n≥0}L_{1}= \{a^{m}b^{m} c a^{n} b^{n}|m,n\geq 0 \}
L2={aibjck∣i,j,k≥0}L_{2}=\{a^{i}b^{j}c^{k}|i,j,k\geq 0 \}

Then L is

Q27GATE 20082 marksMCQ−0.67 if wrong
Consider the following languages.
L1={aibjck∣i=j,k≥1}L_1 = \{a^i b^j c^k \mid i = j, k \geq 1\}
L2={aibj∣j=2i,i≥0}L_2 = \{a^i b^j \mid j = 2i, i \geq 0\}
Which of the following is true?

Q28GATE 20081 markMCQ−0.33 if wrong
Which of the following is true for the language{ apa^{p}|p is a prime} ?

Q29GATE 20071 markMCQ−0.33 if wrong
The two grammars given below generate a language over the alphabet {x,y,z}\{x, y, z\}
G1 : S→x∣z∣x S∣z S∣y BS \rightarrow x \mid z \mid x \ S \mid z \ S \mid y \ B
B→y∣z∣y B∣z BB \rightarrow y \mid z \mid y \ B \mid z \ B
G2 : S→y∣z∣y S∣z S∣x BS \rightarrow y \mid z \mid y \ S \mid z \ S \mid x \ B
B→y∣y SB \rightarrow y \mid y \ S
Which one of the following choices describes the properties satisfied by the strings in these languages?

Q30GATE 20071 markMCQ−0.33 if wrong
The language L={0i21i∣i≥0}L=\{0^{i}21^{i}|i\geq 0\} over the alphabet {0,1,2} is:

Keep practising

Topics in Theory of Computation

All CS topics ›