COSC 3340: Introduction to Theory of Computation - PowerPoint PPT Presentation

About This Presentation
Title:

COSC 3340: Introduction to Theory of Computation

Description:

COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27 Diagonalization Principle Let S be any nonempty set and R any relation on S. – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 15
Provided by: Duk53
Learn more at: https://www2.cs.uh.edu
Category:

less

Transcript and Presenter's Notes

Title: COSC 3340: Introduction to Theory of Computation


1
COSC 3340 Introduction to Theory of Computation
  • University of Houston
  • Dr. Verma
  • Lecture 27

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)

3
Example (contd.)
  • R (a, a), (b, c), (b, d), (c, a), (c, c), (c,
    d), (d, a), (d, b)

a b c d

a
b
c
d
a b c d
a X
b X X
c X X X
d X X
X
X
complement of the diagonal
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 ltM, wgt M accepts w is not Turing
    decidable.

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.

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.).

7
Where was Diagonalization used?
  • Consider N X S0, S1, .....
  • D is the complement of the diagonal of this
    infinite relation.

0 1 2 3 . .
s0 X X
s1 X X
s2
s3 X X
. X
.
8
Proof for ATM ltM, wgt M accepts w
  • Suppose that H is a decider for ATM.
  • On input ltM, wgt, H halts and accepts if M accepts
    w and H halts and rejects if M rejects w.
  • H(ltM, wgt) 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 ltMgt.

9
Proof for ATM (contd.)
  • D On input ltMgt, where M is a TM
  • Run H on input ltM, ltMgtgt.
  • Output the opposite of what H outputs that is,
    if H accepts, reject and if H rejects, accept.
  • D(ltMgt) accept if M does not accept ltMgt
  • reject if M accepts ltMgt.
  • What happens when we run D with its own
    description ltDgt as input? In that case we get
  • D(ltDgt) accept if D does not accept ltDgt
  • reject if D accepts ltDgt.

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
    lt M gt accepts exactly when M does not accept
    input lt M gt.
  • Finally, run D on itself.
  • The machine take the following actions, with the
    last line being the contradiction.
  • H accepts ltM, wgt exactly when M accepts w.
  • D rejects lt M gt exactly when M accepts lt M gt.
  • D rejects lt D gt exactly when D accepts lt D gt.

11
Proof for ATM (contd.)
  • Examine tables of behavior for TMs H and D.

lt M1 gt lt M2 gt lt M3 gt lt M4 gt . . .
M1 accept accept
M2 accept accept accept accept
M3 . . .
M4 accept

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.

13
Another Perspective
  • K0 ?(M) ?(w) Turing machine M accepts input
    string w.
  • If K0 is decidable then every Turing acceptable
    language is also Turing decidable.
  • K0 is Turing acceptable.
  • Every Turing acceptable language is Turing
    decidable iff K0 is Turing decidable.

14
Another Perspective
  • If K0 is decidable,
  • K1 ?(M) TM M accepts input string ?(M)
    would also be Turing decidable.
  • If K1 is 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
Write a Comment
User Comments (0)
About PowerShow.com