Exam 3 - NP Reductions Problems Flashcards

1
Q

If I want to assign bits to objects, choose a subset of objects, or partition objects into two different subsets, what problems might I reduce from?

A

SAT
k-SAT where k > 2

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

If I want to assign labels to objects from a small fixed set or partition objects into a small number of subsets, what problems might I reduce from?

A

k-Colorings

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

If I want to find a small subset satisfying some constraints, what problems might I reduce from?

A

Vertex Cover

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

If I want to find a large subset satisfying some constraints, what problems might I reduce from?

A

Independent Sets
Clique

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

If the number 3 naturally appears in the problem, what problems might I reduce from?

A

3SAT

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

If all else fails, what problems might I reduce from?

A

Knapsack search
3SAT
Subset sum

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

What contradiction proves that it’s impossible to have an algorithm that solves the halting problem?

A

Assume we have a halting algorithm H, such that
H(Program, Input)
returns true or false depending on whether the program would halt

We write program
D(Program):
if H(P,P):
# infinite loop
else:
return # halts here

Which shows us a contradiction if we run D(D)

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

What is the input of the SAT problem?

A

boolean formula f in CNF, with n variables and m clauses

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

What is the output of the SAT problem?

A

A satisfying assignment if one exists, NO otherwise

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

What is the input of the colorings problem?

A

undirected G = (V,E) and integer k > 0

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

What is the output of the colorings problem?

A

Assign each vertex a color in {1 , 2 , … , k} so that adjacent vertices get different colors, and NO if no such k-coloring exists for G

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

What is a solution for the Vertex Cover problem?

A

For a given G = (V,E), the vertices in S, a subset of V, is a vertex cover if they “cover every edge”, for every (x,y) in E either x and/or y is in S

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

What is a solution for the Independent Set problem?

A

For a given G = (V,E) subset of vertices S from V is an independent set if no edges are contained in S – for any two vertices x and y in S, there is no edge (x,y)

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

What is a solution for the Clique problem?

A

A clique is a fully connected subgraph – every vertex in the clique is connected to every other vertex

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

What is the knapsack-search problem?

A

Given input weights {w_1 , … , w_n} and values {v_1 , … , v_n} find a combination of items with weight less than B and value greater than g

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

What is the input and output to the subset sum problem?

A

input: positive integers a_1, … , a_n , and t
output: subset S of the integers where the sum is equal to t