GATE / CS ARCHIVE

GATE CSE 2014 SET 2 / QUESTION 15

GATE CSE 2014 Set 2 Q15

Theory of Computation · Regular Expressions & Languages · Full GATE CSE 2014 Set 2 paper

GATE 2014 Set 2, Q15 1 mark · MCQ
Report issue

Regular Expressions & Languages

Question 15, GATE 2014: Let L1={a^n:n≥0} and L2={b^n:n≥0}. Statements: I L1·L2 is regular; II L1·L2={a^n b^n:n≥0}. Which are correct? A only I; B only II; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

1. Set up the reasoning. The variable n in each set definition is locally bound. Concatenation independently chooses any word from L1 and any word from L2, so it does not require their lengths to agree.

2. Derive the result. The concatenation is a*b*: choose the number of a symbols and the number of b symbols independently. This is regular, but it includes ab² and so is not the equal-count language. Only I holds, A.

3. Check the interpretation. The regular expression a*b* describes the concatenation. The witness abb belongs to it but not to the equal-count language in II, immediately separating the two claims.

Original paper, page 32 · Answer key