Complexity and NP-Completeness Flashcards
What is P?
all the problems SOLVABLE in polynomial time
What is a decision problem?
The answer is either yes or no
What is NP?
decision problem SOLVABLE in NON-deterministic polynomial time
What does non-deterministic mean?
choice during running is not determined by input. ARBITRARY GUESS AMONG MANY POSSIBILITIES
When is a problem A reducible to a problem B?
- when ANY instance a of A can be transformed into some instance b of B
- transformation takes poly time
- answer a “yes” iff answer of b “yes”
If A reduces to B which one is harder to solve?
they are both equally hard to solve
What are the steps of proving language L is NP complete by reduction?
- Prove LeNP
- Select known NP-Complete Language L’
- Describe algorithm the computes f mapping every instance of xeL’ to instance f(x) of L
- Prove xeL’ iff f(x)eL for all xe{0,1}*
- Prove that f runs in polynomial time
When is problem x NP-complete?
xeNP && xeNP-hard
When is a problem NP-hard?
When every NP problem reduces to x
Informal way of describing NP-completeness
Problem is EXACTLY as hard as everything in NP
Informal way of describing NP-hardness?
Problem is no easier than everything in NP
Informal way of describing NP?
Problem is no harder than everything in NP
If problem BeP and A is reducible to B where does A belong?
P
If problem BeNP and A is reducible to B where does A belong?
NP