undecidable problems i
play

Undecidable problems I There quite a few undecidable problems For - PowerPoint PPT Presentation

Undecidable problems I There quite a few undecidable problems For example, program verification is in general not solvable We will discuss an undecidable example called the halting problem November 17, 2020 1 / 11 A TM I A TM = { M ,


  1. Undecidable problems I There quite a few undecidable problems For example, program verification is in general not solvable We will discuss an undecidable example called the “halting problem” November 17, 2020 1 / 11

  2. A TM I A TM = {� M , w � | M : a TM that accepts w } We will prove that A TM is undecidable However, A TM is Turing recognizable We can simply simulate � M , w � To be decidable we hope to avoid an infinite loop if at one point, know it cannot halt ⇒ reject Thus this problem is called the halting problem November 17, 2020 2 / 11

  3. Diagonalization method I We need a technique called “diagonalization method” for the proof It was developed by Cantor in 1873 to check if two infinite sets are equal Example: consider set of even integers versus set of { 0 , 1 } ∗ Both are infinite sets. Which one is larger ? Definition: two sets are equal if elements can be paired November 17, 2020 3 / 11

  4. Definition 4.12 I f is a one-to-one function if: f ( a ) � = f ( b ) if a � = b y y x x Left: a one-to-one function; right: not November 17, 2020 4 / 11

  5. Definition 4.12 II f : A → B onto if ∀ b ∈ B , ∃ a such that f ( a ) = b Example: f ( a ) = a 2 , where A = ( −∞ , ∞ ) and B = ( −∞ , ∞ ) This is not an onto function because for b = − 1, there is no a such that f ( a ) = b November 17, 2020 5 / 11

  6. Definition 4.12 III However, if we change it to f ( a ) = a 2 , where A = ( −∞ , ∞ ) and B = [0 , ∞ ) it becomes an onto function Definition: a function is called a correspondence if it is one-to-one and onto Example: f ( a ) = a 3 , where A = ( −∞ , ∞ ) and B = ( −∞ , ∞ ) November 17, 2020 6 / 11

  7. Example 4.13 I N = { 1 , 2 , . . . } E = { 2 , 4 , . . . } The two sets can be paired n f ( n ) = 2 n 1 2 2 4 . . . . . . We consider N and E have the same size Definition: a set is countable if it is finite or same size as N November 17, 2020 7 / 11

  8. Rational Numbers Countable I Q = { m / n | m , n ∈ N } countable 1 1 1 1 1 1 · · · 1 2 3 4 5 6 2 2 2 2 2 2 · · · 1 2 3 4 5 6 3 3 3 3 3 3 · · · 1 2 3 4 5 6 4 4 4 4 4 4 · · · 1 2 3 4 5 6 5 5 5 5 5 5 · · · 1 2 3 4 5 6 . . . . . . . . . . . . . . . . . . November 17, 2020 8 / 11

  9. Rational Numbers Countable II (Latex source from https://divisbyzero.com/2013/04/16/ countability-of-the-rationals-drawn-using-tikz/ ) Note that we skip counting elements with common factors (e.g., 2 / 2) November 17, 2020 9 / 11

  10. Real Numbers not Countable I We will use the diagonalization method The proof is by contradiction Assume R is countable. Then there is a table as follows n f ( n ) 1 3.14159 . . . 2 55.55555 . . . 3 0.12345 . . . 4 0.50000 . . . . . . November 17, 2020 10 / 11

  11. Real Numbers not Countable II Consider x = 0 . 4641 . . . 4 � = 1 , 6 � = 5 We have x � = f ( n ) , ∀ n But x ∈ R , so a contradiction To avoid the problem 1 = 0 . 9999 · · · for every digit of x we should not choose 0 or 9 November 17, 2020 11 / 11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend