You are on page 1of 15

Theory of Computation

Reducibility
Presented by:
Uswa Ihsan(1075-FBAS/BSCS/f20)
Fizza Asim (1088-FBAS/BSCS/f20)
Introduction(Reducibility):

• A reduction is a way of converting one problem to another


problem, so that the solution to the second problem can be
used to solve the first problem.
• Reducibility involves two problems A and B.
 If A reduces to B, you can use a solution to B to solve A.
• When A is reducible to B solving A can not be “harder” than
solving B.
Types of reduction:

• There are two main types of reductions used in


computational complexity:
1. the many-one reduction and
2. the Turing reduction.
• Many-one reductions map instances of one problem
to instances of another.
• Turing reductions compute the solution to one
problem, assuming the other problem is easy to solve.
Reducibility:

• Problem A is reducible to problem B if a program for


B can be used to construct a program for A.
Finding the median is reducible to sorting.
Graph connectivity is reducible to matrix
multiplication.
Terminology Shift

• Language A ⇒ Problem A
• String w ⇒ Instance: Is w ∈ A
• Turing machine M ⇒ Program M
• A is decidable ⇒ Some M solves w ∈ A for
all w ∈ Σ∗
For example:

2
𝜘
• Problem A: 𝑎 𝜘 + 𝑏 + 𝑐𝑥+ 𝑑=0
3

• Problem B:
Reducibility and Decidability

• If A reduces to B and B is decidable, then A is decidable.


• If A reduces to B and A is undecidable, then B is
undecidable.
• We can show that a problem B is undecidable by reducing
ATM to B.
Halting Problem For Turning Machine:

• The halting problem is to test whether a TM M


halts on a string w. As usual, we first give a
language-theoretic formulation.
• HALT TM = {<M, w> | M is a TM and halts on w }
• Problem: HALT TM is undecidable.
Proof

• Suppose a TM R decides HALTTM.


• Consider S = “On input <M, w>
where M is a TM and w is a string:
• Run TM R on the input <M, w>.
• If R rejects, reject.
• If R accepts, simulate M on w
until it halts.
• If M accepts, accept; if M
rejects, reject.”
Emptiness Problem for Turing Machines

• ETM = {<M> | M is a TM and L ( M) = ∅}


Problem: is undecidable.
We reduce the acceptance problem to the
emptiness problem. Let the TM R decides ETM.
Proof

Consider S = “On input <M, w>


where M is a TM and w a string:
• Use <M> to construct
M1 = “On input x:
 If x w, reject.
 If x = w, run M on the input
x.If M accepts x, accept.”
• Run R on the input <M1>.
• If R accepts, reject; otherwise,
accept.”
Regularity Problem for Turning Machine

• Consider
REGULARTM = {<M> : M is a TM and L(M) is
regular}.
Theorem: REGULARTM is undecidable.
Proof
• Let R be a TM deciding REGULARTM.
Consider
• S = “On input <M, x> where M is a TM and
x a string:
• Use <M> to construct M2 = “On input x:
 If x is of the form , accept.
 Otherwise, run M on the input w. If M
accepts w, accepts.”
• Run R on the input M2.
• If R accepts, accept; otherwise, reject.”

You might also like