in Theory of Computation retagged by
1,134 views
6 votes
6 votes
L1 ={ a^pb^q | p+q>=10^6}

L2= { a^mb^n | m-n>=10^6}

i m not getting this can someone help me with this
in Theory of Computation retagged by
1.1k views

2 Answers

8 votes
8 votes
Best answer

L1 ={ a^pb^q | p+q>=10^6}
 

  • Then Complement of L1 will be :
  • L1' ={ a^pb^q | p+q<10^6}
  • And we can do that with Finite Amount of States.
  • So L1' is Regular.Hence L1 is Also Regular.

(Applying Closure Property of Complementation)

L2={ a^mb^n | m-n>=10^6} 

  • We can do this with the help of Single Stack, Hence it is CFL.
selected by

4 Comments

Welcome Sir !!!!

0
0

@Jason GATE Sir, can you draw NFA for that?

0
0
How 2nd one is CFG....??
0
0
2 votes
2 votes
l1  is regular as we can make dfa for it
l2 is cfl because there is one comparison .

Related questions