# 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.

## This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.

### Page1 / 41

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

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online