NP-completeness Flashcards

1
Q

What is a computable function

A

A function f : Σ∗ → Σ∗ on words from Σ∗
is computable if there is a
(deterministic) Turing Machine Mf such that:

.M accepts w for all w ∈ Σ∗ (strings formed from alphabet)
. When started in configuration
(qinit, ε, w) the machine eventually
terminates in configuration qaccept, ε, f(w)

ie - contents of tape changed from w(input string) to f(w) the output with the tapehead to the start of the output

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

polynomial reduction

A

A polynomial reduction from a problem X to a problem Y is a
function f : Σ∗ → Σ∗ computable in polynomial-time such that
w ∈ X ⇐⇒ f(w) ∈ Y
X ≤p Y means X is polynomially reducible to Y

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

summary of polynomial reduction

A

If we have two problems, X and 𝑌:
. We can transform any instance w of problem X into an instance 𝑓(𝑤) of problem 𝑌 efficiently, i.e., in polynomial time.

. Solution properties are preserved (if answer on input w in X is Yes answer for f(w) in Y is also Yes)

. if you can solve f(w) ( instance of Y) efficiently you can solve w ( instance of X) efficiently by using function to transform w to f(w) and using Y’s solution as transformation preserves solution properties

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

X ≤p Y
is X or Y harder

A

Y is at least as hard as X since the way to solve X is transforming an input of X to an input of Y and using Y’s solution to determine what X’s solution is

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

NP hardness

A

A problem is said to be NP-hard if every problem in NP can be polynomially reduced to it

Y ≤p X for all Y ∈ NP
X is at least as hard as all NP problems

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

relationship between NP hardness and P = NP

A

. Every NP problem can be reduced to an NP- hard problem in polynomial time (efficiently)
. if you can solve an NP hard problem efficiently you can solve every NP Problem efficiently (due to preservation of solution properties)
. This would mean P = NP
as you have shown NP problems(which before could only be verified efficiently) can be solved efficiently

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

Prove NP- hardness
Theroem If Y is NP-hard and Y ≤p X , then X is also NP-hard

A

Proof :
1) Y IS NP-HARD
Z ≤p Y for z ∈ NP
2) transitivity:
if Z ≤p Y and Y ≤p X
Z ≤p Y ≤p X
therefore Z ≤p X Z ∈ NP
- this means X is NP hard as all NP problems can
polynomially reduced to X

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

NP complete

A

. X is NP-hard (lower bound) at least as difficult as hardest problems in NP

. X also belongs to NP
- worst case time to verify a solution does not exceed
polynomial time

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