courtesy costas busch - rpi1 recursively enumerable and recursive languages

Download Courtesy Costas Busch - RPI1 Recursively Enumerable and Recursive Languages

Post on 20-Dec-2015

234 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • Courtesy Costas Busch - RPI1 Recursively Enumerable and Recursive Languages
  • Slide 2
  • Courtesy Costas Busch - RPI2 Definition: A language is recursively enumerable if some Turing machine accepts it
  • Slide 3
  • Courtesy Costas Busch - RPI3 For string : Let be a recursively enumerable language and the Turing Machine that accepts it ifthen halts in a final state ifthen halts in a non-final state or loops forever
  • Slide 4
  • Courtesy Costas Busch - RPI4 Definition: A language is recursive if some Turing machine accepts it and halts on any input string In other words: A language is recursive if there is a membership algorithm for it
  • Slide 5
  • Courtesy Costas Busch - RPI5 For string : Let be a recursive language and the Turing Machine that accepts it ifthen halts in a final state ifthen halts in a non-final state
  • Slide 6
  • Courtesy Costas 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
  • Slide 7
  • Courtesy Costas Busch - RPI7 Recursive Recursively Enumerable Non Recursively Enumerable
  • Slide 8
  • Courtesy Costas Busch - RPI8 A Language which is not Recursively Enumerable
  • Slide 9
  • Courtesy Costas Busch - RPI9 We want to find a language that is not Recursively Enumerable This language is not accepted by any Turing Machine
  • Slide 10
  • Courtesy Costas Busch - RPI10 Consider alphabet Strings:
  • Slide 11
  • Courtesy Costas Busch - RPI11 Consider Turing Machines that accept languages over alphabet They are countable:
  • Slide 12
  • Courtesy Costas Busch - RPI12 Example language accepted by Alternative representation
  • Slide 13
  • Courtesy Costas Busch - RPI13
  • Slide 14
  • Courtesy Costas Busch - RPI14 Consider the language consists from the 1s in the diagonal
  • Slide 15
  • Courtesy Costas Busch - RPI15
  • Slide 16
  • Courtesy Costas Busch - RPI16 Consider the language consists of the 0s in the diagonal
  • Slide 17
  • Courtesy Costas Busch - RPI17
  • Slide 18
  • Courtesy Costas Busch - RPI18 Theorem: Language is not recursively enumerable
  • Slide 19
  • Courtesy Costas Busch - RPI19 Proof: is recursively enumerable Assume for contradiction that There must exist some machine that accepts
  • Slide 20
  • Courtesy Costas Busch - RPI20 Question:
  • Slide 21
  • Courtesy Costas Busch - RPI21 Answer:
  • Slide 22
  • Courtesy Costas Busch - RPI22 Question:
  • Slide 23
  • Courtesy Costas Busch - RPI23 Answer:
  • Slide 24
  • Courtesy Costas Busch - RPI24 Question:
  • Slide 25
  • Courtesy Costas Busch - RPI25 Answer:
  • Slide 26
  • Courtesy Costas Busch - RPI26 Similarly: for any Because either: or
  • Slide 27
  • Courtesy Costas Busch - RPI27 Therefore, the machine cannot exist Therefore, the language is not recursively enumerable End of Proof
  • Slide 28
  • Courtesy Costas Busch - RPI28 Observation: There is no algorithm that describes (otherwise would be accepted by some Turing Machine)
  • Slide 29
  • Courtesy Costas Busch - RPI29 Recursive Recursively Enumerable Non Recursively Enumerable
  • Slide 30
  • Courtesy Costas Busch - RPI30 A Language which is Recursively Enumerable and not Recursive
  • Slide 31
  • Courtesy Costas Busch - RPI31 We want to find a language which There is a Turing Machine that accepts the language The machine doesnt halt on some input Is recursively enumerable But not recursive
  • Slide 32
  • Courtesy Costas Busch - RPI32 We will prove that the language Is recursively enumerable but not recursive
  • Slide 33
  • Courtesy Costas Busch - RPI33
  • Slide 34
  • Courtesy Costas Busch - RPI34 The language Theorem: is recursively enumerable
  • Slide 35
  • Courtesy Costas Busch - RPI35 Proof: We will give a Turing Machine that accepts
  • Slide 36
  • Courtesy Costas Busch - RPI36 Turing Machine that accepts For any input string Compute, for which Find Turing machine (using an enumeration procedure for Turing Machines) Simulate on input If accepts, then accept End of Proof
  • Slide 37
  • Courtesy Costas Busch - RPI37 Observation: Recursively enumerable Not recursively enumerable (Thus, also not recursive)
  • Slide 38
  • Courtesy Costas Busch - RPI38 Theorem: The language is not recursive
  • Slide 39
  • Courtesy Costas Busch - RPI39 Proof: Assume for contradiction that is recursive Then is recursive: Take the Turing Machine that accepts halts on any input: If accepts then reject If rejects then accept
  • Slide 40
  • Courtesy Costas Busch - RPI40 Therefore: is recursive But we know: is not recursively enumerable thus, not recursive CONTRADICTION!!!!
  • Slide 41
  • Courtesy Costas Busch - RPI41 Therefore, is not recursive End of Proof
  • Slide 42
  • Courtesy Costas Busch - RPI42 Recursive Recursively Enumerable Non Recursively Enumerable
  • Slide 43
  • Courtesy Costas Busch - RPI43 Turing acceptable languages and Enumeration Procedures
  • Slide 44
  • Courtesy Costas Busch - RPI44 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)
  • Slide 45
  • Courtesy Costas Busch - RPI45 Theorem: if a language is recursive then there is an enumeration procedure for it
  • Slide 46
  • Courtesy Costas Busch - RPI46 Proof: Enumeration Machine Accepts Enumerates all strings of input alphabet
  • Slide 47
  • Courtesy Costas Busch - RPI47 If the alphabet is then can enumerate strings as follows:
  • Slide 48
  • Courtesy Costas Busch - RPI48 Enumeration procedure Repeat: generates a string checks if YES: print to output NO: ignore End of Proof
  • Slide 49
  • Courtesy Costas Busch - RPI49 Example: Enumeration Output
  • Slide 50
  • Courtesy Costas Busch - RPI50 Theorem: if language is recursively enumerable then there is an enumeration procedure for it
  • Slide 51
  • Courtesy Costas Busch - RPI51 Proof: Enumeration Machine Accepts Enumerates all strings of input alphabet
  • Slide 52
  • Courtesy Costas Busch - RPI52 If the alphabet is then can enumerate strings as follows:
  • Slide 53
  • Courtesy Costas Busch - RPI53 Enumeration procedure Repeat:generates a string checks if YES: print to output NO: ignore NAIVE APPROACH Problem: If machine may loop forever
  • Slide 54
  • Courtesy Costas Busch - RPI54 executes first step on BETTER APPROACH Generates second string executes first step on second step on Generates first string
  • Slide 55
  • Courtesy Costas Busch - RPI55 Generates third string executes first step on second step on third step on And so on............
  • Slide 56
  • Courtesy Costas Busch - RPI56 1 Step in string 111 22 22 3333
  • Slide 57
  • Courtesy Costas Busch - RPI57 If for any string machine halts in a final state then it prints on the output End of Proof
  • Slide 58
  • Courtesy Costas Busch - RPI58 Theorem: If for language there is an enumeration procedure then is recursively enumerable
  • Slide 59
  • Courtesy Costas Busch - RPI59 Proof: Input Tape Enumerator for Compare Machine that accepts
  • Slide 60
  • Courtesy Costas Busch - RPI60 Turing machine that accepts Repeat: Using the enumerator, generate the next string of For input string Compare generated string with If same, accept and exit loop End of Proof
  • Slide 61
  • Courtesy Costas Busch - RPI61 We have proven: A language is recursively enumerable if and only if there is an enumeration procedure for it

Recommended

View more >