Let L be a regular language. Consider the constructions on L below: repeat (L)…

2006

Let L be a regular language. Consider the constructions on L below: repeat (L) = {ww | w ∊ L} prefix (L) = {u | ∃v : uv ∊ L} suffix (L) = {v | ∃u uv ∊ L} half (L) = {u | ∃v : | v | = | u | and uv ∊ L} Which choice of L is best suited to support your answer above?

  1. A.

    (a + b)*

  2. B.

    {ϵ, a, ab, bab}

  3. C.

    (ab)*

  4. D.

    {anbn | n ≥ 0}

Attempted by 17 students.

Show answer & explanation

Correct answer: A

The language (a + b)* is regular and closed under the operations repeat, prefix, suffix, and half. It includes all possible strings over {a, b}, making it ideal for demonstrating closure properties of regular languages. Other options may be non-regular or too restrictive, so (a + b)* is the best choice.

Explore the full course: Gate Guidance By Sanchit Sir