retagged by
813 views

1 Answer

Best answer
5 votes
5 votes
There are $2$ cases:

1. $n$ and $m$, both are even $\rightarrow (aa)$*$(bb)$*

2.  $n$ and $m$, both are odd $\rightarrow a(aa)$*$b(bb)$*

Regular expression: $\rightarrow (aa)$*$(bb)$* $+$ $a(aa)$*$b(bb)$*

Regular grammer:

$S \rightarrow aaA/aA_{1}/\epsilon$

$A \rightarrow aaA/bbB/\epsilon$

$B \rightarrow bbB/\epsilon$

$A_{1} \rightarrow aaA/bB$
edited by

Related questions

1 votes
1 votes
0 answers
1
gauravkc asked Dec 29, 2017
881 views
0 votes
0 votes
2 answers
2
sanju77767 asked Apr 2, 2018
1,902 views
29791305_10156267704977640_8232384361710835589_n.jpg960x579 25.7 KBplzzz check this A and D are already eliminatedOption B and C are equivalent or not…Any string which ...
3 votes
3 votes
0 answers
3
Arnab Bhadra asked Nov 22, 2017
659 views
L = {w | no of 0's in w != no of 1's in w and w Ɛ(0+1)*}What is the Language L?a. Regularb. CFLC. CSL
0 votes
0 votes
1 answer
4