Please enable JavaScript.
Coggle requires JavaScript to display documents.
M15 - Coggle Diagram
M15
P, NP, and NP-Complete Problems
We say that an algorithm solves a problem in polynomial time if its worst-case time efficiency belongs to O(p(n)) where p(n) is a polynomial of the problem’s input size n. Problems that can be solved in polynomial time are called tractable, and problems that cannot be solved in polynomial time are called intractable.
P and NP Problems
we can think about problems that can be solved in polynomial time as the set that computer science theoreticians call P. A more formal definition includes in P only decision problems, which are problems with yes/no answers.
-
-
Knapsack problem
Find the most valuable subset of n items of given positive integer weights and values that fit into a knapsack of a given positive integer capacity
Partition problem
Given n positive integers, determine whether it is possible to partition them into two disjoint subsets with the same sum.
Bin-packing problem
Given n items whose sizes are positive rational numbers not larger than 1, put them into the smallest number of bins of size 1.
Graph-coloring problem
For a given graph, find its chromatic number, which is the smallest number of colors that need to be assigned to the graph’s vertices so that no two adjacent vertices are assigned the same color.
-
NP-Complete Problems
Informally, an NP-complete problem is a problem in NP that is as difficult as any other problem in this class because, by definition, any other problem in NP can be reduced to it in polynomial time