edited by
2,523 views
2 votes
2 votes

Find a regular expression over Σ ={a,b,c} for all strings that contain no run of a's of length greater than 2. 

Here a run in a string is a sub string of length at least two as long as possible and consisting entirely of the same symbol. For eg, the string abbbaab contains a run of b's of length three and a tun of a's of length two.

edited by

3 Answers

Best answer
4 votes
4 votes

(b+c+ab+ac+aab+aac)*(∊+a+aa)

selected by
0 votes
0 votes

Is this correct?

( (b+c) (b+c)* (aa +a) )*(λ+b+c)  +a+λ

edited by

Related questions

4 votes
4 votes
1 answer
1
1 votes
1 votes
2 answers
3
1 votes
1 votes
1 answer
4
Naveen Kumar 3 asked Mar 31, 2019
1,847 views
Find regular expressions for the following languages on {$a, b$}.(a) $L =$ {$w : |w|$ mod $3 = 0$}.(b) $L =$ {$w : n_a (w)$ mod $3 = 0$}.(c) $L =$ {$w : n_a (w)$ mod $5 ...