Reduction And Intractibility

16 Mar 2017 |

Complexity Classes

With complexity classes, we aim to determine the “difficulty” of a problem. They allow us to know what is solvable in polynomial time and what isn’t. This is what the P=NP problem deals with. P=NP implies that for any polynomial time verification solution, there is a polynomial time solver for the problem. Most computer scientists believe that PNP. Assuming PNP,

complexity_classes

P

Loosly, P is defined as the set of all problems such that there is a polynomial time solution. This means that the solution to a problem aP runs in O(nk) time where k is some constant.

NP

Loosly, NP is defined as the set of all problems such that there is a polynomial time verification.

NP-Hard

Loosly, NPHard problems are such that any problem in NP can be reduced to that NPHard problem. Notice that the problen need not be in NP. We have a special class of problems for those, as seen below.

NP-Complete

Loosly, NPC problems are considered the hardest problems in NP. Basically, any problem in NP can be reduced to a NPC problem. This means that any NPC problem can be reduced to another NPC problem. As you can see NPCNPHard

Reductions

Reductions allow us to to determine the difficulty of a problem.

We say that for two problems Y and X, YpX if instances of Y can be solved by a polynomial amount of computation plus a polynomial number of calls to a “black-box” that solves X.

reduction

You can think of reduction as calling a library as part of your solution. For example.

In order for reductions to work, we have to have some set of problems that are known to be NPC. A common starting point is SAT, or boolean satisfiability. Karp has a famous paper containing 21 NPC problems you can view here. Here are some popular NPC Problems

3SAT

For 3SAT, we are given a boolean formula Φ in CNF form (conjunctive normal form) such that for each clause Cr, Cr=l1l2l3. We return true if this boolean formula is satisfiable.

Clique

We say that a graph G has a clique of size k if there is a set of vertices I such that |I|=k and I is fully connected.

We will give a reduction from CLIQUE to 3SAT.

We can define our function A as follows:

For each Cr=(l1l2l3) for r=1,,k , create corresponding vertices v1,v2,v3 in V. Now add an edge between vri and vsj if rs and the corresponding literals are consistent( You can’t connect ¬l1 to l1). Now we se that if there is a clique of size k, there is a satisfiable boolean formula for 3SAT.

Vertex Cover

We will prove that VERTEX COVERpCLIQUE.

We say that a graph G=(V,E) has a vertex cover of size k if there is a subset of vertices SV that covers all edges in the graph and |S|=k.

Given a graph G=(V,E), we can generate the complement graph ˉG=(V,ˉE). Now, we solve the problem CLIQUE(ˉG,|V|k), and return YES if we have a solution, and NO otherwise.

You can see a full proof here

Written on March 16, 2017