All Exams Test series for 1 year @ ₹349 only
Question

Let L = {0n1n|n ≥ 0} be a context free language.

Which of the following is correct ?

This question was previously asked in
UGC NET 2016 Paper 1 Question Paper (10-Jul-2016)
The correct answer is

Both \(\overline{L}\) and Lk is for any k ≥ 1 are context free.

The question tests two properties of the context free language \(L = \{0^n1^n \mid n \ge 0\}\): whether its complement \(\overline{L}\) is context free, and whether its powers \(L^k\) are context free.

Step 1 — Complement: a string over {0, 1} is outside L exactly when it is not of the form 0*1* (it contains the substring 10), or it is \(0^i1^j\) with \(i \ne j\). So \(\overline{L} = (0+1)^*10(0+1)^* \;\cup\; \{0^i1^j \mid i \gt j\} \;\cup\; \{0^i1^j \mid i \lt j\}\). The first part is regular and the other two are context free (a PDA pushes the 0s and checks that the counts differ), and context free languages are closed under union, so \(\overline{L}\) is context free even though CFLs are not closed under complement in general.

Step 2 — Powers: \(L^k = L \cdot L \cdots L\) (k copies). Context free languages are closed under concatenation: with start symbol S for L (\(S \to 0S1 \mid \varepsilon\)), the grammar \(S_k \to S S \cdots S\) generates \(L^k\). So \(L^k\) is context free for every k ≥ 1.

Consequently, the statements claiming that the complement is not context free, or that \(L^k\) is not context free, are false, and so is the claim that both fail to be context free.

Both L̄ and Lk is for any k ≥ 1 are context free option is correct.

Was this answer helpful?

Similar Questions

  1. According to pumping lemma for context free languages :

    Let L be an infinite context free language, then there exists some positive integer m such that any \(w \in L\) with \(|w| \ge m\) can be decomposed as \(w = uvxyz\)

  2. Consider a language A defined over the alphabet \(\Sigma = \{0, 1\}\) as \(A = \left\{0^{\lfloor n/2 \rfloor} 1^{n} : n \gt = 0\right\}\).

    The expression \(\lfloor n/2 \rfloor\) means the floor of n/2, or what you get by rounding n/2 down to the nearest integer.

    Which of the following is not an example of a string in A ?

  3. Given the following two languages :

    \(L_{1} = \{a^{n}\, b\, a^{n} \mid n \gt 0\}\)

    \(L_{2} = \{a^{n}\, b\, a^{n}\, b^{n+1} \mid n \gt 0\}\)

    Which of the following is correct ?

  4. Which of the following are context free language ?

    (A) {wi xj yk zl | i + k = j + l, where i, j, k, l ≥ 0}

    (B) {wi xj yk zl | i = j and k = l, where i, j, k, l ≥ 0}

    (C) {wi xj yk zl | i = j = k and k ≠ l, where i, j, k, l ≥ 0}

    (D) {wi xj yk zl | i = j = k + l, where i, j, k, l ≥ 0}

    (E) {wi xj yk zl | i = j = l and k ≠ l, where i, j, k, l ≥ 0}

    Choose the correct answer from the options given below :

  5. If L1 and L2 are context free languages, which of the following is True about L1∩L2 ?

  6. In Pumping Lemma for context free languages, to say a language is satisfying pumping lemma, what is the minimum length of ‘vx’ together, if you consider the string as ‘uvwxy’?

  7. Given the following two statements :

    A. L = {w|na(w) = nb(w)} is deterministic context free language, but not linear.

    B. L = {an bn} ∪ {an b2n} is linear, but not deterministic context free language.

    Which of the following options is correct ?

  8. Given the following two languages :

    L1 = {an bn | n ≥ 0, n ≠ 100}

    L2 = {w ∈ {a, b, c}*| na(w) = nb(w) = nc(w)}

    Which of the following options is correct ?


Important Questions from Context Free Languages

  1. Let $\Sigma = \{a, b, c, d\}$ and let $L = \{a^ib^jc^kd^\ell \mid i, j, k, \ell \ge 0\}$.

    Which of the following constraints ensure(s) that the language $L$ is context-free?
  2. According to pumping lemma for context free languages :

    Let L be an infinite context free language, then there exists some positive integer m such that any \(w \in L\) with \(|w| \ge m\) can be decomposed as \(w = uvxyz\)

  3. Consider a language A defined over the alphabet \(\Sigma = \{0, 1\}\) as \(A = \left\{0^{\lfloor n/2 \rfloor} 1^{n} : n \gt = 0\right\}\).

    The expression \(\lfloor n/2 \rfloor\) means the floor of n/2, or what you get by rounding n/2 down to the nearest integer.

    Which of the following is not an example of a string in A ?

  4. Given the following two languages :

    \(L_{1} = \{a^{n}\, b\, a^{n} \mid n \gt 0\}\)

    \(L_{2} = \{a^{n}\, b\, a^{n}\, b^{n+1} \mid n \gt 0\}\)

    Which of the following is correct ?

  5. Which of the following are context free language ?

    (A) {wi xj yk zl | i + k = j + l, where i, j, k, l ≥ 0}

    (B) {wi xj yk zl | i = j and k = l, where i, j, k, l ≥ 0}

    (C) {wi xj yk zl | i = j = k and k ≠ l, where i, j, k, l ≥ 0}

    (D) {wi xj yk zl | i = j = k + l, where i, j, k, l ≥ 0}

    (E) {wi xj yk zl | i = j = l and k ≠ l, where i, j, k, l ≥ 0}

    Choose the correct answer from the options given below :

Need Expert Advice?
Upcoming Exams
CTET
December 12, 2026
CBSE UGC NET
December 14, 2026
CSIR UGC NET
December 19, 2026
Test Series
UGC NET img
Teaching
UGC NET (Paper 2) 2026 Mock Test Series
796 Tests 2 Tests Free
4.4(40)
English
More Questions from UGC NET

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App