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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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?
Background image of page 4
5 P Illustration P Input x Yes/No P’ No/Yes
Background image of page 5

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

View Full DocumentRight Arrow Icon
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 */
Background image of page 6
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
Background image of page 7

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

View Full DocumentRight Arrow Icon
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
Background image of page 8
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
Background image of page 9

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

View Full DocumentRight Arrow Icon
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
Background image of page 10
11 Yes/No Yes/No P 3 Illustration P 1 P 2 OR Yes/No P 3
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
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 Right Arrow Icon
Ask a homework question - tutors are online