Mapping Reducibility 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/mapping.pdf 1
Last time Reducibility q q Reducibility Using reducibility Ø Goals: o o Learn about the use of reducibility Learn to use reducibility to prove that a problem is unsolvable 2
Outline for today Reducibility q Selecting problem S q LBA Mapping reducibility q Formal definition of reducibility q Use mapping reducibility Ø Goals: o Learn a formal definition of reducibility o Learn to use mapping reducibility 3
The EQ TM problem Let us use S = A TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! S S s solver R s solver convert S to R Map the solution of R to a solution to S 4
The EQ TM problem Let us use S = A TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! <M, w> accept S s solver R s solver <M1, M2> reject? M accept w or not convert S to R 5
The EQ TM problem Let us use S = A TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept w or not <M, w> S s solver <x> M1: accept R s solver <M1, M2> <x> M2: 1) if x!= w accept 2) otherwise M w convert S to R Map the solution of R to a solution to S 6
The EQ TM problem Let us use S = A TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept w or not <M, w> S s solver <x> M1: accept R s solver <M1, M2> <x> M2: 1) if x!= w accept 2) otherwise M w convert S to R Map the solution of R to a solution to S 7
The EQ TM problem Let us use S = A TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! We can change S to be any unsolvable problem! S S s solver R s solver convert S to R Map the solution of R to a solution to S 8
The EQ TM problem Let us use S = E TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept the empty language or not S s solver R s solver S convert S to R? Map the solution of R to a solution to S 9
The EQ TM problem Let us use S = E TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept the empty language or not <M> S s solver <x> M1 <M, M1> R s solver M convert S to R Map the solution of R to a solution to S 10
The EQ TM problem Let us use S = E TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept the empty language or not <M> S s solver <x> M1 <M, M1> reject R s solver M convert S to R Map the solution of R to a solution to S 11
The EQ TM problem Let us use S = E TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! A simpler solution! M accept the empty language or not <M> S s solver <x> M1 <M, M1> reject R s solver M convert S to R Map the solution of R to a solution to S 12
The EQ TM problem Let us use S = E TM q Assume that M R solves R = EQ TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! 13
Steps to use reducibility Using reducibility (S reduces to R) to prove unsolvability q q q q q q Select an unsolvable (undecidable problem) S (key) Assume R is solvable, solve S to derive a contradiction Check the input for R and S Think about how to use outputs for R to reason about outputs for S (key) Convert S input to R s input Convert R s output to S s output 14
Summary Decidable languages learned: A DFA, A NFA, G RE, E RE, EQ DFA, A CFG, E CFG Undecidable languages learned so far: A TM, HALT TM, E TM, REGULAR TM, EQ TM, ALL CFG (on the book) 15
Rice s theorem Consider A TM 16
Rice s theorem Consider A TM Proof in text book (5.28). You cannot use Rice s theorem in exams for proofs unless told to L 17
Outline for today Reducibility q Selecting problem S q LBA Mapping reducibility q Formal definition of reducibility q Use mapping reducibility Ø Goals: o Learn a formal definition of reducibility o Learn to use mapping reducibility 18
LBA Equivalent to a FA? 19
LBA Equivalent to a FA? NO! The tape size is dependent on the input 20
A LBA A LBA is decidable! 21
A LBA A LBA is decidable! Finite distinct configurations so we know when it loops! 22
A LBA A LBA is decidable! Finite distinct configurations so we know when it loops! q states, n is the tape size, g is tape alphabet size 23
The E LBA problem Let us use S = A TM q Assume that M R solves R = E LBA q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! S S s solver R s solver convert S to R Map the solution of R to a solution to S 24
The E LBA problem Let us use S = A TM q Assume that M R solves R = E LBA q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! <M, w> S s solver <B> R s solver convert S to R Map the solution of R to a solution to S 25
The E LBA problem Let us use S = A TM q Assume that M R solves R = E LBA q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! Why can t we do this? <M, w> S s solver <x> M1 1) x!= w reject 2) x == w M convert S to R <B> R s solver Map the solution of R to a solution to S 26
The E LBA problem Let us use S = A TM q Assume that M R solves R = E LBA q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! <x> <M, w> S s solver <x> B (LBA) accept only if x is a computation history of M accepting w convert S to R <B> R s solver Map the solution of R to a solution to S 27
The E LBA problem Let us use S = A TM q Assume that M R solves R = E LBA q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! That is the maximum tape size we need! <x> <M, w> S s solver <x> B (LBA) accept only if x is a computation history of M accepting w convert S to R <B> R s solver Map the solution of R to a solution to S The construction of this LBA is on the book 28
The E LBA problem Let us use S = A TM q Assume that M R solves R = E LBA q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! A similar proof shows that ALL CFG is undecidable (Theorem 5.13) 29
Outline for today Reducibility q Selecting problem S q LBA Mapping reducibility q Formal definition of reducibility q Use mapping reducibility Ø Goals: o Learn a formal definition of reducibility o Learn to use mapping reducibility 30
Mapping Reducibility M w f(w) 31
Mapping Reducibility The challenge of design f(s) lies in the bi-direction mapping 32
Mapping Reducibility Reduction we talked about: The challenge of design f(s) lies in the bi-direction mapping S S s solver R s solver convert S to R Map the solution of R to a solution to S f(s): everything inside the red block (both steps) except for the switching between accept and reject in the end 33
Mapping Reducibility S is reduced to R (R is more difficult than S) q q If R is decidable, S is also decidable! If S is undecidable, R is also undecidable! 34
Outline for today Reducibility q Example for selecting your unsolvabe problem S q LBA Mapping reducibility q Formal definition of reducibility q Use mapping reducibility Ø Goals: o Learn about a formal definition of reducibility o Learn to use mapping reducibility 35
The halting problem is undecidable! Let us use S = A TM q Assume that M R solves R = HALT TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! How do we combine the two parts? M accept w or not <M, w> S s solver <M, w> R s solver accept w M accept reject convert S to R reject Map the solution of R to a solution to S What is f(s)? 36
The halting problem Let us use S = A TM q Assume that M R solves R = HALT TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept w or not <M, w> S s solver <x> M <x> M <M, w> R s solver f(<m, w>) convert S to R Map the solution of R to a solution to S What is M in the input <M, w> is not a proper TM? 37
The halting problem Let us use S = A TM q Assume that M R solves R = HALT TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! M accept w or not <M, w> S s solver <x> M <x> M <M, w> R s solver f(<m, w>) convert S to R Map the solution of R to a solution to S What is M in the input <M, w> is not a proper TM? Ø In general, when we describe a Turing machine that computes a reduction from A to B, improperly formed inputs are assumed to map to strings outside of B. 38
E TM Let us use S = A TM q Assume that M R solves R = E TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! reduction from! M accept w or not <M, w> S s solver <x> M1 <M1> R s solver 1) x!= w reject 2) x == w M convert S to R Map the solution of R to a solution to S 39
E TM Let us use S = A TM q Assume that M R solves R = E TM q Solve S using M R by constructing M S using M R q A contradiction since S is not solvable! reduction from! M accept w or not <M, w> S s solver <x> M1 <M1> R s solver 1) x!= w reject 2) x == w M convert S to R Map the solution of R to a solution to S reduction from A TM to E TM, in fact, does not exist (exercise 5.5)! 40
Mapping reducibility Interpreting the notation based on the problems difficulty levels ; easy to remember! To prove some problem B is not TM recognizable, we only need to show that 41
Mapping reducibility A TM apple m EG TM A TM apple m EG TM 42
Outline for today Reducibility q Example for selecting your unsolvabe problem S q LBA Mapping reducibility q Formal definition of reducibility q Use mapping reducibility Ø Goals: o Learn about a formal definition of reducibility o Learn to use mapping reducibility 43