For each of the following regular expressions over the alphabet {a, b}, say whet
ID: 3704339 • Letter: F
Question
For each of the following regular expressions over the alphabet {a, b}, say whether each one of the following strings is an element of the language described by the regular expression. Justifications aren’t required for credit for this question, but it’s good practice to think about how you would explain why your answer is correct
1. (10 points) For each of the following regular expressions over the alphabet fa, b), say whether each one of the following strings is an element of the language described by the regular expression. Justifications aren't required for credit for this question, but it's good practice to think about how you would explain why your answer is correct. a. Regular expression: (aUb). Strings(1) E (2) ab (3) bba b. Regular expression: aa Ubb. Strings: (1) (2) aa (3) ba c. Regular expression: (aUb)o (bua). Strings: (1) e (2) a (3) abba (4) bbbExplanation / Answer
RE(Regular Expression Solution given Below
a) RE (aUb)*=(a+b)*
{?,a,aa,ab,ba,aa*,aab,b,bb,ab,bba.........................}
1) ? is element of RE
2) ab is element of RE
3)abb is element of RE
.....................................................................................................................
b)aa*U bb*
aa*={a,aa,aaa,aaaa,aaaa............}
bb*={b,bb,bbb,bbb...........}
aa* U bb*={a,aa,aaa,aaaa,aaaa............,{b,bb,bbb,bbb...........}
1)? is not element of RE
2) aa is element of RE
3)ba is not element of RE
.......................................................................................................................................
c) (a U b*).(bUa*)=
aU b*={?,a,b,bb,bbb,bbbb,...............................}
bU a*={?,b,a,aa,aaa,aaaa,aaaaa....................}
(a U b*).(b U a*)={,?,a,ab,aa,aaa,aaaaa,b,bb,ba,baa,..bbb,bba,bbbaaaa....}
1)? is element of RE
2) a is element of RE
3)abba is not element of RE
4)bbb is element of RE
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.