Complexity Classes Flashcards

(18 cards)

1
Q

What is a CNF?

A

Conjunctive Normal Form, or a conjunction of disjunctions

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

What is a K-CNF?

A

A boolean formula with n boolean variables (literals) in conjunction with K disjunctions

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

If there are 2^K clauses made up of variations of the same K literals, what can be said about the K-CNF?

A

It is unsatisfiable

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

For a K-CNF with n variables, how many possible assignments are there?

A

2^n

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

What are the four main complexity classes?

A

P, NP, NP-Complete, and NP-Hard

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

What is P complexity?

A

Problems that are solvable in polynomial time

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

What is NP complexity?

A

Problems that can be verified in polynomial time, but might not be solvable in that much time

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

What is NP-Complete?

A

A solution is verifiable in polynomial time, but you may need to go through all 2^n assignments

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

What is NP-Hard?

A

Not necessarily in NP time, but at least as hard as a problem in NPC time

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

What is K-CNFSAT?

A

Given a K-CNF, determine whether there is an assignment of variables that makes it true

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

What is the complexity class of K-CNFSAT when K is 2?

A

P, Polynomial

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

What is the complexity class of K-CNFSAT when K is 3?

A

NP, Nondeterministically Polynomial

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

What is the complexity class of K-CNF?

A

P, Polynomial

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

How do you prove that a problem is NP-Complete?

A

Prove that it is in NP, and check if it is in NPH

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

How do you prove if something is in NP?

A

Check if the problem is solvable in P time

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

How do you check if something is in NPH?

A

Reduce a known NPC problem to this unknown one, and prove it is solvable in P time

17
Q

What can you reduce to K-Clique that can prove that it’s verifiable in NPC?

A

Reduce 3-CNF with K clauses to K-Clique
1. Create vertex for each variable in clause
2. Connect each non-negating vertex in different clauses
3. If there is a clique, then 3-CNF is satisfiable, and K-Clique is NPH

18
Q

What can you reduce to Independent Set that can prove that it’s verifiable in NPC?

A

Reduce K-Clique to Independent Set

There is a K-Clique in G if and only if it is an Independent set in G’ and vice versa