in Theory of Computation retagged by
10,907 views
6 votes
6 votes

 Regular expression for the complement of language $L=\left\{a^{n}b^{m} \mid n \geq 4, m \leq 3\right\}$ is 

  1. $(a + b)^{*} ba(a + b)^{*}$ 
  2. $a^{*} bbbbb^{*}$ 
  3. $(\lambda + a + aa + aaa)b^{*} + (a + b)^{*} ba(a + b)^{*}$
  4. None of the above 
in Theory of Computation retagged by
10.9k views

1 comment

Source-Peter Linz-Chapter 3.1 Example 6(c)
1
1

7 Answers

19 votes
19 votes
Best answer

$n\geq 4$ , then $\{aaaa,aaaaa,aaaaaa,aaaaaaa,.....\} = aaaa\{ \epsilon,a,aa,aaa,.....\} =aaaaa^*$
$m\leq 3$, then $\{\epsilon,b,bb,bbb\}$
$L= \{a^nb^m \;|\;n\geq 4,m\leq 3\}$

Regular expression will be  $aaaaa^*(\epsilon +b+bb+bbb)$
DFA for above regular expression will be 

DFA for complement of L , i.e, L' will be 

will have regular expression 
$(\epsilon+a+aa+aaa)(\epsilon+b(a+b)^*) +aaaaa^*(b+bb)a(a+b)^*+aaaaa^*bbb(a+b)(a+b)^*$
or $(\epsilon+a+aa+aaa)(\epsilon+b(a+b)^*) +aaaaa^*(b+bb+bbb)a(a+b)^*+aaaaa^*bbbb(a+b)^*$

selected by

4 Comments

awesome solution. Thanx a lot sir.
0
0
so answer is D none of these??
0
0

@sushmita

Mam, I think answer is (C).

Please see the link of similar question i had posted as answer and figure out the correct one.

0
0
2 votes
2 votes

compliment is:

(∈ + a + aa + aaa)(b*)   ------ For having #a's < 4  which is opposite of  n >= 4

(a* bbbb b*)  ------ For having #b's >3  which is opposite of m<= 3

(a+b)*(ba)(a+b)* -------  complement of a*b* --- for including a's followed by b's

Union of these 3 Regular Expressions is the complement of given language.. 

1 comment

@Arjun sir Is this solution correct? Answer is D,right?
0
0
0 votes
0 votes

This can be regular grammar 

S-->AB 

A--->aaaaA'

A'-->aA/∈

B-->∈/b/bb/bbb

Regular expression will be aaaa(a)*(∈+b+bb+bbb)

The compliement would be bbbb(b)*(∈+a+aa+aaa)

0 votes
0 votes

Answer is (D).

Problem given in peter linz(5th edition) chapter 3.1

 

Look at similar question.

https://gateoverflow.in/57156/ugcnet-june2016-iii-23

edited by

2 Comments

@Kuljeet Shan  

regular expression given in option c is

$(\epsilon+a+aa+aaa)b^*+(a+b)^* ba(a+b)^*$

it can't generate string ​​​​​ aaaaabbbb.

in fact it can't generate all the strings of type $\color{blue}{aaaaa^* bbbbb^*} $   (4 or more a's followed by 4 or more b's).

option D is correct..

​​​​​​option C is only a proper subset of $\bar L$

0
0
Yeah got it. Thanks !
0
0
Answer:

Related questions