Give formal definition of the regular language generated by the following Regular Expressions:
1) ((ab*+a)*+ab)
2) (a+b)*c(a+b)*
3) (ab)*+a*b
Ans:
Given Expression:
Expression |
Formal definition |
((ab*+a)*+ab) |
A language which accepts from a given Set of strings a,b where the generated string starts by a. Example: { a,ab,aab,aaaa,aaaaab,ab,ab,abbbbaba…} |
(a+b)*c(a+b)* |
A language which accepts from a given Set of strings a,b where the generated string starts must contain c as substring {c,acb,abcbc,aacbb,aacbb…….} |
(ab)*+a*b |
A language which accepts from a given Set of strings a,b where the generated string contains any length of consecutive a must followed by single b. Example: {b,ab,aab,abab,aabab..aaaabababa….} Note: {b, here consecutive a length =0 } |
Get Answers For Free
Most questions answered within 1 hours.