3,093 views

2 Answers

Best answer
5 votes
5 votes

L={Set of all string in which number of a's are multiple of 3 } and ∑ ={a,b,c}

L={∊,b,bb,bbb,c,c,ccc,aaa,baaa,aaab,aaabc,abaca.....}

Regular Expression=  (  (b+c) + a (b+c)* a (b+c)* a  )*

selected by
0 votes
0 votes

For this, we will get a DFA something like this

We will have 3 states a,b,c

From a to b, one a will come

From b to c, another a will come

And from c to a, we have to come back with a transition a so that number of a gives a mod 3 = 0.

Hence ,

RE = (b* a b* a b* a) * 

edited by

Related questions

1 votes
1 votes
0 answers
1
Tuhin Dutta asked Dec 4, 2017
448 views
why $bb^*$ is $b^*$ and not $b^+$?Ref:$a^*(bb^*a + a)a^*\\=a^*(bb^*+\epsilon)aa^*\\=a^*b^*aa^*\\=a^*b^*a^*a$
2 votes
2 votes
1 answer
2
VS asked Aug 11, 2017
387 views
Complement of : {anbn | n>=0} ?Also tell if it is CFL or CSL?
0 votes
0 votes
1 answer
3
VS asked Aug 11, 2017
357 views
{ambncp|m+n+p>=10} Reg or not ?
3 votes
3 votes
2 answers
4