Download presentation

Presentation is loading. Please wait.

Published byRegina Vassell Modified over 3 years ago

1
Fall 2006Costas Busch - RPI1 Decidable Languages

2
Fall 2006Costas Busch - RPI2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also known as: Turing-Recognizable or Recursively-enumerable languages

3
Fall 2006Costas Busch - RPI3 For any string : halts in an accept state halts in a non-accept state or loops forever

4
Fall 2006Costas Busch - RPI4 Definition: A language is decidable if there is a Turing machine (decider) which accepts and halts on every input string Also known as recursive languages

5
Fall 2006Costas Busch - RPI5 For any string : halts in an accept state halts in a non-accept state Every decidable language is Turing-Acceptable

6
Fall 2006Costas Busch - RPI6 Sometimes, it is convenient to have Turing machines with single accept and reject states These are the only halting states That result to possible halting configurations

7
Fall 2006Costas Busch - RPI7 We can convert any Turing machine to have single accept and reject states Old machine New machine Multiple accept states For each tape symbol One accept state

8
Fall 2006Costas Busch - RPI8 For all tape symbols not used for read in the other transitions of Old machine New machine Multiple reject states One reject state Do the following for each possible halting state: For each

9
Fall 2006Costas Busch - RPI9 Input string Accept Reject Decider for Decision On Halt: For a decidable language : For each input string, the computation halts in the accept or reject state

10
Fall 2006Costas Busch - RPI10 Input string Turing Machine for For a Turing-Acceptable language : It is possible that for some input string the machine enters an infinite loop

11
Fall 2006Costas Busch - RPI11 Is number prime? Corresponding language: Problem: We will show it is decidable

12
Fall 2006Costas Busch - RPI12 On input number : Divide with all possible numbers between and If any of them divides Then reject Else accept Decider for :

13
Fall 2006Costas Busch - RPI13 (Input string) is prime? Decider for PRIMES Input number YES NO the decider for the language solves the corresponding problem (Accept) (Reject)

14
Fall 2006Costas Busch - RPI14 Theorem: If a language is decidable, then its complement is decidable too Proof: Build a Turing machine that accepts and halts on every input string ( is decider for )

15
Fall 2006Costas Busch - RPI15 Transform accept state to reject and vice-versa

16
Fall 2006Costas Busch - RPI16 Accepts and halts on every input string 1. Let be the decider for If accepts then reject If rejects then accept Turing Machine On each input string do: 2. Run with input string END OF PROOF

17
Fall 2006Costas Busch - RPI17 Undecidable Languages An undecidable language has no decider: There is a language which is Turing-Acceptable and undecidable We will show that: each Turing machine that accepts does not halt on some input string

18
Fall 2006Costas Busch - RPI18 We will prove that there is a language : is not Turing-acceptable (not accepted by any Turing Machine) is Turing-acceptable Therefore, is undecidable the complement of a decidable language is decidable

19
Fall 2006Costas Busch - RPI19 Decidable Turing-Acceptable Non Turing-Acceptable

20
Fall 2006Costas Busch - RPI20 A Language which is not Turing Acceptable

21
Fall 2006Costas Busch - RPI21 Consider alphabet Strings of :

22
Fall 2006Costas Busch - RPI22 Consider Turing Machines that accept languages over alphabet They are countable: (There is an enumerator that generates them)

23
Fall 2006Costas Busch - RPI23 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

24
Fall 2006Costas Busch - RPI24 Example language accepted by Binary representation

25
Fall 2006Costas Busch - RPI25 Example of binary representations

26
Fall 2006Costas Busch - RPI26 Consider the language consists of the 1’s in the diagonal

27
Fall 2006Costas Busch - RPI27

28
Fall 2006Costas Busch - RPI28 Consider the language consists of the 0’s in the diagonal

29
Fall 2006Costas Busch - RPI29

30
Fall 2006Costas Busch - RPI30 Proof: is Turing-Acceptable Assume for contradiction that There must exist some machine that accepts : Theorem: Language is not Turing-Acceptable

31
Fall 2006Costas Busch - RPI31 Question:

32
Fall 2006Costas Busch - RPI32 Answer:

33
Fall 2006Costas Busch - RPI33 Question:

34
Fall 2006Costas Busch - RPI34 Answer:

35
Fall 2006Costas Busch - RPI35 Question:

36
Fall 2006Costas Busch - RPI36 Answer:

37
Fall 2006Costas Busch - RPI37 Similarly: for any Because either: or the machine cannot exist is not Turing-Acceptable End of Proof

38
Fall 2006Costas Busch - RPI38 Decidable Turing-Acceptable Non Turing-Acceptable

39
Fall 2006Costas Busch - RPI39 A Language which is Turing-Acceptable and Undecidable

40
Fall 2006Costas Busch - RPI40 There is a Turing machine that accepts Each machine that accepts doesn’t halt on some input string Is Turing- Acceptable Undecidable We will prove that the language

41
Fall 2006Costas Busch - RPI41

42
Fall 2006Costas Busch - RPI42 The languageTheorem: Is Turing-Acceptable Proof: We will give a Turing Machine that accepts

43
Fall 2006Costas Busch - RPI43 Turing Machine that accepts For any input string Compute, for which Find Turing machine (using the enumerator for Turing Machines) Simulate on input If accepts, then accept End of Proof

44
Fall 2006Costas Busch - RPI44 Observation: Turing-Acceptable Not Turing-acceptable (Thus, is undecidable)

45
Fall 2006Costas Busch - RPI45 Decidable Turing-Acceptable Non Turing-Acceptable ?

46
Fall 2006Costas Busch - RPI46 Theorem: is undecidable Proof: If is decidable Then is decidable Contradiction!!!! However, is not Turing-Acceptable! the complement of a decidable language is decidable

47
Fall 2006Costas Busch - RPI47 Decidable Turing-Acceptable Not Turing-Acceptable

48
Fall 2006Costas Busch - RPI48 Turing acceptable languages and Enumerators

49
Fall 2006Costas Busch - RPI49 We will prove: If a language is decidable then there is an enumerator for it A language is Turing-acceptable if and only if there is an enumerator for it (weak result) (strong result)

50
Fall 2006Costas Busch - RPI50 Theorem: if a language is decidable then there is an enumerator for it Proof: Let be the decider for Use to build the enumerator for

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

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

53
Fall 2006Costas Busch - RPI53 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

54
Fall 2006Costas Busch - RPI54 Example: Enumeration Output reject accept reject END OF PROOF

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

56
Fall 2006Costas Busch - RPI56 Enumerator for Accepts Enumerates all strings of input alphabet in proper order

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

58
Fall 2006Costas Busch - RPI58 executes first step on BETTER APPROACH Generates second string executes first step on second step on Generates first string

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

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

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

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

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

64
Fall 2006Costas Busch - RPI64 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

65
Fall 2006Costas Busch - RPI65 By combining the last two theorems, we have proven: A language is Turing-Acceptable if and only if there is an enumerator for it

Similar presentations

Presentation is loading. Please wait....

OK

Courtesy Costas Busch - RPI1 A Universal Turing Machine.

Courtesy Costas Busch - RPI1 A Universal Turing Machine.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on job rotation examples Ppt on waxes are lipids Ppt on world environment day posters Ppt on x ray film processing Ppt on electronic media in india Ppt on astronomy and astrophysics news Ppt on indian politics quiz Ppt on energy conservation and management Ppt on switching devices for communicating Ppt on dressing etiquettes