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 16–20 of 41

Q16GATE 2017 (Session 2)1 markMCQ−0.33 if wrong
Let L1,L2L_{1},L_{2} be any two context free languages and R be any regular language. Then which of the following is/are CORRECT ?
I. L1∪L2L_{1}\cup L_{2} is context - free
II. L1ˉ\bar{L_{1}} is context - free
III. L1−RL_{1} - R is context - free
IV. L1∩L2L_{1}\cap L_{2} is context - free

Q17GATE 2017 (Session 2)2 marksMCQ−0.67 if wrong
Consider the following languages

L1={ap∣pL_{1}=\{a^{p}|p is a prime number}
L2={anbmc2m∣n≥0,m≥0}L_{2}=\{a^{n}b^{m}c^{2m}|n\geq 0,m\geq 0\}
L3={anbnc2n∣n≥0}L_{3}=\{a^{n}b^{n}c^{2n}|n\geq 0\}
L4={anbn∣n≥1}L_{4}=\{a^{n}b^{n}|n\geq 1\}

Which of the following are CORRECT ?

I.L1L_{1} is context-free but not regular.
II. L2L_{2} is not context-free.
III. L3L_{3} is not context-free but recursive.
IV. L4L_{4} is deterministic context-free.

Q18GATE 2016 (Session 2)1 markMCQ−0.33 if wrong
Consider the following types of languages: L1L_{1}:Regular, L2L_{2}:Context-free, L3L_{3}:Recursive, L4L_{4}:Recursively enumerable.
Which of the following is/are TRUE?
I. Lˉ3∪L4\bar{L}_{3}\cup L_{4} is recursivelyenumerable
II. Lˉ2∪L3\bar{L}_{2}\cup L_{3} is recursive
III. L1∗∪L2L_{1}^{*}\cup L_{2} is context-free
IV. L1∪Lˉ2L_{1}\cup \bar{L}_{2} is context-free

Q19GATE 2016 (Session 2)2 marksMCQ−0.67 if wrong
Consider the following languages:
L1={anbmcn+m:m,n≥1}L_{1}=\{a^{n}b^{m}c^{n+m}:m,n\geq 1\}
L2={anbnc2n:n≥1}L_{2}=\{a^{n}b^{n}c^{2n}:n\geq 1\}
Which one of the following is TRUE?

Q20GATE 2015 (Session 1)1 markMCQ−0.33 if wrong
For any two languages L1 and L2 such that L1 is context-free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?
I. L1ˉ\bar{L_{1}} (complement of L1) is recursive
II. L2ˉ\bar{L_{2}} (complement of L2) is recursive
III. L1ˉ\bar{L_{1}} is context-free
IV. L1ˉ∪L2\bar{L_{1}} \cup L_{2} is recursively enumerable

Keep practising

Topics in Theory of Computation

All CS topics ›