Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.

Similar presentations


Presentation on theme: "Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also."— Presentation transcript:

1 Prof. Busch - LSU1 Decidable Languages

2 Prof. Busch - LSU2 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 Prof. Busch - LSU3 For any string : halts in an accept state halts in a non-accept state or loops forever

4 Prof. Busch - LSU4 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 Prof. Busch - LSU5 For any string : halts in an accept state halts in a non-accept state Every decidable language is Turing-Acceptable

6 Prof. Busch - LSU6 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 Prof. Busch - LSU7 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 Prof. Busch - LSU8 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 Prof. Busch - LSU9 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 Prof. Busch - LSU10 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 Prof. Busch - LSU11 Is number prime? Corresponding language: Problem: We will show it is decidable

12 Prof. Busch - LSU12 On input number : Divide with all possible numbers between and If any of them divides Then reject Else accept Decider for :

13 Prof. Busch - LSU13 (Input string) is prime? Decider for PRIMES Input number YES NO the decider for the language solves the corresponding problem (Accept) (Reject)

14 Prof. Busch - LSU14 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 Prof. Busch - LSU15 Transform accept state to reject and vice-versa

16 Prof. Busch - LSU16 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 Prof. Busch - LSU17 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 Prof. Busch - LSU18 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 Prof. Busch - LSU19 Decidable Turing-Acceptable Non Turing-Acceptable

20 Prof. Busch - LSU20 A Language which is not Turing Acceptable

21 Prof. Busch - LSU21 Consider alphabet Strings of :

22 Prof. Busch - LSU22 Consider Turing Machines that accept languages over alphabet They are countable: (There is an enumerator that generates them)

23 Prof. Busch - LSU23 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 Prof. Busch - LSU24 Example language accepted by Binary representation

25 Prof. Busch - LSU25 Example of binary representations

26 Prof. Busch - LSU26 Consider the language consists of the 1’s in the diagonal

27 Prof. Busch - LSU27

28 Prof. Busch - LSU28 Consider the language consists of the 0’s in the diagonal

29 Prof. Busch - LSU29

30 Prof. Busch - LSU30 Proof: is Turing-Acceptable Assume for contradiction that There must exist some machine that accepts : Theorem: Language is not Turing-Acceptable

31 Prof. Busch - LSU31 Question:

32 Prof. Busch - LSU32 Answer:

33 Prof. Busch - LSU33 Question:

34 Prof. Busch - LSU34 Answer:

35 Prof. Busch - LSU35 Question:

36 Prof. Busch - LSU36 Answer:

37 Prof. Busch - LSU37 Similarly: for any Because either: or the machine cannot exist is not Turing-Acceptable End of Proof

38 Prof. Busch - LSU38 Decidable Turing-Acceptable Non Turing-Acceptable

39 Prof. Busch - LSU39 A Language which is Turing-Acceptable and Undecidable

40 Prof. Busch - LSU40 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 Prof. Busch - LSU41

42 Prof. Busch - LSU42 The languageTheorem: Is Turing-Acceptable Proof: We will give a Turing Machine that accepts

43 Prof. Busch - LSU43 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 Prof. Busch - LSU44 Observation: Turing-Acceptable Not Turing-acceptable (Thus, is undecidable)

45 Prof. Busch - LSU45 Decidable Turing-Acceptable Non Turing-Acceptable ?

46 Prof. Busch - LSU46 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 Prof. Busch - LSU47 Decidable Turing-Acceptable Not Turing-Acceptable

48 Prof. Busch - LSU48 Turing acceptable languages and Enumerators

49 Prof. Busch - LSU49 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 Prof. Busch - LSU50 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 Prof. Busch - LSU51 Example: alphabet is (proper order) Let be an enumerator that prints all strings from input alphabet in proper order

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

53 Prof. Busch - LSU53 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 Prof. Busch - LSU54 Example: Enumeration Output reject accept reject END OF PROOF

55 Prof. Busch - LSU55 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 Prof. Busch - LSU56 Enumerator for Accepts Enumerates all strings of input alphabet in proper order

57 Prof. Busch - LSU57 Enumerator for Repeat:generates a string checks if YES: print to output NO: ignore NAIVE APPROACH Problem:If machine may loop forever

58 Prof. Busch - LSU58 executes first step on BETTER APPROACH Generates second string executes first step on second step on Generates first string

59 Prof. Busch - LSU59 Generates third string executes first step on second step on third step on And so on............

60 Prof. Busch - LSU60 1 Step in computation of string 111 22 22 3333 String: 4444

61 Prof. Busch - LSU61 If for any string machine halts in an accepting state then print on the output End of Proof

62 Prof. Busch - LSU62 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 Prof. Busch - LSU63 Input Tape Enumerator for Compare Turing Machine that accepts If same, Accept and Halt Give me the next string in the enumeration sequence

64 Prof. Busch - LSU64 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 Prof. Busch - LSU65 By combining the last two theorems, we have proven: A language is Turing-Acceptable if and only if there is an enumerator for it


Download ppt "Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also."

Similar presentations


Ads by Google