Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2006Costas Busch - RPI1 RE languages and Enumerators.

Similar presentations


Presentation on theme: "Fall 2006Costas Busch - RPI1 RE languages and Enumerators."— Presentation transcript:

1 Fall 2006Costas Busch - RPI1 RE languages and Enumerators

2 Fall 2006Costas Busch - RPI2 We will prove: If a language is recursive (or decidable) then there is an enumerator for it A language is recursively enumerable (RE) if and only if there is an enumerator for it (weak result) (strong result)

3 Fall 2006Costas Busch - RPI3 Theorem: if a language is recursive then there is an enumerator for it Proof: Let Turing machine be the decider for Use to build the enumerator for

4 Fall 2006Costas Busch - RPI4 Example: alphabet is (proper order) Let be an enumerator that prints all strings from input alphabet in proper order

5 Fall 2006Costas Busch - RPI5 Enumerator for Repeat: 1. generates a string 2. checks if YES: print to output NO: ignore This part terminates, because is recursive

6 Fall 2006Costas Busch - RPI6 Enumerator for string Give me next string Enumerates all strings of input alphabet Generates all Strings in alphabet If accepts then print to output Tests each string if it is accepted by output All strings of

7 Fall 2006Costas Busch - RPI7 Example: Enumeration Output reject accept reject END OF PROOF

8 Fall 2006Costas Busch - RPI8 Theorem: if language is RE then there is an enumerator for it Proof: Let be the Turing machine that accepts Use to build the enumerator for

9 Fall 2006Costas Busch - RPI9 Enumerator for Accepts Enumerates all strings of input alphabet in proper order Give me next string string

10 Fall 2006Costas Busch - RPI10 Enumerator for Repeat:generates a string checks if YES: print to output NO: ignore NAIVE APPROACH Problem:If machine may loop forever

11 Fall 2006Costas Busch - RPI11 executes first step on BETTER APPROACH Generates second string executes first step on second step on Generates first string

12 Fall 2006Costas Busch - RPI12 Generates third string executes first step on second step on third step on And so on............

13 Fall 2006Costas Busch - RPI13 1 Step in computation of string 111 22 22 3333 String: 4444

14 Fall 2006Costas Busch - RPI14 If for any string machine halts in an accepting state then print on the output End of Proof

15 Fall 2006Costas Busch - RPI15 Theorem: If for language there is an enumerator then is RE Proof: Using the enumerator for we will build a Turing machine that accepts

16 Fall 2006Costas Busch - RPI16 Input Tape Enumerator for Compare Turing Machine that accepts If same, Accept and Halt Give me the next string in the enumeration sequence

17 Fall 2006Costas Busch - RPI17 Turing machine that accepts Loop: Using the enumerator of, generate the next string of For any input string Compare generated string with If same, accept and exit loop End of Proof

18 Fall 2006Costas Busch - RPI18 By combining the last two theorems, we have proven: A language is RE if and only if there is an enumerator for it


Download ppt "Fall 2006Costas Busch - RPI1 RE languages and Enumerators."

Similar presentations


Ads by Google