Computer Science · Theory of Computation
Which of the following is/are correct about the regular expression aabbccdd? A. The language for the given expression is: L = {anbncmdm | n ≥ 1, m ≥ 1} ∪ {anbmcmdn | n ≥ 1, m ≥ 1} B. The Context-Free Grammar generating the same language as the regular expression is: S → AB | C A → aAb | ab B → cBd | cd C → aCd | aDd D → bDc | bc C. The language generated by this expression has an equal number of 'a's, followed by an equal number of 'b's, followed by an equal number of 'c's, and followed by an equal number of 'd's. Choose the correct answer from the options given below:
- 1All three A, B and C are correct
- 2Both A and B are correct✓
- 3Only B is correct
- 4Only A is correct
Correct answer
Both A and B are correct
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Theory of Computation?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Theory of Computation