1.Give the English description of the following regular expression.
i. r=a(a+b)∗ab
ii. r=a∗b+b∗a
iii. r=(aa+b)∗(bb+a)∗
2.Find the regular expression defining each of the following language over E=[a,b].
i. All strings that do not end in a double letters.
ii. all strings in which letter never triples
iii. All strings in which 'a' is triple or 'b' is triple.
1
Expert's answer
2021-07-09T14:19:45-0400
i)
(a + b)*(ab + ba) + a + b + /\
ii)
(/\ + b + bb)(a + ab + abb)*
iii)
(/\ + b + bb)(a + ab + abb)*aaa(/\ + b + bb)(a + ab + abb)* +(/\ + a + aa)(b + ba + baa)*bbb(/\ + a + aa)(b + ba + baa)*
Comments
Leave a comment