0
$\begingroup$

The regular expression for the complement of the language $L = \{a^nb^m \mid n≥4, m≤3\}$ is:

  1. $(λ + a + aa + aaa)b^* + a^*bbbb^* + (a + b)^*ba(a + b)^*$
  2. $(λ + a + aa + aaa)b^* + a^*bbbbb^* + (a + b)^*ab(a + b)^*$
  3. $(λ + a + aa + aaa) + a^*bbbbb^* + (a + b)^*ab(a + b)^*$
  4. $(λ + a + aa + aaa)b^* + a^*bbbbb^* + (a + b)^*ba(a + b)^*$

My attempt:

Regular expression will be : $aaaaa^∗(λ + b + bb + bbb)$ and DFA is:

enter image description here

And complement of above DFA will be:

enter image description here

And will have regular expression:

$=(ϵ+a+aa+aaa)(ϵ+b(a+b)^∗)+aaaaa^∗(b+bb)a(a+b)^∗+aaaaa^∗bbb(a+b)(a+b)^∗$

$=(ϵ+a+aa+aaa)(ϵ+b(a+b)^∗)+aaaaa^∗(b+bb+bbb)a(a+b)^∗+aaaaa^∗bbbb(a+b)^∗\dots (1)$


But, I googled it, and found that regular expression is:

$= (λ + a + aa + aaa)b^∗ + a^∗bbbbb^∗ + (a + b)^∗ba(a + b)^∗\dots (2)$

I know that it should be :

$=(a+b)^*-aaaaa^∗(λ + b + bb + bbb)$

Equation $(2)$ is correct. What will be its regular language (i.e. $\bar{L} = \Sigma ^*-\{a^nb^m \mid n≥4, m≤3\}$ ) and DFA?

Can you explain it, please?

1 Answers 1

1

The answer is simple: there is no unique solution. Actually, there is an infinity of regular expressions representing your language and (1) and (2) are just two of them.