Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need solutions for #5, #6, #7, and #8. Emphasis Heading 1 Normal Sesong subtitle

ID: 3795611 • Letter: N

Question


Need solutions for #5, #6, #7, and #8.

Emphasis Heading 1 Normal Sesong subtitle 5 Letxelab, ba) and YHA a, b. List the strings of length 3 in the set 6. Let L Haaaar. La a bkla, bla, b), and La Lar Describe the strings that are in ee languages La, La, and Lt n A regular expression can be defined recursively as (a Base Case: basic elements A and a E E in the alphabet). (b) Recursive union, or expressions, (c) closure starting with basic elements the application of the recursive step a inite number of times is also a regular expressio 7. Give a regular expression for the set of strings over Ha,b.cl in which the total number of b's and c's is three. 8. Give a regular expression for the set of strings over lat) with an even number of as or an odd number of bis

Explanation / Answer

5>
given X = {ab, ba}, y = {, a, b)

You need set of strings of length 3 from X*Y*
so we can have at most one X (since two X will give us string with length 4) followed by one Y, (Since one X will contribute length two, so Y has length 1 at most, so we can add only one Y)
or we can have zero X and three Y's.

Therefore we have
   XY = {aba,baa,abb,bab} (NOTE lamda has length zero so we cannot add)
   YYY = {aaa,aab,aba,abb,baa,bab,bba,bbb}
So the answer is { aaa,aab,aba,abb,baa,bab,bba,bbb } (NOTE: we do not repeat items)


6>
L1 = {aaaa}*, L2 = {a,b}{a,b}{a,b} L3 = (L2)*

therefore
L2 = {aaa,aab,aba,abb,baa,bab,bba,bbb}

L3 = { , L2, L2L2, L2L2L2, ... }
   = { , aaa,aab,aba,abb,baa,bab,bba,bbb, aaaaaa, aaaaab, aaaaaba, ... }

therefore
L1 intersection L2 = { }
L1 intersection L3 = { aaaaaaaaaaaa, ... } or a12*n n is +ve Integer
L2 intersection L2 = { aaa,aab,aba,abb,baa,bab,bba,bbb }

7>
G = a* {b , c} a* {b , c} a* {b , c} a*

8>
logic (strings with even a and even b)* b or (strings with odd a and odd b)* a
G = {aa , bb , abba, abab, baab, baba}*b | {aa , bb , abba, abab, baab, baba}*{ab , ba}{aa , bb , abba, abab, baab, baba}*a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote