Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.

Slides:



Advertisements
Similar presentations
Fall 2006Costas Busch - RPI1 A Universal Turing Machine.
Advertisements

Linear Bounded Automata LBAs
Fall 2006Costas Busch - RPI1 Decidable Languages.
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
More Turing Machines Sipser 3.2 (pages ).
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Recursively Enumerable and Recursive Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Linear Bounded Automata LBAs
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
A Universal Turing Machine
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Recursively Enumerable and Recursive Languages
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Chapters 11 and 12 Decision Problems and Undecidability.
A Universal Turing Machine
Recursively Enumerable Languages
Recursively Enumerable and Recursive Languages
Busch Complexity Lectures: Turing Machines
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Turing Machines Acceptors; Enumerators
Decidability and Enumerability
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
The Off-Line Machine Input File read-only (once) Input string
Turing acceptable languages and Enumerators
Undecidable problems:
Formal Languages, Automata and Models of Computation
Recall last lecture and Nondeterministic TMs
Formal Definitions for Turing Machines
Presentation transcript:

Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages

Fall 2005Costas Busch - RPI2 Definition: A language is recursively enumerable if there is a Turing machine that accepts it Also known as: Turing Recognizable languages orTuring Acceptable languages

Fall 2005Costas Busch - RPI3 For any string : Let be a recursively enumerable language and the Turing Machine that accepts it ifthen halts in an accept state if then halts in a non-accept state or loops forever

Fall 2005Costas Busch - RPI4 Definition: A language is recursive if there is a Turing machine accepts it and the machine halts on every input string Also known as decidable languages

Fall 2005Costas Busch - RPI5 For any string : Let be a recursive language that accepts such that: ifthen halts in an accept state ifthen halts in a non-accept state Then there is a Turing machine

Fall 2005Costas Busch - RPI6 We will prove: 1. There is a specific language which is not recursively enumerable (not accepted by any Turing Machine) 2. There is a specific language which is recursively enumerable but not recursive

Fall 2005Costas Busch - RPI7 Recursive Recursively Enumerable Non Recursively Enumerable

Fall 2005Costas Busch - RPI8 A Language which is not Recursively Enumerable

Fall 2005Costas Busch - RPI9 Consider alphabet Strings:

Fall 2005Costas Busch - RPI10 Consider Turing Machines that accept languages over alphabet They are countable: (There is an enumeration procedure that generates them)

Fall 2005Costas Busch - RPI11 Each machine accepts some language over Note that it is possible to have Since, a language could be accepted by more than one Turing machine for

Fall 2005Costas Busch - RPI12 Example language accepted by Binary representation

Fall 2005Costas Busch - RPI13 Example of binary representations

Fall 2005Costas Busch - RPI14 Consider the language consists of the 1’s in the diagonal

Fall 2005Costas Busch - RPI15

Fall 2005Costas Busch - RPI16 Consider the language consists of the 0’s in the diagonal

Fall 2005Costas Busch - RPI17

Fall 2005Costas Busch - RPI18 Proof: is recursively enumerable Assume for contradiction that There must exist some machine that accepts : Theorem: Language is not recursively enumerable

Fall 2005Costas Busch - RPI19 Question:

Fall 2005Costas Busch - RPI20 Answer:

Fall 2005Costas Busch - RPI21 Question:

Fall 2005Costas Busch - RPI22 Answer:

Fall 2005Costas Busch - RPI23 Question:

Fall 2005Costas Busch - RPI24 Answer:

Fall 2005Costas Busch - RPI25 Similarly: for any Because either: or the machine cannot exist is not recursively enumerable End of Proof

Fall 2005Costas Busch - RPI26 Recursive Recursively Enumerable Non Recursively Enumerable

Fall 2005Costas Busch - RPI27 A Language which is Recursively Enumerable and not Recursive

Fall 2005Costas Busch - RPI28 There is a Turing Machine that accepts Every machine that accepts doesn’t halt on some input string Is recursively enumerable But not recursive We will prove that the language

Fall 2005Costas Busch - RPI29

Fall 2005Costas Busch - RPI30 The languageTheorem: is recursively enumerable Proof: We will give a Turing Machine that accepts

Fall 2005Costas Busch - RPI31 Turing Machine that accepts For any input string Compute, for which Find Turing machine (using the enumeration procedure for Turing Machines) Simulate on input If accepts, then accept End of Proof

Fall 2005Costas Busch - RPI32 Observation: Recursively enumerable Not recursively enumerable (Thus, is not recursive either)

Fall 2005Costas Busch - RPI33 Theorem: If a language is recursive, then its complement is recursive too Proof: Build a Turing machine that accepts and halts on every input

Fall 2005Costas Busch - RPI34 (accepts and halts on every input string) 1. Let be the Turing machine that accepts and halts on every input string If accepts then reject If rejects then accept Turing Machine On any input string do: 2. Run with input string

Fall 2005Costas Busch - RPI35 For all tape symbols not read in the other transitions of Transform to END OF PROOF

Fall 2005Costas Busch - RPI36 Theorem: is not a recursive language Proof: If is recursive Then is recursive The complement of a recursive language is recursive Contradiction!!!! However, is not Turing acceptable!

Fall 2005Costas Busch - RPI37 Recursive Recursively Enumerable Non Recursively Enumerable

Fall 2005Costas Busch - RPI38 Turing acceptable languages and Enumeration Procedures

Fall 2005Costas Busch - RPI39 We will prove: If a language is recursive then there is an enumeration procedure for it A language is recursively enumerable if and only if there is an enumeration procedure for it (weak result) (strong result)

Fall 2005Costas Busch - RPI40 Theorem: if a language is recursive then there is an enumeration procedure for it Proof: Let be the Turing machine that accepts and halts on every input Use to build the enumeration procedure for

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

Fall 2005Costas Busch - RPI42 Enumeration procedure for Repeat: generates a string checks if YES: print to output NO: ignore This part terminates, because is recursive

Fall 2005Costas Busch - RPI43 Enumeration Machine 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

Fall 2005Costas Busch - RPI44 Example: Enumeration Output reject accept reject END OF PROOF

Fall 2005Costas Busch - RPI45 Theorem: if language is recursively enumerable then there is an enumeration procedure for it Proof: Let be the Turing machine that accepts Use to build the enumeration procedure for

Fall 2005Costas Busch - RPI46 Enumeration Machine for Accepts Enumerates all strings of input alphabet in proper order

Fall 2005Costas Busch - RPI47 Enumeration procedure for Repeat:generates a string checks if YES: print to output NO: ignore NAIVE APPROACH Problem: If machine may loop forever

Fall 2005Costas Busch - RPI48 executes first step on BETTER APPROACH Generates second string executes first step on second step on Generates first string

Fall 2005Costas Busch - RPI49 Generates third string executes first step on second step on third step on And so on

Fall 2005Costas Busch - RPI50 1 Step in computation of string String: 4444

Fall 2005Costas Busch - RPI51 If for any string machine halts in an accepting state then it prints on the output End of Proof

Fall 2005Costas Busch - RPI52 Theorem: If for language there is an enumeration procedure then is recursively enumerable Proof: Using the enumerator for we will build a Turing machine that accepts

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

Fall 2005Costas Busch - RPI54 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

Fall 2005Costas Busch - RPI55 By Combining the last two theorems, we have proven: A language is recursively enumerable if and only if there is an enumeration procedure for it