Which of the following statements is/are correct about the regular expression?…

2022

Which of the following statements is/are correct about the regular expression?

aa*bb*cc*dd*

A. The language is {a^n b^n c^m d^m | n >= 1, m >= 1} U {a^n b^m c^m d^n | n >= 1, m >= 1}.

B. The given CFG generates the language of the regular expression:

S -> AB | C
A -> aAb | ab
B -> cBd | cd
C -> aCd | aDd
D -> bDc | bc

C. The expression requires equal numbers of a’s, b’s, c’s and d’s.

Choose the correct answer from the options given below:

  1. A.

    None of A, B and C is correct

  2. B.

    Only B is correct

  3. C.

    Both A and B are correct

  4. D.

    All the three A, B and C are correct

Attempted by 37 students.

Show answer & explanation

Correct answer: A

Correct answer: None of A, B and C is correct

The expression aa*bb*cc*dd* simplifies to a+ b+ c+ d+. So the actual language is {a^i b^j c^k d^l | i, j, k, l >= 1}, where the four counts are independent.

  • Statement A is false: it imposes equality between some counts, such as the number of a’s and b’s. A counterexample is abbcd, which matches the regular expression but is not in A’s union language.

  • Statement B is false: the grammar generates the same equal-count union pattern described in A, not the independent-count language a+ b+ c+ d+.

  • Statement C is false: the regular expression does not require equal counts across the four blocks.

Final answer: None of A, B and C is correct.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor