L14 - Problems in NP Flashcards

1
Q

What does NP stand for?

A

Non-deterministic Polynomial Time

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

What does it mean if a problem is in NP?

A

A problem for which an algorithm doesn’t exist to generate a solution in polynomial time, but a solution verifier program exists that operates in polynomial time.

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

Explain how we know all P is in NP…

A

Since all problems in P can generate solutions in polynomial time, they can also verify solutions in polynomial time. Thus all P is in NP.

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

Explain how the TSP is a problem in NP…

A

TSP can generate solutions in EXP time. But solutions (paths) can be verified in P time.

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

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

A
  • The problem is at least as hard as any problem in NP.
  • If the problem is solved in polynomial time, 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
6
Q

Doe NP-Hard problems have to be in NP?

A

No, but they have to be at least as hard as all problems in NP.

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

Define NP-Complete…

A
  • Problems that are NP-Hard as well as in NP.
  • If a solution to an NP-Complete problem is found in Polynomial time, all NP problems can be solved in Polynomial time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What was the first problem that was proven to be NP-Complete?

A

SAT -> Satisfying assignment

  • Assign boolean values to formula such that the formula is true.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do we solve NP-Complete algorithms?

A
  • Approximation algorithms -> Good enough solutions E.g ACO.
  • Probabilistic algorithms -> Provide solution based on probable outcome.
  • Exact algorithms -> For small inputs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly