1 / 89

Lecture 4: Unsolvable Problems

Lecture 4: Unsolvable Problems. 虞台文. 大同大學資工所 智慧型多媒體研究室. Content. Enumerable and Decidable Sets Algorithm Solvability Problem Reduction Diagonalization Method. Lecture 4: Unsolvable Problems. Enumerable and Decidable Sets. 大同大學資工所 智慧型多媒體研究室. Set Enumerability and Generability.

maylin
Download Presentation

Lecture 4: Unsolvable Problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 4: Unsolvable Problems 虞台文 大同大學資工所 智慧型多媒體研究室

  2. Content • Enumerable and Decidable Sets • Algorithm Solvability • Problem Reduction • Diagonalization Method

  3. Lecture 4: Unsolvable Problems Enumerable and Decidable Sets 大同大學資工所 智慧型多媒體研究室

  4. Set Enumerability and Generability A * is enumerable (generable) if  computable functiong: N* such that If g is not totally defined, then D(g)={0, 1, …, k 1}.

  5. = = = = Enumerable (Generable) The Generation Process A Generate

  6.   = = = Enumerable (Generable) The Enumeration Process A Enumerate 

  7.   = = = Enumerable (Generable) The Enumeration Process Is such a process always terminable? A Enumerate 

  8.   = = = Enumerable (Generable) The Enumeration Process A Enumerate

  9.   = = = Enumerable (Generable) The Labeling Process A Labeling 2

  10. Exercises • Write two algorithms to enumerate (generate) the set of all even numbers of integer in different sequences. • What is difference between ‘countable’ (studied in discrete math) and `enumerable’?

  11. The Countability of Real Number Is R countable? Is (0,1)R countable?

  12. 0 1 2 3 4 … d00 d01 d02 d03 d04 0. f0 … d10 d11 d12 d13 d14 0. f1 … d20 d21 d22 d23 d24 0. f2 … d30 d31 d32 d33 d34 0. f3 … d40 d41 d42 d43 d44 0. f4 … … … … … … … … Prove (0,1)R is uncountable Assume that (0, 1) is countable. Suppose that it is counted as:

  13. 0 1 2 3 4 … d01 d02 d03 d04 0. f0 … d10 d12 d13 d14 0. f1 … d20 d21 d23 d24 0. f2 … d30 d31 d32 d34 0. f3 … d40 d41 d42 d43 0. f4 … … … … … … … Prove (0,1)R is uncountable Assume that (0, 1) is countable. Suppose that it is counted as: Consider the following number: d00 d11 d22 d33 d44 …

  14. 0 1 2 3 4 … d00 d01 d02 d03 d04 0. f0 … d10 d11 d12 d13 d14 0. f1 … d20 d21 d22 d23 d24 0. f2 … d30 d31 d32 d33 d34 0. f3 … d40 d41 d42 d43 d44 0. f4 … … … … … … … … 0. h0 h1 h2 h3 h4 v=fk … … … … … … … Prove (0,1)R is uncountable Assume that (0, 1) is countable. Suppose that it is counted as: Consider the following number: …

  15. 0 1 2 3 4 … d00 d01 d02 d03 d04 0. f0 … d10 d11 d12 d13 d14 0. f1 … d20 d21 d22 d23 d24 0. f2 … d30 d31 d32 d33 d34 0. f3 … d40 d41 d42 d43 d44 0. f4 … … … … … … … … … … … … … … … Prove (0,1)R is uncountable Assume that (0, 1) is countable. Suppose that it is counted as: Consider the following number: … 0. h0 h1 h2 h3 h4 v=fk

  16. 0 1 2 3 4 … d00 d01 d02 d03 d04 0. f0 … d10 d11 d12 d13 d14 0. f1 … d20 d21 d22 d23 d24 0. f2 … d30 d31 d32 d33 d34 0. f3 … d40 d41 d42 d43 d44 0. f4 … … … … … … … … … … … … … … … Prove (0,1)R is uncountable Assume that (0, 1) is countable. Suppose that it is counted as: Consider the following number: … 0. h0 h1 h2 h3 h4 v=fk

  17. A Semidecidability A * is semidecidable if there exists an algorithm which, when applying to any   A, can decide that  is in A, i.e., there exists an membership algorithm for A. True False or Never Halt

  18. Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Ais enumerable  g: N* such that g(N)=A. Hence, given any A, we generate strings . . . . . . . . g(1)=1 g(0)=0 Then, we will finally reach g(k) = k = . This allows us to concludes that A.

  19. We have Want Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Thinking first. What do we know? There exists an membership algorithm  for A on TM such that A is semidecidable How to prove? Find g such that

  20. 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 We have Want Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Numbering the following black cells Preliminaries

  21. 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 7 3 4 5 6 0 1 2 8 9 10 Enumerable We have Want Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Numbering the following black cells Preliminaries 6  = {0, 1} 0 * = {, 0, 1, 00, 01, 10, 11, 000, …} 1 5 2 3 4 7

  22. We have Want Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Step 1. Set n = k + 1. Step 2. List the first n strings Step 3. Hand simulates n steps of  on TM for each The algorithm to generate g(k):

  23. - 0 n1 0 1 2 3 4 5 6 7 8 9 1 2 3 n Steps 4 5 6 7 8 9 10 We have Want Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Step 1. Set n = k + 1. Step 2. List the first n strings Step 3. Hand simulates n steps of  on TM for each The algorithm to generate g(k): Terminating Record

  24. - 0 n1 0 1 2 3 4 5 6 7 8 9 1 2 3 n Steps 4 5 6 7 8 9 10 We have Want Theorem 1 Ais enumerable iff A is semidecidable. “” Pf) Step 1. Set n = k + 1. Step 2. List the first n strings Step 3. Hand simulates n steps of  on TM for each The algorithm to generate g(k): Step 4. Let m=#terminating computations. Step 5. if m < k + 1 n=n + 1; goto Step 2; else return the kth string. k

  25. Theorem 2 Ais enumerable iff A is a domain of some computable functions. Pf) Exercise

  26. Theorem 2 Ais enumerable iff A is a domain of some computable functions. How about if A is not enumerable?

  27. Discussion Enumeration Program Computability (Some reformation may be required) Enumeration Membership Determination (Semidecidability)

  28. Complement Set

  29. Decidable Set A * is decidable if there exists an computable function, say, D such that

  30. Ais decidable iff and are enumerable. Ais decidable iff and are semidecidable. Theorem 3

  31. Ais decidable iff and are 0 1 2 3 4 . . . D: . . . t f t f t . . . g(0) g(1) g(2) enumerable. semidecidable. Theorem 3 Pf) “” • Fact: * can be enumerated as 0, 1, 2, … • Since A is decidable,  a computable function D st. • The computable function g to enumerate A can be: Show that A is enumerable as follows: g: Ais enumerable.

  32. Ais decidable iff and are Show that is enumerable as follows: 0 1 2 3 4 . . . D: . . . t f f t t is enumerable. . . . h(0) h(1) enumerable. semidecidable. Theorem 3 Pf) “” • Fact: * can be enumerated as 0, 1, 2, … • Since A is decidable,  a computable function D st. • The computable function h to enumerate can be: h:

  33. Ais decidable iff and are enumerable. semidecidable. Theorem 3 Pf) “” • Suppose 1 semidecides A, 2 semidecides . • For any *, input it to 1 and 2 simultaneously. • If 1 terminates, return true. • If 2 terminates, return false.

  34. Lecture 4: Unsolvable Problems Algorithm Solvability 大同大學資工所 智慧型多媒體研究室

  35. Enumeration, Decidability and Solvability Enumeration: (Semidecidability) Decidability: To deal with the existence of algorithm (program) to solve problems. Solvability: That is, given a problem, whether there exists a program to solve (any instance of) the problem.

  36. Example Problem (PE: Program Equivalence): PE q = “Are program 1and program 2equivalent?” Any Algorithm?

  37. string to represent 1 string to represent 2 Solvable? Computable? Example Problem (PE: Program Equivalence): PE q = “Are program 1and program 2equivalent?” Decidable?

  38. string to represent 1 string to represent 2 Solvable? Computable? Problem Reformulation Example Problem (PE: Program Equivalence): PE q = “Are program 1and program 2equivalent?” Decidable? Problem PE is solvable iff A is decidable (recursive).

  39. Definitions • Semisolvable: • Solvable: • Totally Unsolvable: if q is true, it answers ‘yes’. if q is false, it may not give answer (never halt).  algorithm if q is true, it answers ‘yes’. if q is false, it answers ‘no’.  algorithm not semisolvale.

  40. Problem and Complement Problem

  41. Problem and Complement Problem Example: Turing Machine Version

  42. Problem and Complement Problem Example: Register Machine Version

  43. P is solvable iff and are semisolvable. Theorem 4 Pf) “” algorithm P such that P is solvable if q is true, it answers ‘yes’. if q is false, it answers ‘no’. To show that P is semisolvable, we need to find a algorithm ’ such that ?

  44. P is solvable iff and are semisolvable. ’: START q false true P  TRUE HALT Theorem 4 Pf) “” algorithm P such that P is solvable if q is true, it answers ‘yes’. if q is false, it answers ‘no’. To show that P is semisolvable, we need to find a algorithm ’ such that It can be

  45. P is solvable iff and are semisolvable. To show that is semisolvable, we need to find a algorithm ” such that ”: START q true false P  TRUE HALT Theorem 4 Pf) “” algorithm P such that P is solvable if q is true, it answers ‘yes’. if q is false, it answers ‘no’. It can be

  46. P is solvable iff and are semisolvable. Theorem 4 Pf) “” To run ’ and ” alternatively, if ’ answers ‘yes’, then ‘yes’; if ” answers ‘yes’, then ‘no’.

  47. P is solvable iff and are semisolvable. Corollary P is semisolvable but not solvable is totally unsolvable.

  48. More simple, The Halting Problem • Register Machine Version • Turing Machine Version

  49. Head S1 S2 … Sk1 Sk Sk+1 … Sn1 Sn Blank Tape Blank Tape START  HALT Theorem 5  The HP (halting problem) is not solvable. 會停嗎? We will prove a simpler version.

  50. Head S1 S2 … Sk1 Sk Sk+1 … Sn1 Sn Blank Tape Blank Tape START  HALT Theorem 5  The HP (halting problem) is not solvable. 會停嗎?

More Related