Reductions NPC Flashcards

1
Q

NPC

A

A language L is NPC if Lis NP and for every language L’ in NP There is a reduction from L’ to L

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Cook Levin theorem

A

SAT∈NPC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3SAT∈NPC (SAT≤3SAT)

A

For every clause C that has more than three literals we change it to C’:
C’=(l1∨y1)∧
(~y1∨l2∨y2) ∧
(~y2∨l3∨y3) ∧

(~yk-1∨lk∨yk) ∧

(~ym-2∨lm-1∨ym-1) ∧
(~ym-1∨lm)

For a clause with less than three, we just multiply the existing ones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Vertex cover problem (VC)

A

Given an undirected graph G, what is the minimal group M of nodes so that each edge in the graph is covered. For the verification problem, we ask if there is a vertex cover under k.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

VC∈NPC (3SAT≤VC)

A

For every atomic class Xi we add to the graph
Xi <—> ~Xi
For every clause we create a triangle and add it to the graph. We then connect each part of the triangle to the correct assignment in the atomic clause. For example If I1 is ~X5 we connect them.
We also declare k = n+2m (n number of atomic clauses, m number of clauses).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Set Cover problem (SC)

A

Given a group of object S and a list of it’s sub-groups, what is the minimal number of subgroups so that each object in S is in at least one of the chosen subgroups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SC∈NPC (VC≤SC)

A

The nodes in the VC graph will act as the subgroups, so we have n number of subgroups. Which each subgroup i being the edges going out from the ith node. And the original group S = E.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The Clique problem (CLQ)

A

Given a graph G, is there a sub graph, that is fully connected of size k.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

CLQ∈NPC (VC≤CLQ)

A

Given a input (G=(V,E),k) for the VC problem, we construct the input for the CLQ problem
( (G=(V,~E),|V|-k)).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

3COL ≤ 4COL

A

Given a graph input G add to G a new node w and connect it to all nodes in G. This way if G is 3 colored, than you can 4 color it by just coloring in w in. a new color. Since w is connected to all, if the graph is 4 colored, than w is an exclusive color and G is 3 colored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

3COL ≤ Almost 3COL

A

Given a graph G, create the new graph G’ by adding to it a separate clique of size 4. If G is 3 colored, then the new graph is almost 3 colored with the miss being in the clique. If G’ is almost 3 colored, than G must be 3 colored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

TSP∈NPC (HAM≤TSP)

A

Given a graph G from the Hamilton cycle problem, we will build a new graph that is the same but a fully connected graph. With edge weight of 0 if it was present in G and 1 if not. Dnd set k=0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Subset-Sum∈NPC (3SAT≤Subset-Sum)

A

Given a 3SAT input with I variables and k clauses, we create a subset S with 2I + 2k members.
S:
yi has a 1 in every column i and in every column Cj where Xi is present.
zi has a 1 in every column i and in every column Cj where ~Xi is present.
gi and hi each have 1 in every Cj column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

partition problem

A

Given a set of numbers S return a possible partition so that both sub groups are different and their sums are equal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

PAR∈NPC (Subset-Sum≤PAR)

A

Given a (S,t) input for Subset Sum, we set our target k to be the half of the sum.
**If t=k: **
S’ = S
**If t < k: **
S’ = S ∪ {2k-st}
If t > k:
S’ = S ∪ {2t-sk}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

PAR≤PAR3

A

We will create a new group S’ = S ∪ {sum of all divided by 2}

17
Q

Bin packing problem

A

Given n objects, each of the o size 0<Si<1, what is the minimal number of boxes of size 1 are needed to pack all?

18
Q

Bin-Packing∈NPC (PAR≤Bin-Packing)

A

Given input S, we will build A,k so that:
B = all S but divided by the sum of S divided by 2.
k = 2.
This way if B is partition solvable it is also bin packing solvable since the items fit in 2 bins of size 1

19
Q

Dominating set problem

A

Given a graph, find the minimal set of nodes so that each node in the graph is either part of that set or a neighbor of a node who is.

20
Q

k center problem

A

given a graph, find the k nodes that minimizes the longest distance from a node that is not part of the group to a node that is.