Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE IT 2006 | Question 82

  • Last Updated : 28 Jun, 2021

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?
(A) (a + b)*
(B) {ϵ, a, ab, bab}
(C) (ab)*
(D) {anbn | n ≥ 0}

Answer: (A)


A counter example which proves all the conclusions of the last question in one go should have the following properties :

  • L should be regular due to the demand of the question
  • L should be an infinite set of strings, otherwise half(L) would be regular
  • L should have more than one alphabets in its grammar, otherwise repeat(L) would be regular.


  1. (a + b)* is perfect example to support the conclusions of last question. It is regular, has more than one alphabets and is an infinite set.
  2. {ϵ, a, ab, bab} is a finite set, hence wrong.
  3. (ab)* is equivalent to c∗ , which is one alphabet language, hence wrong.
  4. {anbn | n ≥ 0} is not even a regular language, hence wrong.

This solution is contributed by vineet purswani.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!