1 / 14

Diagonalization Principle: Applications and Proof in Theory of Computation

Learn about the diagonalization principle, its applications, and a detailed proof in the theory of computation. Understand how it shows certain sets are uncountable and undecidable.

crossland
Download Presentation

Diagonalization Principle: Applications and Proof in Theory of Computation

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. COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27 UofH - COSC 3340 - Dr. Verma

  2. Diagonalization Principle • Let S be any nonempty set and R any relation on S. • The principle states that: the complement of the diagonal is different from each row. Can be generalized to relations on two sets, etc. • Example: Let S = {a, b, c, d}. R = {(a, a), (b, c), (b, d), (c, a), (c, c), (c, d), (d, a), (d, b)} UofH - COSC 3340 - Dr. Verma

  3. Example (contd.) • R = {(a, a), (b, c), (b, d), (c, a), (c, c), (c, d), (d, a), (d, b)} X X complement of the diagonal UofH - COSC 3340 - Dr. Verma

  4. Applications of Diagonalization. • The principle is very useful to show that enumerations of some sets cannot be exhaustive. • For example, one can show: • 2N is uncountable. • The set of real numbers in the interval [0,1] is uncountable. (Exercise) • The set {<M, w> | M accepts w} is not Turing decidable. UofH - COSC 3340 - Dr. Verma

  5. 2N is Uncountable. • Suppose that it is countably infinite. Then there is an enumeration 2N = {S0, S1, S2, ...} using the bijection between N and 2N . • Let D = { iN | iSi}. D is a subset of N so it belongs to 2N . • So, D = Sk for some kN. UofH - COSC 3340 - Dr. Verma

  6. 2N is Uncountable (contd.) • We ask whether kSk. • Case 1. kSk. By definition of D, k D, but D = Sk, so contradiction. • Case 2. kSk. By definition of D, k D, but D = Sk, again contradiction. • Hence our hypothesis that 2N is countable is false (q.e.d.). UofH - COSC 3340 - Dr. Verma

  7. Where was Diagonalization used? • Consider N X {S0, S1, ....}. • D is the complement of the diagonal of this infinite relation. UofH - COSC 3340 - Dr. Verma

  8. Proof for ATM = {<M, w> | M accepts w} • Suppose that H is a decider for ATM. • On input <M, w>, H halts and accepts if M accepts w and H halts and rejects if M rejects w. H(<M, w>) = accept if M accepts w reject if M does not accept w. • Now we construct a new Turing machine D with H as a subroutine. D calls H to determine what M does when input to M is its own description <M>. UofH - COSC 3340 - Dr. Verma

  9. Proof for ATM (contd.) D = “On input <M>, where M is a TM: • Run H on input <M, <M>>. • Output the opposite of what H outputs; that is, if H accepts, reject and if H rejects, accept.” D(<M>) = accept if M does not accept <M> reject if M accepts <M>. What happens when we run D with its own description <D> as input? In that case we get D(<D>) = accept if D does not accept <D> reject if D accepts <D>. UofH - COSC 3340 - Dr. Verma

  10. Proof for ATM (contd.) • Basically, • Assume that a TM H decides ATM. • Then use H to build a TM D that when given input < M > accepts exactly when M does not accept input < M >. • Finally, run D on itself. • The machine take the following actions, with the last line being the contradiction. • H accepts <M, w> exactly when M accepts w. • D rejects < M > exactly when M accepts < M >. • D rejects < D > exactly when D accepts < D >. UofH - COSC 3340 - Dr. Verma

  11. Proof for ATM (contd.) • Examine tables of behavior for TMs H and D. UofH - COSC 3340 - Dr. Verma

  12. Another Perspective on Halting Problem • If L is a Turing-decidable language then L’ (complement of L) is also Turing-decidable. • If it were possible to predict for any TM M and any input string whether or not M would halt on that input, then every Turing-acceptable language would also be Turing decidable. UofH - COSC 3340 - Dr. Verma

  13. Another Perspective • K0 = {(M) (w) | Turing machine M accepts input string w.} If K0is decidable then every Turing acceptable language is also Turing decidable. K0is Turing acceptable. • Every Turing acceptable language is Turing decidable iff K0is Turing decidable. UofH - COSC 3340 - Dr. Verma

  14. Another Perspective • If K0is decidable, K1= {(M) | TM M accepts input string (M) } would also be Turing decidable. • If K1is decidable then so is complement of K1,K1’, is not even Turing acceptable • K1’ = {w {I, c}* | w is not the encoding of any TM M, or w = (M) for some M that does not accept its own encoding} UofH - COSC 3340 - Dr. Verma

More Related