ArticleslgStudy

computer science

Gap reduction

Gap reduction is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gap reduction rather than just read about it. In short: In computational complexity theory, a gap reduction is a reduction to a particular type of decision problem, known as a c-gap problem. Such reductions provide information about the hardness of approximating solutions to optimization problems.

Key takeaways

  • Gap reduction belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gap reduction to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gap reduction from memory before moving on to harder problems.

Reference excerpt

In computational complexity theory, a gap reduction is a reduction to a particular type of decision problem, known as a c-gap problem. Such reductions provide information about the hardness of approximating solutions to optimization problems. In short, a gap problem refers to one wherein the objective is to distinguish between cases where the best solution is above one threshold from cases where the best solution is below another threshold, such that the two thresholds have a gap in between. Gap reductions can be used to demonstrate inapproximability results, as if a problem may be approximated to a better factor than the size of gap, then the approximation algorithm can be used to solve the corresponding gap problem.

c-gap problem We define a c-gap problem as follows: given an optimization (maximization or minimization) problem P, the equivalent c-gap problem distinguishes between two cases, for an input k and an instance x of problem P:

OPTP(x)≤k. Here, the best solution to instance x of problem P has a cost, or score, below k. OPTP(x)>c⋅k. Here, the best solution to instance x of problem P has a cost above c⋅k. The gap between the two thresholds is thus c. Note that whenever OPT falls between the thresholds, there is no requirement on what the output should be. A valid algorithm for the c-gap problem may answer anything if OPT is in the middle of the gap. The value c does not need to be constant; it can depend on the size of the instance of P. Note that c-approximating the solution to an instance of P is at least as hard as solving the c-gap version of P. One can define an (a,b)-gap problem similarly. The difference is that the thresholds do not depend on the input; instead, the lower threshold is a and the upper threshold is b.

Gap-producing reduction A gap-producing reduction is a reduction from an optimization problem to a c-gap problem, so that solving the c-gap problem quickly would enable solving the optimization problem quickly. The term gap-producing arises from the nature of the reduction: the optimal solution in the optimization problem maps to the opposite side of the gap from every other solution via reduction. Thus, a gap is produced between the optimal solution and every other solution. A simple example of a gap-producing reduction is the nonmetric Traveling Salesman problem (i.e. where the graph's edge costs need not satisfy the conditions of a metric). We can reduce from the Hamiltonian path problem on a given graph G = (V, E) to this problem as follows: we construct a complete graph G' = (V, E'), for the traveling salesman problem. For each edge e ∈ G', we let the cost of traversing it be 1 if e is in the original graph G and ∞ otherwise. A Hamiltonian path in the original graph G exists if and only if there exists a traveling salesman solution with weight (|V|-1). However, if no such Hamiltonian path exists, then the best traveling salesman tour must have weight at least |V|. Thus, Hamiltonian Path reduces to |V|/(|V|-1)-gap nonmetric traveling salesman.

Gap-preserving reduction A gap-preserving reduction is a reduction from a c-gap problem to a c'-gap problem. More specifically, we are given an instance x of a problem A with |x| = n and want to reduce it to an instance x' of a problem B with |x'| = n'. A gap-preserving reduction from A to B is a set of functions (k(n), k'(n'), c(n), c'(n')) such that For minimization problems:

OPTA(x) ≤ k ⇒ OPTB(x') ≤ k', and OPTA(x) ≥ c⋅k ⇒ OPTB(x') ≥ c'⋅k' For maximization problems:

OPTA(x) ≥ k ⇒ OPTB(x') ≥ k', and OPTA(x) ≤ k/c ⇒ OPTB(x') ≤ k'/c' If c' > c, then this is a gap-amplifying reduction.

Examples

Max E3SAT This problem is a form of the Boolean satisfiability problem (SAT), where each clause contains three distinct literals and we want to maximize the number of clauses satisfied. Håstad showed that the (1/2+ε, 1-ε)-gap version of a similar problem, MAX E3-X(N)OR-SAT, is NP-hard. The MAX E3-X(N)OR-SAT problem is a form of SAT where each clause is the XOR of three distinct literals, exactly one of which is negated. We can reduce from MAX E3-X(N)OR-SAT to MAX E3SAT as follows:

A clause xi ⊕ xj ⊕ xk = 1 is converted to (xi ∨ xj ∨ xk) ∧ (¬xi ∨ ¬xj ∨ xk) ∧ (¬xi ∨ xj ∨ ¬xk) ∧ (xi ∨ ¬xj ∨ ¬xk) A clause xi ⊕ xj ⊕ xk = 0 is converted to (¬xi ∨ ¬xj ∨ ¬xk) ∧ (¬xi ∨ xj ∨ xk) ∧ (xi ∨ ¬xj ∨ xk) ∧ (xi ∨ xj ∨ ¬xk) If a clause is not satisfied in the original instance of MAX E3-X(N)OR-SAT, then at most three of the four corresponding clauses in our MAX E3SAT instance can be satisfied. Using a gap argument, it follows that a YES instance of the problem has at least a (1-ε) fraction of the clauses satisfied, while a NO instance of the problem has at most a (1/2+ε)(1) + (1/2-ε)(3/4) = (7/8 + ε/4)-fraction of the clauses satisfied. Thus, it follows that (7/8 + ε, 1 - ε)-gap MAX E3SAT is NP-hard. Note that this bound is tight, as a random assignment of variables gives an expected 7/8 fraction of satisfied clauses.

Label Cover The label cover problem is defined as follows: given a bipartite graph G = (A∪B, E), with

A = A1 ∪ A2 ∪ ... ∪ Ak, |A| = n, and |Ai| = n/k B = B1 ∪ B2 ∪ ... ∪ Bk, |B| = n, and |Bi| = n/k We define a "superedge" between Ai and Bj if at least one edge exists from Ai to Bj in G, and define the superedge to be covered if at least one edge from Ai to Bj is covered. In the max-rep version of the problem, we are allowed to choose one vertex from each Ai and each Bi, and we aim to maximize the number of covered superedges. In the min-rep version, we are required to cover every superedge in the graph, and want to minimize the number of vertices we choose. Manurangsi and Moshkovitz show that the (O(n1/4), 1)-gap version of both problems is solvable in polynomial time.

See also Approximation-preserving reduction Optimization problem Approximation algorithm PTAS reduction

References

Worked examples

Example 1 — a first encounter with Gap reduction

Start with the simplest possible case. Write down what Gap reduction claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gap reduction before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gap reduction ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gap reduction

In research
Gap reduction appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gap reduction in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gap reduction is common in secondary-school and first-year university syllabi. It links to neighbouring topics Approximation algorithms, Computational problems, so understanding it makes those chapters shorter.
In everyday life
Look for Gap reduction outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gap reduction” →

How to study Gap reduction in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gap reduction means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gap reduction out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gap reduction in simple terms?

In computational complexity theory, a gap reduction is a reduction to a particular type of decision problem, known as a c-gap problem. Such reductions provide information about the hardness of approximating solutions to optimization problems.

Why does Gap reduction matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gap reduction?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gap reduction.

Tags

  • Approximation algorithms
  • Computational problems

Keep exploring