undecidable languages chapter 4 2 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Undecidable Languages (Chapter 4.2) PowerPoint Presentation
Download Presentation
Undecidable Languages (Chapter 4.2)

Loading in 2 Seconds...

play fullscreen
1 / 23

Undecidable Languages (Chapter 4.2) - PowerPoint PPT Presentation


  • 86 Views
  • Uploaded on

Undecidable Languages (Chapter 4.2). H éctor Muñoz-Avila. Undecidable Languages. We are going to make 2 proofs: An existence proof: We show that a language L must exist that cannot be decided/recognized with Turing machines without actually showing L A constructive proof

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Undecidable Languages (Chapter 4.2)' - greta


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
undecidable languages
Undecidable Languages
  • We are going to make 2 proofs:
    • An existence proof:
      • We show that a language L must exist that cannot be decided/recognized with Turing machines without actually showing L
    • A constructive proof
      • We show that the halting is not decidable
the existence proof history

Irrational number exist

  • Greek mathematicians
  • Deadly controversial
  • 6th century BC
  • Turing machines
  • Formal model of computation
  • Decidable languages and enumerability results
  • There are many more Real numbers than there are natural numbers
  • There are as many rational numbers as there are natural numbers
  • controversial
  • Late 1800’s
  • Cantor
  • Turing machines capture any algorithm
  • Some problems cannot be solved by computers
  • Gödel incompleteness theorem
  • Gödel numberings
  • 1930’s
The Existence Proof: History
comparing sets
Comparing Sets
  • Two sets A and B have the same size if:
comparing sets1
Comparing Sets
  • Two sets A and B have the same size if:
    • There is a function f: A B that is bijective
comparing sets2
Comparing Sets
  • Two sets A and B have the same size if:
    • There is a function f: A B that is bijective
countable sets
Countable Sets
  • The set of all Natural numbers:
    • N = {1, 2, …}
  • Set A is countable if it has the same size as N
  • Example: The set of all integers have the same size as N. The function f is bijective:
    • f(n) = -((n-1)/2) (if n is odd)
    • f(n) = (n/2) (if n is even)
countable sets1
Countable Sets
  • The set of all Natural numbers:
    • N = {1, 2, …}
  • It is easier to think of countable sets as those that can be enumerated with an enumerated Turing machine

Program enumerateAllIntegers()

n  1

while (true) {

if odd(n) then

print(-((n-1)/2))

else

print(n/2)

n  n + 1

}

Program enumerateAllNaturals()

n  1

while (true) {

print(n)

n  n + 1

}

the set of all rational numbers is countable
The set of All Rational Numbers is Countable
  • Q = {p/q | p, q  N}  {0}
  • Perhaps easier than finding a function f: N  Q that is bijective is to think of a Turing machine that enumerates Q
  • See blackboard for a description of the procedure
    • Same as described in Example 4.15
the real numbers
The Real Numbers
  • R= “the set of all real numbers”
  • We can show that R has the same size as (-/2,/2) by using:
    • f(x) = tan(x)
  • In general: R has the same size as (a,b) for any two real numbers with a < b
    • You studied this in Calc I
the real numbers are not countable
The Real Numbers are Not Countable
  • Proof: see blackboard
    • Same as Theorem 4.17
there exists a non decidable l language
There Exists a Non-decidable l Language

Three steps (Corollary 4.18):

(1) M = “set of all binary encodings of Turing machines” is countable

(2) L = “set of all binary sequences of languages” is not countable

(3) Hence, there exists a language l, <l>L such that no Turing machine can decide it

step 1 m is countable
Step 1: M is Countable
  • It is easy to construct a procedure that enumerates (choose one):
    • All Turing machines
    • All C++ programs
    • All Java programs
  • See blackboard for procedure
  • Homework for Monday asks you to reconstruct this procedure
  • Actual mathematical proof uses Godel numberings (not in the book)
step 2 l is not countable
Step 2: L is not countable
  • Assume  = {0,1} (the proof works with any finite alphabet)
  • Consider * listed in Lexicographical Order
  • We define the characteristic sequence <L> for a language L
  • We define:
    • L = {<L>| L is a language in }
  • See blackboard for preliminaries
  • Homework for Monday asks you to finish the proof
step 3
Step 3
  • Because:
    • M = “set of all Turing machines” is countable
    • L = “set of all languages” is not countable
  • We can now proof that there exists a language l in L such that no Turing machine can decide it
does the following program halts
Does the following program halts?

Source: http://faculty.orangecoastcollege.edu/sgilbert/CS170S09/u05/E.html

does the following program halts1
Does the following program halts?

Source: http://snap.nlc.dcccd.edu/learn/fuller3/chap10/chap10.html

a concrete undecidable language
A Concrete Undecidable Language
  • The halting problem is not decidable
  • Formally, the following set is not decidable:
    • HALT = {<M,w> | M is a Turing machine, w  *, M halts on input w}

Kleene

Gödel

Church

Barkley Rosser

Turing

slide21
Note
  • Modern program editors detect instances of infinite loops
  • Does this contradict the statement that HALT is undecidable?

Editor says:

“Warning potential infinite loop here”

a paradox
A Paradox

“In Sevilla, Spain lives Pepe a barber who…”

actual proof
Actual Proof
  • First: example of a situation where a write a program M and pass as parameter the binary encoding of <M>
    • i.e., call M(<M>)
  • Proof by contradiction:
    • Assume that HALT is decidable:
      • HALT = {<M,w> | M is a Turing machine, w  *, M halts on input w}
    • Let H be a decider for HALT
    • Rest of the proof in the blackboard: (Theorem 4.11)