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?
- A. II, III and IV only
- B. I, II and IV only
- C. I and IV only
- 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
- Let D be a DFA and G a context-free grammar over the same alphabet. Consider the problems: I. Is L(D) ⊆ L(G)? II. Is L(G) ⊆ L(D)? III. Is…
- A single-tape Turing machine has blank B and starts in q0 on the leftmost cell of a binary numeral (MSB at the left). Rules: δ(q0,0) =…
- For a Turing machine M (given by its encoding ⟨M⟩) consider these sets: I. { ⟨M⟩ : M has at least 481 states } II. { ⟨M⟩ : L(M) contains…
- Which of the following languages are deterministic context-free? I. { aⁱbʲcᵏ : i = j or j = k } II. { aⁱbʲcᵏ : i = j, k ≥ 0 } III. { w c…
- Let L = { aⁿ : n ≥ 5 and (n is divisible by 4 or n is divisible by 6) }. How many states does the minimal complete DFA for L have?
- Which one of the following languages over the one-letter alphabet {a} is NOT context-free?