Question & Answer: For a word x, we use x^r to denote its reverse (e.g., the reverse of abaac is caaba). For a language L, we u…..

3. For a word x, we use to denote its reverse (e.g., the reverse of abaac is caaba). For a language L, we use L to denote [x :r E L. Show that ifL is regular then so is L 4. Assume that L is (aa + bb) c)bc. What is a regular expression for language L?

Just question number 4, thank you

For a word x, we use x^r to denote its reverse (e.g., the reverse of abaac is caaba). For a language L, we use L^r to denote {x^r: x elementof L}. Show that if L is regular then so is L^r. Assume that L is ((aa + bbb)*c)*bc. What is a regular expression for language L^r?

Expert Answer

 

L accepts strings of type

L={cbc,ccbc,aabc,bbbcbc,aacaacbc,bbbbbbcbc,aabbbaacbc……..}

so Lr will be

Lr={cbc,cbcc,cbcbbb,cbcaacaa,cbcbbbbbb,cbcaabbaa,……..}

So regular expression for Lr wiil be

Lr= cb(c(bbb+aa)*)*

Still stressed from student homework?
Get quality assistance from academic writers!