NP Hardness Flashcards

1
Q

What is NP-hardness?

A

NP-hardness refers to the classification of decision problems which are at least as hard as the hardest problems in NP. If an NP-hard problem can be solved in polynomial time, then all problems in NP can also be solved in polynomial time.

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

What is the difference between P, NP, and NP-hard?

A

P is the class of problems solvable in polynomial time. NP is the class of problems verifiable in polynomial time. NP-hard problems may not be in NP but are as difficult as any problem in NP; they are the hardest problems in terms of computational complexity.

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

What does it mean if a problem is NP-complete?

A

A problem is NP-complete if it is in NP and as hard as any problem in NP. Solving any NP-complete problem quickly (in polynomial time) would allow all NP problems to be quickly solvable.

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

How do approximation algorithms relate to NP-hard problems?

A

Approximation algorithms provide near-optimal solutions to NP-hard problems in polynomial time, often with a known error margin or approximation ratio, making them practical despite the intractability of the exact solution.

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

What are meta-heuristics and how are they used in solving NP-hard problems?

A

Meta-heuristics are strategies that guide the search process towards optimal solutions by exploring and exploiting the solution space using methods like genetic algorithms, simulated annealing, and ant colony optimization. They are particularly useful for complex NP-hard problems.

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

What is a computationally tractable problem?

A

A problem is considered computationally tractable if it can be solved in polynomial time, which generally means the problem is in class P.

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

How can decision and optimization problems be related in computational complexity?

A

Every optimization problem has an associated decision problem that sets a threshold for the solution’s value. If the decision version is tractable, then the optimization problem is usually also considered tractable.

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

Why are decision problems significant in theoretical computer science?

A

Decision problems help in understanding the computational complexity of problems. They are central in classifying problems into complexity classes like P, NP, and others.

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

How are formal languages related to decision problems?

A

Decision problems can be represented as formal languages where each “yes” instance of a problem corresponds to a string in the language. This equivalence helps in applying theories from formal languages to computational problems.

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

What does it mean for a problem to be in the complexity class NP?

A

A problem is in class NP if there exists a polynomial-time verifier. A verifier can check whether a given solution to the problem is correct, also in polynomial time, based on some provided proof or witness.

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