Theory of Computation: Lecture 26

Uploaded on

1) Index Sets …

1) Index Sets
2) Rice's Theorem
3) Proof of Rice's Theorem
4) Turing Machines
5) Class home page is at

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. CS 5000: Theory of Computation Lecture 26 Vladimir Kulyukin Department of Computer Science Utah State University
  • 2. Outline● Review● Proof of Rices Theorem● Brief and Gentle Introduction Into Turing Machines – David Hilberts 10th Problem – Diophantine Equations – Alan Turings Original Description – Turing Machines Notation and Alphabets
  • 3. Review
  • 4. Review: The Halting ProblemHALT ( x, y ) ⇔ program number y haltson input number x.
  • 5. Review: Theorem 2.1 (Ch. 4)HALT ( x, y ) is not computable
  • 6. Review: Important ImplicationThere is no algorithm that, given a programP in L (or any other language) and an input x ,can determine whether or not P will eventuallyhalt on x.
  • 7. Review: Index SetΓ is a collection of partially computable functions of one variable.RΓ = { t ∈ N | Φ t ∈ Γ }.
  • 8. Review: Index Set DecidabilityMembership in RΓ is decidable if and only if thereis an algorithm that accepts programs as inputand returns TRUE or FALSE dependingon whether a particular program computesa function in Γ .
  • 9. Rices Theorem
  • 10. Rice’s Theorem● The theorem is named after Henry Gordon Rice, a U.S. mathematician● Rice’s Theorem (Informal Statement): For any non-trivial property of partially computable functions, there is no general and effective method to decide whether an algorithm computes a partially computable function with that property● A property is trivial if it holds for all partially computable functions or for none
  • 11. Rice’s TheoremLet Γ be a collection of partially computablefunctions of one variable. Let f ( x ) , g ( x ) bepartially computable functions such thatf ( x ) ∈ Γ , g ( x ) ∉ Γ . Then RΓ is not recursive.
  • 12. Rice’s Theorem: Original FormulationLet C be a collection of p.c. functionsof one variable. Then { x | Φ x ∈ C } isrecursive if and only if C = ∅ or Cincludes all partially computable functionsof one variable.
  • 13. Proof Sketch● Suppose we have Γ, a non-trivial collection of partially computable functions● Suppose that there exists an algorithm (an L-program) that decides if another algorithm computes a function in Γ. To put it differently, Γ has a computable characteristic function● Let us call this algorithm IsInGamma(x), where x is a Gödel number, i.e. a compiled L-program● We now proceed to show that we can use this algorithm to solve the Halting Problem
  • 14. Proof Sketch: Reduction● We will use the so-called reduction argument● Suppose that we have a problem A that we know to be undecidable, e.g. the Halting Problem● Suppose that we are given another problem B● If we want to show that B is undecidable, we can assume that B is decidable and then conclude that the decidability of B leads to the decidability of A● This is a contradiction, of course, because we know that A is undecidable● In this case, A is the Halting Problem and B is Rice’s theorem
  • 15. Proof Sketch● Since Γ is non-trivial, let f(x) be a partially computable function in Γ and let F be a corresponding L-program● Since Γ is non-trivial, let g(x) be a partially computable function not in Γ and let G be a corresponding L-program● For any two values of z and w, we can construct the following program P: IF HALT(z,w) GOTO A1 Y ← G(X1) GOTO E [A1] Y ← F(X1)
  • 16. Proof Sketch● Since isInGamma(x) is an algorithm that computes a characteristic function of Γ, it must return 1 or 0 for any natural number x● Since P is a valid L program, it has a unique Gödel number #(P)● Let x = #(P). Then isInGamma(x) = 1 if and only if HALT(z, w) = 1● Since we can do this construction for any numbers of z and w, the existence of isInGamma shows that the Halting Problem is computable (or decidable), which is a contradiction
  • 17. Brief and Gentle Introduction Into Turing Machines
  • 18. Hilbert’s Lecture David Hilbert Mathematical ProblemsLecture at the International Congress of Mathematicians, Paris 1900
  • 19. Hilbert’s 10th ProblemGiven a Diophantine equation with any number ofunknown quantities and with rational integral numericalcoefficients: To devise a process according to which itcan be determined by a finite number of operationswhether the equation is solvable in rational integers.
  • 20. Diophantine ProblemA Diophantine equation is an equation inwhich only integers solutions are allowed ax + by = c, where a, b, c are integers
  • 21. Turing Machines● Alan Turing discovered this device in 1936-37● A Turing Machine (TM) is a device with internal states● At any particular instant, the device is scanning one square on a linear tape which is infinite in both directions● The combination of the current symbol and the state determines what the device does next
  • 22. Turing Machines● A TM is a theoretical symbol manipulating device● A TM can simulate any computer algorithm (this is a simple formulation of what came to be known as the Church-Turing thesis, a version of Churchs thesis)● TMs are useful for simulating and understanding how computer CPUs work
  • 23. Alan Turings infinite memory capacity obtained in the form of an infinitetape marked out into squares, on each of which a symbol couldbe printed. At any moment there is one symbol in the machine; itis called the scanned symbol. The machine can alter thescanned symbol and its behavior is in part determined by thatsymbol, but the symbols on the tape elsewhere do not affect thebehavior of the machine. However, the tape can be moved backand forth through the machine, this being one of the elementaryoperations of the machine. Any symbol on the tape maytherefore eventually have an innings. Alan Turing, “Intelligent Machinery,” 1948
  • 24. Turing Machines● The actions available to the device are: – Print a symbol – Move right – Move left – Enter a new state
  • 25. Turing Machines: NotationSymbols q1 , q2 , q3 ... represent states.Symbols s0 , s1 , s2 ,... represent printable symbols.s0 = B, i.e. blank.
  • 26. Turing Machines: AlphabetThe alphabet of a TM = { s1 , s2 ,..., sm }.There is a special blank symbol, s0 = B, that is notpart of the alphabet.
  • 27. Reading Suggestions● Ch. 4, Ch. 6, Computability, Complexity, and Languages, 2nd Edition, by Davis, Weyuker, Sigal●●
  • 28. FeedbackErrors, comments to