3,848 views
4 votes
4 votes
L={a^m b^n | m-n=even}

Is this language a regular language?

3 Answers

Best answer
6 votes
6 votes

I think its regular check the below DFA-

selected by
2 votes
2 votes

Adding to the answer by Shubhgupta,

Regular Expression is (aa)*(bb)*+a(aa)*b(bb)*

Corresponding Minimal DFA is :
 

0 votes
0 votes
To really solve it fast, we can proceed like.

Only even-even or odd-odd=even

So we can keep track of number of ‘a’ in dfa. So if we land up on odd number of ‘a’ state we go to a loop where b needs to be odd too otherwise it will land up on non-final state. Similarly for even number of ‘a’.

Therefore regular.

Related questions

2 votes
2 votes
2 answers
1
Na462 asked Sep 13, 2018
670 views
Is the given Grammer represent a regular language ?S->AaBA->aC | epsilonB->aB | bB | epsilonC->aCb | epsilon
1 votes
1 votes
1 answer
2
Na462 asked Sep 11, 2018
1,550 views
Is Language L = {0(n+m) 1(k+l) | m = l, and m,n,k,l ≥ 1 } a regular language ? explain
0 votes
0 votes
1 answer
4
M_Umair_Khan42900 asked Dec 29, 2022
754 views
Show that the following pairs of regular expressions define the same language over the alphabet I = [a, b].s(a) p(pp)*( A + p)q + q and p*q(b) A +0(0+1)* + (0+1)* 00(0+1)...