Question: Problem 5 Let be a finite alphabet. (20 marks) (a) Give a (recursive) definition of a function rev : * ** that reverses a word

 Problem 5 Let be a finite alphabet. (20 marks) (a) Give

Problem 5 Let be a finite alphabet. (20 marks) (a) Give a (recursive) definition of a function rev : * ** that reverses a word in 2%. So for example rev(abbab) = babba; rev (aaab) = baaa. (6 marks) (b) Consider the following (recursive) definition of a function REV : RES + REY: REV(0) = 0 REV(R1 U R2) = REV(R1) U REV(R2) REV(C) = REV(R, .R2) = REV(R2). REV(R) REV(a) = a for all a E REV(R) = (REV(R))* Prove that for all regular expressions E REY, L(REV(E)) = rev(L(E)) := {rev(w) ** : WEL(E)}. (8 marks) (c) Show that the following language is not regular: {w.rev(w): w {a,b}* } (6 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!