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 6–10 of 41

Q6GATE 20222 marksMSQ
Consider the following languages:

L1={ww∣w∈{a,b}∗}L2={anbncm∣m,n≥0}L3={ambncn∣m,n≥0}\begin{aligned} L_1&= \{ ww|w \in \{a,b \}^* \} \\ L_2&= \{a^nb^nc^m | m,n \geq 0 \} \\ L_3 &= \{a^mb^nc^n|m,n \geq 0 \} \end{aligned}

Which of the following statements is/are FALSE?

One or more options are correct.

Q7GATE 2021 (Session 1)1 markMCQ−0.33 if wrong
Suppose that L1L_1 is a regular language and L2L_2 is a context-free language. Which one of the following languages is NOT necessarily context-free?

Q8GATE 2021 (Session 2)1 markMSQ
Let L1L_1 be a regular language and L2L_2 be a context-free language. Which of the following languages is/are context-free?

One or more options are correct.

Q9GATE 2021 (Session 2)2 marksMSQ
For a string ww, we define wRw^R to be the reverse of ww. For example, if w=01101w=01101 then wR=10110w^R=10110.
Which of the following languages is/are context-free?

One or more options are correct.

Q10GATE 20201 markMCQ−0.33 if wrong
Consider the language L={an∣n≥0}∪{anbn∣n≥0}L=\{a^n|n\geq 0\}\cup \{a^nb^n|n\geq 0\} and the following statements.

I. L is deterministic context-free.
II. L is context-free but not deterministic context-free.
III. L is not LL(k) for any k.

Which of the above statements is/are TRUE?

Keep practising

Topics in Theory of Computation

All CS topics ›