Download presentation

Presentation is loading. Please wait.

1
Reductions

2
**Problem is reduced to problem**

If we can solve problem then we can solve problem

3
Definition: Language is reduced to language There is a computable function (reduction) such that:

4
Recall: Computable function : There is a deterministic Turing machine which for any string computes

5
Theorem: If: a: Language is reduced to b: Language is decidable Then: is decidable Proof: Basic idea: Build the decider for using the decider for

6
**Decider for Reduction compute Decider for END OF PROOF Input string**

YES Input string YES accept accept compute Decider for (halt) (halt) NO NO reject reject (halt) (halt) END OF PROOF

7
Example: is reduced to:

8
**We only need to construct:**

Turing Machine for reduction DFA

9
**Let be the language of DFA**

Turing Machine for reduction DFA construct DFA by combining and so that:

11
Decider for Reduction Input string YES compute YES Decider NO NO

12
**If: a: Language is reduced to b: Language is undecidable **

Theorem (version 1): If: a: Language is reduced to b: Language is undecidable Then: is undecidable (this is the negation of the previous theorem) Proof: Suppose is decidable Using the decider for build the decider for Contradiction!

13
**If is decidable then we can build:**

Decider for Reduction YES Input string YES accept accept compute Decider for (halt) (halt) NO NO reject reject (halt) (halt) CONTRADICTION! END OF PROOF

14
Observation: In order to prove that some language is undecidable we only need to reduce a known undecidable language to

15
State-entry problem Input: Turing Machine State String Question: Does enter state while processing input string ? Corresponding language:

16
Theorem: is undecidable (state-entry problem is unsolvable) Proof: Reduce (halting problem) to (state-entry problem)

17
**Decider for Reduction Compute Decider Given the reduction,**

Halting Problem Decider Decider for state-entry problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

18
**We only need to build the reduction:**

Compute So that:

19
Construct from : special halt state halting states A transition for every unused tape symbol of

20
special halt state halting states halts halts on state

21
**Therefore: halts on input halts on state on input Equivalently:**

END OF PROOF

22
**Blank-tape halting problem**

Input: Turing Machine Question: Does halt when started with a blank tape? Corresponding language:

23
**Theorem: is undecidable Proof: Reduce (halting problem) to**

(blank-tape halting problem is unsolvable) Proof: Reduce (halting problem) to (blank-tape problem)

24
**Decider for Reduction Compute Decider Given the reduction,**

Halting Problem Decider Decider for blank-tape problem decider Reduction YES YES Compute Decider NO NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable

25
**We only need to build the reduction:**

Compute So that:

26
**Construct from : no yes Run with input If halts then halt**

Tape is blank? yes Run Write on tape with input If halts then halt

27
**halts when started on blank tape**

no Tape is blank? yes Run Write on tape with input halts on input halts when started on blank tape

28
**halts when started on blank tape**

halts on input halts when started on blank tape Equivalently: END OF PROOF

29
Theorem (version 2): If: a: Language is reduced to b: Language is undecidable Then: is undecidable Proof: Suppose is decidable Then is decidable Using the decider for build the decider for Contradiction!

30
Suppose is decidable reject Decider for (halt) accept (halt)

31
**Suppose is decidable Then is decidable Decider for Decider for**

(we have proven this in previous class) Decider for NO YES reject accept Decider for (halt) (halt) YES NO accept reject (halt) (halt)

32
**If is decidable then we can build:**

Decider for Reduction YES Input string YES accept accept compute Decider for (halt) (halt) NO NO reject reject (halt) (halt) CONTRADICTION!

33
**Alternatively: Decider for Reduction compute Decider for**

NO Input string YES reject accept compute Decider for (halt) (halt) YES NO accept reject (halt) (halt) CONTRADICTION! END OF PROOF

34
**that some language is undecidable we only need to reduce some **

Observation: In order to prove that some language is undecidable we only need to reduce some known undecidable language to or to (theorem version 1) (theorem version 2)

35
**Undecidable Problems for Turing Recognizable languages**

Let be a Turing-acceptable language is empty? is regular? has size 2? All these are undecidable problems

36
**Let be a Turing-acceptable language**

is empty? is regular? has size 2?

37
**Empty language problem**

Input: Turing Machine Question: Is empty? Corresponding language:

38
**(empty language problem)**

Theorem: is undecidable (empty-language problem is unsolvable) Proof: Reduce (membership problem) to (empty language problem)

39
**Decider for Reduction Compute Decider Given the reduction,**

membership problem decider Decider for empty problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

40
**We only need to build the reduction:**

Compute So that:

41
**Construct from : Tape of input string yes write skip input run on tape**

on input yes If accepts ? then accept

42
**Tape of yes write skip input run on tape string on input If accepts ?**

then accept

43
**Tape of yes write skip input run on tape string on input If accepts ?**

then accept

44
**During this phase this area is not touched**

working area of skip input string write on tape run on input yes If accepts ? then accept

45
**Simply check if entered an accept state**

altered skip input string write on tape run on input yes If accepts ? then accept

46
**Now check input string yes write skip input run on tape string**

on input yes If accepts ? then accept

47
**The only possible accepted string**

t r o y skip input string write on tape run on input yes If accepts ? then accept

48
**yes accepts does not accept write skip input run on tape string**

on input yes If accepts ? then accept

49
Therefore: accepts Equivalently: END OF PROOF

50
**Let be a Turing-acceptable language**

is empty? is regular? has size 2?

51
**Regular language problem**

Input: Turing Machine Question: Is a regular language? Corresponding language:

52
**(regular language problem)**

Theorem: is undecidable (regular language problem is unsolvable) Proof: Reduce (membership problem) to (regular language problem)

53
**Decider for Reduction Compute Decider Given the reduction,**

membership problem decider Decider for regular problem decider Reduction YES YES Compute Decider NO NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable

54
**We only need to build the reduction:**

Compute So that:

55
**Construct from : Tape of input string yes write skip input run on tape**

on input yes If has the form accepts ? then accept

56
**yes not regular accepts does not accept regular write skip input run**

string write on tape run on input yes If has the form accepts ? then accept

57
Therefore: accepts is not regular Equivalently: END OF PROOF

58
**Let be a Turing-acceptable language**

is empty? is regular? has size 2?

59
**Corresponding language:**

Size2 language problem Input: Turing Machine Question: Does have size 2? (accepts exactly two strings?) Corresponding language:

60
**(size 2 language problem)**

Theorem: is undecidable (regular language problem is unsolvable) Proof: Reduce (membership problem) to (size 2 language problem)

61
**Decider for Reduction Compute Decider Given the reduction,**

membership problem decider Decider for size2 problem decider Reduction YES YES Compute Decider NO NO Given the reduction, If is decidable, then is decidable A contradiction! since is undecidable

62
**We only need to build the reduction:**

Compute So that:

63
**Construct from : Tape of input string yes write skip input run on tape**

on input yes If accepts ? then accept

64
**yes 2 strings accepts does not accept 0 strings write skip input run**

on tape run on input yes If accepts ? then accept

65
Therefore: accepts has size 2 Equivalently: END OF PROOF

66
RICE’s Theorem Undecidable problems: is empty? is regular? has size 2? This can be generalized to all non-trivial properties of Turing-acceptable languages

67
**Non-trivial property:**

A property possessed by some Turing-acceptable languages but not all Example: : is empty? YES NO NO

68
**More examples of non-trivial properties:**

: is regular? YES YES NO : has size 2? NO NO YES

69
Trivial property: A property possessed by ALL Turing-acceptable languages Examples: : has size at least 0? True for all languages : is accepted by some Turing machine? True for all Turing-acceptable languages

70
**We can describe a property as the set**

of languages that possess the property If language has property then Example: : is empty? YES NO NO

71
Example: Suppose alphabet is : has size 1? NO YES NO NO

72
**Non-trivial property problem**

Input: Turing Machine Question: Does have the non-trivial property ? Corresponding language:

73
**Rice’s Theorem: is undecidable Proof: Reduce (membership problem) to**

(the non-trivial property problem is unsolvable) Proof: Reduce (membership problem) to or

74
We examine two cases: Case 1: Examples: : is empty? : is regular? Case 2: Example: : has size 2?

75
**Case 1: Since is non-trivial, there is a Turing-acceptable language**

such that: Let be the Turing machine that accepts

76
Reduce (membership problem) to

77
**Decider for Reduction Compute Decider Given the reduction,**

membership problem decider Decider for Non-trivial property problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

78
**We only need to build the reduction:**

Compute So that:

79
**Construct from : Tape of input string yes write skip input run on tape**

on input If yes accepts ? then accept

80
**For this phase we can run machine that accepts , with input string**

skip input string write on tape run on input If yes accepts ? then accept

81
**yes accepts does not accept write skip input run on tape string**

on input If yes accepts ? then accept

82
Therefore: accepts Equivalently:

83
**Case 2: Since is non-trivial, there is a Turing-acceptable language**

such that: Let be the Turing machine that accepts

84
Reduce (membership problem) to

85
**Decider for Reduction Compute Decider Given the reduction,**

membership problem decider Decider for Non-trivial property problem decider Reduction YES YES Compute Decider NO NO Given the reduction, if is decidable, then is decidable A contradiction! since is undecidable

86
**We only need to build the reduction:**

Compute So that:

87
**Construct from : Tape of input string yes write skip input run on tape**

on input If yes accepts ? then accept

88
**yes accepts does not accept write skip input run on tape string**

on input If yes accepts ? then accept

89
Therefore: accepts Equivalently: END OF PROOF

90
This Summary is an Online Content from this Book: Michael Sipser, Introduction to the Theory of Computation, 2ndEdition It is edited for Computation Theory Course by: T.Mariah Sami Khayat Teacher Adam University College For Contacting: Kingdom of Saudi Arabia Ministry of Education Umm AlQura University Adam University College Computer Science Department المملكة العربية السعودية وزارة التعليم جامعة أم القرى الكلية الجامعية أضم قسم الحاسب الآلي

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google