20. Reductions
Mar 15/17, 2022
-
Reduction: problem
is reduced to problem => if we can solve then we can solve -
Language A is reduced to language B => there is a computable function
(reduction) such that
Using reductions
Theorem 1: If language A is reduced to language B and language B is decidable, then A is decidable.
-
Basic proof idea: Build the decider for A, using the decider for B, then, from reduction:
decider for A |=================================| | | f(w) | decider |---> yes M accepts w w ---> | reduction |-------->| for B | | | | |---> no M rejects w |=================================|
Theorem 2: Language A is reduced to B, and language A is undecidable, then B is undecidable.
- Basic proof idea: suppose B is decidable. Using the decider for B build the decider for A => contradiction
- To prove that B is undecidable, we only need to reduce a known undecidable language A to B
Theorem 3: If language A is reduced to
- If B is decidable, then
is decidable (see: complement) - Basic proof idea: suppose B is decidable then
is decidable. Using the decider for build the decider for A => contradiction -
(or alternatively: ) --- contradiction:decider for A |=================================| | | f(w) | decider |---> yes M accepts w w ---> | reduction |-------->| for !B | | | | |---> no M rejects w |=================================|
-
To prove that language B is undecidable, we only need to reduce a known undecidable language A to B or
.
EX1. EQUAL
EQUAL
is reduced to: EMPTY
To prove this, we only need to construct:
<
Then
Let
Construct DFA
Then:
decider for EQUAL_DFA |==================================| | | <M> | decider |---> yes <M1,M2> ---> | reduction |--------->| for | | | | EMPTY_DFA |---> no |==================================|
EX2. State-entry problem
- Input: Turing machine
, state , string - Question: does
enter state while processing ? - Corresponding language: STATE
= { : enters state on input }
Theorem: STATE
Proof. Reduce HALT
decider for HALT_TM |==================================| | | <M',q,w> | decider |---> yes <M,w> -----> | reduction |--------->| for | | | | STATE_TM |---> no |==================================|
We only need to build
For the reduction, construct
-
for all halting states in
, add transition to special halt state where is a placeholder for every unused tape symbol of . -
Then, if
halts halts on state
Therefore: when
Equivalently:
EX3. Blank-tape halting problem
- Input: Turing machine
- Question: Does
halt when started with a blank tape? - Corresponding language: BLANK
= { : M is a Turing machine that halts when started on a blank tape }
Theorem: BLANK
Proof. Reduce HALT
decider for HALT_TM |=================================| | | <M'> | decider |---> yes <M,w> -----> | reduction |-------->| for | | | | BLANK_TM |---> no |=================================|
We only need to build the reduction
Construct
- is tape blank?
- N: accept and halt
- Y: write
on tape => run with input
- => if
halts then halts also.
Therefore: if
Equivalently:
Undecidable problems for Recognizable Languages
See: Rice's theorem
Let
EX1. Empty language problem
- Input: Turing machine
- Question: is
empty: ? - Corresponding language: EMPTY
= { : M is a Turing machine that accepts the empty language }
Theorem: EMPTY
Proof. Reduce
We only need to build the reduction:
Construct
-
let
be input string: does equals (some arbitrary value x)?- Y: write
on tape and simulate on => if accepts , then accept - for all other outcomes: reject
- Y: write
-
When
accepts => - When
does not accept =>
Therefore:
Equivalently:
EX2. Regular language problem
- Input: Turing machine
- Question: is
a regular language? - Corresponding language: REGULAR
= { : M is a Turing machine that accepts a regular language }
Theorem: REGULAR
Proof. Reduce
We only need to build the reduction
Construct
-
let
be input string: does for some ?- Y: write
on tape and simulate on => if accepts , then accept - for all other outcomes: reject
- Y: write
-
When
accepts => (not regular) - When
does not accept => (regular)
Therefore:
Equivalently:
EX3. Size-2 language problem
- Input: Turing machine
- Question: does
have size 2 ( )? - Corresponding language: SIZE2
= { : M is a Turing machine that accepts exactly 2 strings }
Theorem: SIZE2
Proof. Reduce Reduce
We only need to build the reduction
Construct
- When
accepts => = { Language of 2 strings } - When
does not accept => (0 strings)
Therefore:
Equivalently: