{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Module10 - Module 10 Recursive and r.e language classes...

This preview shows pages 1–12. Sign up to view the full content.

1 Module 10 Recursive and r.e. language classes representing solvable and half-solvable problems Proofs of closure properties for the set of recursive (solvable) languages for the set of r.e. (half-solvable) languages Generic Element proof technique

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 RE and REC language classes REC A solvable language is commonly referred to as a recursive language for historical reasons REC is defined to be the set of solvable or recursive languages RE A half-solvable language is commonly referred to as a recursively enumerable or r.e. language RE is defined to be the set of r.e. or half- solvable languages
3 Closure Properties of REC * We now prove REC is closed under two set operations Set Complement Set Intersection In these proofs, we try to highlight intuition and common sense

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 REC and Set Complement REC EVEN All Languages ODD Even : set of even length strings Is Even solvable (recursive)? Give a program P that solves it. Complement of Even ? Odd : set of odd length strings Is Odd recursive (solvable)? Does this prove REC is closed under set complement? How is the program P’ that solves Odd related to the program P that solves Even?
5 P Illustration P Input x Yes/No P’ No/Yes

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Code for P’ bool main(string y) { if (P (y)) return no; else return yes; } bool P (string y) /* details deleted; key fact is P is guaranteed to halt on all inputs */
7 Set Complement Lemma If L is a solvable language, then L complement is a solvable language Proof Let L be an arbitrary solvable language First line comes from For all L in REC Let P be the C++ program which solves L P exists by definition of REC

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Modify P to form P ’ as follows Identical except at very end Complement answer Yes → No No → Yes Program P ’ solves L complement Halts on all inputs Answers correctly Thus L complement is solvable Definition of solvable proof continued
9 REC Closed Under Set Union All Languages L 1 L 2 L 1 U L 2 REC • If L 1 and L 2 are solvable languages, then L 1 U L 2 is a solvable language Proof – Let L 1 and L 2 be arbitrary solvable languages – Let P 1 and P 2 be programs which solve L 1 and L 2 , respectively

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10 REC Closed Under Set Union All Languages L 1 L 2 L 1 U L 2 REC – Construct program P 3 from P 1 and P 2 as follows P 3 solves L 1 U L 2 Halts on all inputs Answers correctly L 1 U L 2 is solvable
11 Yes/No Yes/No P 3 Illustration P 1 P 2 OR Yes/No P 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern