Let Σ = {a, b} and language L = {aa, bb}. Then, the complement of L is
2016
Let Σ = {a, b} and language L = {aa, bb}. Then, the complement of L is
- A.
{λ, a, b, ab, ba} ∪ { w ∈ {a, b}* | |w| > 3 }
- B.
{a, b, ab, ba} ∪ { w ∈ {a, b}* | |w| > 3 }
- C.
{ w ∈ {a, b}* | |w| > 3 } ∪ {a, b, ab, ba}
- D.
{λ, a, b, ab, ba} ∪ { w ∈ {a, b}* | |w| ≥ 3 }
Attempted by 62 students.
Show answer & explanation
Correct answer: D
The complement of a language L over alphabet Σ is the set of all strings in Σ* that are not in L. Here, Σ equals {a, b}, so Σ* contains all possible strings formed by a and b. Since L equals {aa, bb}, the complement includes every string except aa and bb. This covers the empty string, all length-1 strings like a and b, other length-2 strings such as ab and ba, and all strings of length three or greater.
A video solution is available for this question — log in and enroll to watch it.