GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b)* = (a*b*)* II. (ab)*a = a(ba)* III. (a + ab)* = (a + ba)* IV. (ab)* = a*b* Which of the claims are correct?
- A. I only
- B. I, II, III and IV
- C. I and II only
- D. I, II and IV only
Correct answer: C. I and II only
I is true. II is true. III is false. IV is false. Each was checked by comparing both languages on every string up to length 10 and by a structural argument.
More Theory of Computation questions
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (ab) = ε + (a + b)b II. (aa +…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b) = (a + b) II. (a +…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (ba)b = b(ab) II. (a + b)ab =…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b)b = (ab)⁺ II. (ab)(a +…
- Which one of the following context-free grammars (start symbol S, terminals a, b) is unambiguous?
- Which one of the following context-free grammars (start symbol S, terminals a, b) is ambiguous?