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 21–25 of 41

Q21GATE 2015 (Session 3)2 marksMCQ−0.67 if wrong
Which of the following languages are context-free?
L1={ambnanbm∣m,n≥1}L_{1}=\{a^{m}b^{n}a^{n}b^{m}|m,n\geq 1\}
L2={ambnambn∣m,n≥1}L_{2}=\{a^{m}b^{n}a^{m}b^{n}|m,n\geq 1\}
L3={ambn∣m=2n+1}L_{3}=\{a^{m}b^{n}|m=2n+1\}

Q22GATE 2014 (Session 3)2 marksMCQ−0.67 if wrong
Consider the following languages over the alphabet Σ={0,1,c}\Sigma =\{0,1,c\}:
L1={0n1n∣n≥0}L_{1}=\{0^{n}1^{n}\mid n\geq 0\}
L2={wcwr∣w∈{0,1}∗}L_{2}=\{wcw^{r}|w\in \{0,1\}^{*}\}
L3={wwr∣w∈{0,1}∗}L_{3}=\{ww^{r}|w\in \{0,1\}^{*}\}
Here wrw^{r} is the reverse of the string w. Which of these languages are deterministic Context-free languages?

Q23GATE 20132 marksMCQ−0.67 if wrong
Consider the following languages. L1={0p1q0r∣p,q,r≥0}L_{1}=\{0^{p}1^{q}0^{r}|p,q,r\geq 0\}
L2={0p1q0r∣p,q,r≥0,p≠r}L_{2}=\{0^{p}1^{q}0^{r} | p,q,r \geq 0, p \neq r \}
Which one of the following statements is FALSE?

Q24GATE 20112 marksMCQ−0.67 if wrong
Consider the languages L1, L2 and L3 as given below
L1={0p1q∣p,q∈N}L1=\{0^{p}1^{q}|p,q\in N\}
L2={0p1q∣p,q∈Nandp=q}L2=\{0^{p}1^{q}|p,q\in N and p=q\} and
L3={0p1q0r∣p,q,r∈N  and  p=q=r}L3=\{0^{p}1^{q}0^{r}|p,q,r\in N \; and \; p=q=r\}
Which of the following statements is NOT TRUE?

Q25GATE 20102 marksMCQ−0.67 if wrong
Consider the languages
L1={0i1j  ∣  i≠j}L1=\{0^{i}1^{j}\;| \; i\neq j\}.
L2={0i1j  ∣  i=j}L2=\{0^{i}1^{j}\;| \; i=j\}.
L3={0i1j  ∣  i=2j+1}L3=\{0^{i}1^{j}\;| \; i=2j+1\}.
L4={0i1j  ∣  i≠2j}L4=\{0^{i}1^{j}\;| \; i \neq 2j\}
Which one of the following statements is true?

Keep practising

Topics in Theory of Computation

All CS topics ›