GATE Computer ScienceVery hardGATE CS

Consider the following claims about an arbitrary regular language L over Σ. I. { w : ww ∈ L } is regular. II. { w : w wᴿ ∈ L } is regular. III. { w wᴿ : w ∈ L } is regular. IV. { w : wᴿ ∈ L } is regular. Which claims are correct?

  1. A. II, III and IV only
  2. B. I, II and IV only
  3. C. I and IV only
  4. D. I, II, III and IV

Correct answer: B. I, II and IV only

I: run the DFA from every start state in parallel on w and check where it lands. II: run the NFA forward on w and the reversed NFA from the accepting states on w; accept if the two state sets meet. IV is closure under reversal. III fails: for L = {a, b}* the set is the even-length palindromes, which is not regular.

More Theory of Computation questions

Exams that ask this topic