Questions tagged [reductions]

In computability and complexity, finding mappings between problems that allow solving one problem using a solution of another one. For reduction in programming language theory (e.g. beta-reduction), see [lambda-calculus] or [term-rewriting].

Reduction in computability and in computational complexity is the process of solving one problem using a solution of another one.

Popular examples include:

  • Proving of $P$ by reducing the halting (or any undecidable) problem $\mathrm{HP}$ to $P$. This entails finding a computable function $f$ with $\mathrm{HP}(I) = \mathrm{true} \Longleftrightarrow P(f(I)) = \mathrm{true}$ to use in a proof by contradiction.
  • Proving that a (decision) problem $P$ is by reducing an NP-hard problem $P'$ (for instance ) to $P$, i.e. finding a function $f$ with polynomial runtime and $P'(I) = \mathrm{true} \Longleftrightarrow P(f(I)) = \mathrm{true}$.
  • Many optimisation problems can be solved by reducing them to , a well studied class of problems, i.e. you solve problem $P$ by formulating a linear program $\mathrm{LP}_P$ so that $\operatorname{opt}(P) = \operatorname{opt}(\mathrm{LP}_P)$ and solve $\mathrm{LP}_P$ with one of the canonical algorithms. are classical examples.

As you can see, the basic scheme is always the same.

Note that you can have several layers of reduction. For instance in the NP-hardness proof, we reduce the problem of proving that $P$ is NP-hard to the problem of proving that $P'$ is NP-hard (which we have previously solved). We do this by reducing $P'$ to $P$. Note that the reductions have opposite directions; therefore you have to be very clear about which reduction you are talking about.


Two types of "reduction"

In theory of computability, there are two main types of reductions. The more powerful one is Turing reduction. The other more restricted one is called many-one reduction. Depending on the situation, each of these may be more useful than the other.


Other meanings of “reduction”

  • For beta-reduction, eta-reduction and other rules of programming calculi, use tags corresponding to the calculus, e.g. .
  • For the general concept of reduction rules and reduction strategies in term rewriting, see .
1312 questions
48
votes
4 answers

What are common techniques for reducing problems to each other?

In computability and complexity theory (and maybe other fields), reductions are ubiquitous. There are many kinds, but the principle remains the same: show that one problem $L_1$ is at least as hard as some other problem $L_2$ by mapping instances…
41
votes
2 answers

How do I construct reductions between problems to prove a problem is NP-complete?

I am taking a complexity course and I am having trouble with coming up with reductions between NPC problems. How can I find reductions between problems? Is there a general trick that I can use? How should I approach a problem that asks me to prove a…
32
votes
1 answer

Sorting as a linear program

A surprising number of problems have fairly natural reductions to linear programming (LP). See Chapter 7 of [1] for examples such as network flows, bipartite matching, zero-sum games, shortest paths, a form of linear regression, and even circuit…
Joe
  • 4,105
  • 1
  • 21
  • 38
32
votes
3 answers

Teaching NP-completeness - Turing reductions vs Karp reductions

I'm interested in the question of how best to teach NP-completeness to computer science majors. In particular, should we teach it using Karp reductions or using Turing reductions? I feel that the concepts of NP-completeness and reductions are…
D.W.
  • 167,959
  • 22
  • 232
  • 500
30
votes
5 answers

How can I reduce Subset Sum to Partition?

Maybe this is quite simple but I have some trouble to get this reduction. I want to reduce Subset Sum to Partition but at this time I don't see the relation! Is it possible to reduce this problem using a Levin Reduction ? If you don't understand…
dbonadiman
  • 517
  • 1
  • 4
  • 9
30
votes
1 answer

Graph problem known to be $NP$-complete only under Cook reduction

The theory of NP-completeness was initially built on Cook (polynomial-time Turing) reductions. Later, Karp introduced polynomial-time many-to-one reductions. A Cook reduction is more powerful than a Karp reduction since there is no restriction on…
Mohammad Al-Turkistany
  • 4,477
  • 1
  • 28
  • 37
25
votes
2 answers

Reduce hitting set to SAT, and cardinality constraints

Here is the problem. Given $k, n, T_1, \ldots, T_m$, where each $T_i \subseteq \{1, \ldots, n\}$. Is there a subset $S \subseteq \{1, \ldots, n\}$ with size at most $k$ such that $S \cap T_i \neq \emptyset$ for all $i$? I am trying to reduce this…
Aden Dong
  • 1,151
  • 2
  • 11
  • 24
24
votes
3 answers

Converting (math) problems to SAT instances

What I want to do is turn a math problem I have into a boolean satisfiability problem (SAT) and then solve it using a SAT Solver. I wonder if someone knows a manual, guide or anything that will help me convert my problem to a SAT instance. Also, I…
Dchris
  • 425
  • 4
  • 10
23
votes
1 answer

Could min cut be easier than network flow?

Thanks to the max-flow min-cut theorem, we know that we can use any algorithm to compute a maximum flow in a network graph to compute a $(s,t)$-min-cut. Therefore, the complexity of computing a minimum $(s,t)$-cut is no more than the complexity of…
D.W.
  • 167,959
  • 22
  • 232
  • 500
22
votes
3 answers

If P = NP, why wouldn't $\emptyset$ and $\Sigma^*$ be NP-complete?

Apparently, if ${\sf P}={\sf NP}$, all languages in ${\sf P}$ except for $\emptyset$ and $\Sigma^*$ would be ${\sf NP}$-complete. Why these two languages in particular? Can't we reduce any other language in ${\sf P}$ to them by outputting them when…
David Faux
  • 1,627
  • 5
  • 23
  • 28
22
votes
3 answers

HALF CLIQUE - NP Complete Problem

Let me start off by noting this is a homework problem, please provide only advice and related observations, NO DIRECT ANSWERS please. With that said, here is the problem I am looking at: Let HALF-CLIQUE = { $\langle G \rangle$ | $G$ is an…
BrotherJack
  • 1,115
  • 1
  • 10
  • 23
22
votes
2 answers

If I can solve Sudoku, can I solve the Travelling Salesman Problem (TSP)? If so, how?

Let us say there is a program such that if you give a partially filled Sudoku of any size it gives you corresponding completed Sudoku. Can you treat this program as a black box and use this to solve TSP? I mean is there a way to represent TSP…
user101371
21
votes
2 answers

Is the "subset product" problem NP-complete?

The subset-sum problem is a classic NP-complete problem: Given a list of numbers $L$ and a target $k$, is there a subset of numbers from $L$ that sums to $k$? A student asked me if this variant of the problem called the "subset product" problem is…
templatetypedef
  • 9,302
  • 1
  • 32
  • 62
21
votes
2 answers

Can one show NP-hardness by Turing reductions?

In the paper Complexity of the Frobenius Problem by Ramírez-Alfonsín, a problem was proved to be NP-complete using Turing reductions. Is that possible? How exactly? I thought this was only possible by a polynomial time many one reduction. Are there…
21
votes
2 answers

Subset Sum: reduce special to general case

Wikipedia states the subset sum problem as finding a subset of a given multiset of integers, whose sum is zero. Further it states that it is equivalent to finding a subset with sum $s$ for any given $s$. So I believe as they are equivalent, there…
ipsec
  • 537
  • 3
  • 9
1
2 3
87 88