CS 3240: Languages and Computation - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

CS 3240: Languages and Computation

Description:

Example assume decidability of HALTTM and show ATM is decidable which is a contradiction ... Assume there is some decidable non-trivial property P for Turing ... – PowerPoint PPT presentation

Number of Views:163
Avg rating:3.0/5.0
Slides: 25
Provided by: ble87
Category:

less

Transcript and Presenter's Notes

Title: CS 3240: Languages and Computation


1
CS 3240 Languages and Computation
  • Undecidable Problems and LBA

2
Undecidable Languages
  • We can prove a problem is undecidable by
    contradiction
  • Assume the problem is decidable
  • Show that this implies something impossible

3
The Halting Problem HALTTM
  • HALTTM ltM,wgt M is a TM and M halts on input
    w
  • Theorem HALTTM is undecidable
  • Proof Idea (by contradiction)
  • Show that if HALTTM is decidable then ATM is also
    decidable

4
Proof
  • Assume R decides HALTTM
  • Let S be the following TM
  • S on input ltM,wgt
  • Run R on ltM,wgt
  • If R rejects, reject
  • If R accepts, simulate M on w until it halts
  • If M accepts, accept if M rejects, reject

5
Proof (cont.)
  • If HALTTM is decidable then S decides ATM
  • Since ATM is not decidable, HALTTM cannot be
    decidable

6
Reductions and Decidability
  • To prove a language is decidable, we have
    converted it to another language and used the
    decidability of that language
  • Example use decidability of EDFA to determine
    decidability of EQDFA
  • Thus, we reduce the problem of determining if
    EQDFA is decidable to the problem of determining
    if EDFA is decidable

7
Reductions and Undecidability
  • To prove a language is undecidable, we have
    assumed its decidable and found a contradiction
  • Example assume decidability of HALTTM and show
    ATM is decidable which is a contradiction
  • In each case, we have to do a computation to
    convert one problem to another problem
  • What kind of computations can we do?

8
Template for Reduction
  • Assume L is decidable
  • Let N be a TM that decides L
  • Show that a known undecidable language L will be
    decidable if it can use N to make decisions
  • This is called reducing problem L to problem L
  • Conclude N cannot exist
  • I.e., the language L is not decidable
  • Key Figuring out which undecidable language to
    reduce from

9
Undecidability of ETM
  • ETM ltMgt M is a TM and L(M) ?
  • Theorem ETM is undecidable
  • Proof idea Assume ETM is decidable with decider
    TM R. Use R to decide ATM.
  • Recall ATM ltM,wgt M is a TM that accepts
    w.
  • How can we use R (which takes ltMgt as input) to
    determine if M accepts w?
  • Make new TM, M1, with L(M1) ? iff M accepts w

10
Proof
  • New TM M1 Reject any string except for w, and
    run M on input w.
  • M1 On input x
  • If x ? w, reject
  • If x w, run M on input w
  • Accept if M accepts
  • L(M1) ? ? if and only if M accepts w

11
Use R and M1 to Decide ATM
  • Consider the following TM
  • S On input ltM,wgt
  • Construct M1 that rejects all but w and simulates
    M on w
  • Run R on ltM1gt
  • If R accepts, reject if R rejects, accept
  • S decides ATM a contradiction
  • Therefore, ETM is not decidable

12
Another Undecidable Language
  • Let REGULARTM ltMgt M is a
  • TM and L(M) is a regular language
  • Theorem REGULARTM is undecidable
  • Proof idea Assume R decides REGULARTM and use R
    to decide ATM (reduce the ATM problem to the
    REGULARTM problem).
  • As before, make a new TM, M2, that accepts a
    regular language iff M accepts w.

13
Proof
  • M2 On input x
  • If x 0n1n for some n, accept
  • Otherwise, run M on w. If M accepts w, accept
  • If M accepts w, then L(M2) S
  • A regular language
  • Otherwise, L(M2) 0n1n
  • Not a regular language

14
Proof (cont.)
  • Assuming R decides REGULARTM consider the
    following TM
  • S On input ltM,wgt
  • Construct M2 s.t. L(M2) is regular iff M accepts
    w
  • Run R on M2
  • If R accepts, accept if R rejects, reject
  • S decides ATM iff R decides REGULARTM

15
Rices Theorem
  • Determining whether a TM satisfies any
    non-trivial property is undecidable
  • A property is non-trivial if
  • It depends only on the language of M, and
  • Some, but not all, Turing machines have the
    property
  • Examples Is L(M) regular? A CFG? Finite?

16
Proof of Rices Theorem
  • Assume there is some decidable non-trivial
    property P for Turing machines
  • Without loss of generality, assume TMs that
    accept ? do not satisfy P
  • If they do, just consider ?P

17
Proof of Rices Theorem
  • Suppose there is a TM RP that decides P
  • On input ltMgt, RP accepts iff TM M has property P
  • Let MP be a TM that satisfies P
  • Since P is non-trivial, there is some MP
    satisfying P
  • Use RP and MP to decide ATM
  • Create a new TM S that decides ATM using RP and MP

18
ATM Decider Using MP
  • S On input ltM,wgt
  • Create the following TM N
  • N On input x
  • Run M on w until it accepts
  • If M accepts w, run MP on x
  • If MP accepts x, accept if MP rejects x, reject
  • Run RP on ltN(ltM,wgt)gt
  • If RP accepts, accept if RP rejects, reject
  • L(N) L(MP) if M accepts w otherwise L(N) ?
  • S decides ATM if RP decides TMs satisfying P
  • Therefore, RP cannot exist

19
Computation Histories
  • Recall configuration of a TM string uqv with u,v
    ? ?, q ? Q
  • The sequence of configurations M goes through on
    input w is a computation history of M on input w
  • may be accepting, or rejecting
  • reserve the term for halting computations
  • nondeterministic machines may have several
    computation histories for a given input.

20
Linear Bounded Automata
  • LBA definition TM that is prohibited from moving
    head off right side of input.
  • machine prevents such a move, just like a TM
    prevents a move off left of tape
  • How many possible configurations for a LBA M on
    input w with w n, m states, and p ? ?
  • counting gives mnpn

21
LBA Problems
  • Two problems we have seen with respect to TMs,
    now regarding LBAs
  • LBA acceptance
  • ALBA ltM, wgt LBA M accepts input w
  • LBA emptiness
  • ELBA ltMgt LBA M has L(M) Ø
  • Both decidable? both undecidable? one decidable?

22
ALBA Problem
  • Theorem ALBA is decidable.
  • Proof
  • input ltM, wgt where M is a LBA
  • key only mnpn configurations
  • if M hasnt halted after this many steps, it must
    be looping forever.
  • simulate M for mnpn steps
  • if it halts, accept or reject accordingly,
  • else reject since it must be looping

23
ELBA Problem
  • Theorem ELBA is undecidable.
  • Proof
  • reduce from co-ATM (i.e. show co-ATM m ELBA)
  • Idea
  • produce LBA B that accepts exactly the accepting
    computation histories of M on input w

24
ELBA Problem (cont)
  • Proof
  • f(ltM, wgt) ltBgt described below
  • is B an LBA?
  • is f computable?
  • YES maps to YES?
  • ltM, wgt ? co-ATM ? f(M, w) ? ELBA
  • NO maps to NO?
  • ltM, wgt ? co-ATM ? f(M, w) ? ELBA
  • on input x, check if x has form
  • C1C2C3...Ck
  • check whether C1 is the start configuration for
    M on input w
  • check whether Ci?1 Ci1
  • check whether Ck is an accepting configuration
    for M
Write a Comment
User Comments (0)
About PowerShow.com