Loading...

PPT – CSCI 2670 Introduction to Theory of Computing PowerPoint presentation | free to download - id: 9fd1a-OTExY

The Adobe Flash plugin is needed to view this content

CSCI 2670 Introduction to Theory of Computing

November 3, 2005

Agenda

- Yesterday
- Reductions (Section 5.3)
- Today
- More on reductions
- Section 6.3
- We will not be covering section 6.4
- I will discuss some basic issues of this section

when covering chapter 7

Announcement

- Remember to let me know if you want to come to my

pizza party next Wednesday

Mapping reducibility

- Definition Language A is mapping reducible to

language B, written A?mB, if there is a

computable function f? ? ?, where for every w, - w ? A iff f(w) ? B

Why m?

- In some sense, if A m B, then A is less

powerful than B - For example, we can map from CFGs to decidable

languages that arent CF, but not vice versa - Example
- We can easily map any CFG C to ACFG
- f(w) ltC,wgt
- w ? C iff ltC,wgt ? ACFG
- You can use this example to help you remember how

to use reductions

Mapping reductions decidability

- Theorem If A ?m B and B is decidable, then A is

decidable. - Proof Let M be a decider for B and let f be a

reduction from A to B. - Consider the following TM, N
- N On input w
- Compute f(w)
- Run M on f(w) and report Ms output
- Then N decides A

Example

- Let EV ltAgt A is a DFA all strings in L(A)

have an even number of 1s - How can we prove EV is decidable using a mapping

reduction? - Consider the following DFA B

L(B) w ?? w has an even number of 1s

Mapping reduction of L

- Use EQDFA ltA,Bgt A and B are DFAs with L(A)

L(B) - Mapping from EV to EQDFA
- f(ltAgt) ltA,A?Bgt
- A has an even number of 1s if and only if L(A)

L(A?B) - I.e., A ? EV iff f(A) ? EQDFA
- Since we know EQDFA is decidable and EV m EQDFA,

we now know EV is decidable

Mapping reductions undecidability

- Corollary If A ?m B and A is undecidable, then

B is undecidable. - We have been using this corollary implicitly

already

Example

- We showed that HALTTM is undecidable by

contradiction - Now lets show its undecidable using mapping

reduction - Need a function that takes input ltM,wgt
- Halts if M accepts w, and loops if not

Mapping from ATM to HALTTM

- F On input x
- If x ? ltM,wgt for some TM M, output x
- Otherwise, construct the following TM
- M On input x
- 1. Run M on x
- 2. If M accepts, accept
- 3. If M rejects, enter a loop
- 2. Output ltM,wgt
- If M accepts w M halts on w, otherwise M loops

or generates a string not in HALTTM - I.e., ltM,wgt?ATM iff ltM,wgt?HALTTM

HALTTM is undecidable

- We just showed that ATM m HALTTM
- Since we know ATM is undecidable, we can conclude

that HALTTM is undecidable

Reductions TM-recognizability

- Theorem If A ?m B and B is Turing-recognizable,

then A is Turing-recognizable. - Proof (same as decidable proof) Let M be a

recognizer for B and let f be a reduction from A

to B. - Consider the following TM, N
- N On input w
- Compute f(w)
- Run M on f(w) and report Ms output
- Then N recognizes A

Reductions non-TM-recognizability

- Corollary If A ?m B and A is not

Turing-recognizable, then B is not

Turing-recognizable. - Question Which language have we seen that is

not Turing-recognizable? - Answer ATM

Proving non-Turing-recognizability

- Question If A ?m U is A ?m U?
- Answer Yes since x ? A iff f(x) ? U
- How can we use this to prove non-Turing-recognizab

ility? - Prove ATM ?m U or prove ATM ?m U

Is mapping reducibility enough?

- Mapping reducibility does not completely capture

our intuition about reductions - Example ATM and ATM are not mapping reducible
- ATM is Turing-recognizable and ATM isnt
- A solution to ATM would also provide a solution

to ATM

Oracle

- An oracle for a language B is an external device

that is capable of reporting whether any string w

is a member of B - We are not concerned how the oracle determines

membership - An oracle Turing machine is a Turing machine that

can query an oracle - The machine MB can query an oracle for the

language B

Example

- An oracle Turing machine with an oracle for EQTM

can decide ETM - TEQ-TM On input ltMgt
- Create TM M1 such that L(M1) ?
- M1 has a transition from start state to reject

state for every element of ? - Call the EQTM oracle on input ltM,M1gt
- If it accepts, accept if it rejects, reject
- TEQ-TM decides ETM
- ETM is decidable relative to EQTM

Turing reducibility

- Definition A language A is Turing reducible to a

language B, written - A ?T B, if A is decidable relative to B
- Previous slide shows ETM is Turing reducible to

EQTM - Whenever A is mapping reducible to B, then A is

Turing reducible to B - The function in the mapping reducibility could be

replaced by an oracle

Applications

- If A ?T B and B is decidable, then A is decidable
- If A ?T B and A is undecidable, then B is

undecidable - If A ?T B and B is Turing-recognizable, then A is

Turing-recognizable - If A ?T B and A is non-Turing-recognizable, then

B is non-Turing-recognizable

Have a great weekend!