P and NP Flashcards

1
Q

Describe P class

A

Problems that belong to class P are those for which an algorithm can find a solution in polynomial time, specifically in
O(n^k) time, where
n is the input size and
k is a constant.

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

Describe the NP class

A

Problems for which a potential solution can be verified in polynomial time but not necessarily found in polynomial time.

Example: The Traveling Salesman Problem (TSP). Given a set of cities and the distances between them, finding the shortest possible route that visits each city exactly once and returns to the origin city is an NP problem.

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

Describe the NP Complete problem

A

NP-Complete problems are the hardest problems in NP for which no efficient solution has been found. If any one of them is solved efficiently, all problems in NP can be solved efficiently.

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

Describe the NP Hard Class.

A

Problems that are at least as hard as the hardest problems in NP but might not be in NP themselves.

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