Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Few Sample Reductions

Similar presentations


Presentation on theme: "A Few Sample Reductions"— Presentation transcript:

1 A Few Sample Reductions
Charles Cusack Department of Computer Science Hope College

2 Decision problems A decision problem Examples include
Involves input, which is known as the instance Asks a yes or no question Examples include Steiner Systems Maximum Clique 0-1 Integer Programming Exact Cover by 3-Sets

3 Steiner System Consider the list of all 3-subsets of a set of 7 elements on the right This is an instance of Steiner System The question is: Is there a subset of these such that every pair of points occurs exactly once? Here is one solution → Since there is a solution, we say that this is a yes-instance If there wasn’t a solution it would be called a no-instance 1 2 3 1 2 4 1 2 5 1 2 6 1 2 7 1 3 4 1 3 5 1 3 6 1 3 7 1 4 5 1 4 6 1 4 7 1 5 6 1 5 7 1 6 7 2 3 4 2 3 5 2 3 6 2 3 7 2 4 5 2 4 6 2 4 7 2 5 6 2 5 7 2 6 7 3 4 5 3 4 6 3 4 7 3 5 6 3 5 7 3 6 7 4 5 6 4 5 7 4 6 7 5 6 7 1 2 3 1 2 4 1 2 5 1 2 6 1 2 7 1 3 4 1 3 5 1 3 6 1 3 7 1 4 5 1 4 6 1 4 7 1 5 6 1 5 7 1 6 7 2 3 4 2 3 5 2 3 6 2 3 7 2 4 5 2 4 6 2 4 7 2 5 6 2 5 7 2 6 7 3 4 5 3 4 6 3 4 7 3 5 6 3 5 7 3 6 7 4 5 6 4 5 7 4 6 7 5 6 7 1 2 3 1 4 5 1 6 7 2 4 6 2 5 7 3 4 7 3 5 6

4 Maximum Clique Does the following graph contain 7 vertices that are all connected to one another? Here is one such set:

5 0-1 Integer Programming Is there a set of the rows of the matrix to the right such that every column of the selected rows contains exactly one “1”? Here is a solution:

6 Exact Cover by 3-Sets Let X = {0,1,...,20}.
To the right is a collection of 3-sets from X. Is there a subset of the collection such that every element of X is contained in exactly one subset? Here is one solution: 0 1 6 0 2 7 0 3 8 0 4 9 0 5 10 1 2 11 1 3 12 1 4 13 1 5 14 2 3 15 2 4 16 2 5 17 3 4 18 3 5 19 4 5 20 6 7 11 6 8 12 6 9 13 7 8 15 7 9 16 8 9 18 0 1 6 0 2 7 0 3 8 0 4 9 0 5 10 1 2 11 1 3 12 1 4 13 1 5 14 2 3 15 2 4 16 2 5 17 3 4 18 3 5 19 4 5 20 6 7 11 6 8 12 6 9 13 7 8 15 7 9 16 8 9 18 0 1 6 2 3 15 4 5 20 7 9 16

7 NP-Complete All of these problems are in a class called NP-complete
An instance of any NP-complete problem can be mapped to an instance of any other NP-complete problem in such a way that yes-instances get mapped to yes-instances and no-instances get mapped to no-instances This means that an algorithm to solve one NP-complete problem “works” on all NP-complete problems In this sense, NP-complete problems are all equivalent to each other

8 Examples Revisited 0 1 6 0 2 7 0 3 8 0 4 9 0 5 10 1 2 11 1 3 12 1 4 13 1 5 14 2 3 15 2 4 16 2 5 17 3 4 18 3 5 19 4 5 20 6 7 11 6 8 12 6 9 13 7 8 15 7 9 16 8 9 18 1 2 3 1 2 4 1 2 5 1 2 6 1 2 7 1 3 4 1 3 5 1 3 6 1 3 7 1 4 5 1 4 6 1 4 7 1 5 6 1 5 7 1 6 7 2 3 4 2 3 5 2 3 6 2 3 7 2 4 5 2 4 6 2 4 7 2 5 6 2 5 7 2 6 7 3 4 5 3 4 6 3 4 7 3 5 6 3 5 7 3 6 7 4 5 6 4 5 7 4 6 7 5 6 7

9 P = NP ? Is there an efficient algorithm to solve any NP-complete problem? This is one of the most important open questions in theoretical computer science. If the answer is “no” then there are thousands of problems for which no efficient algorithm will ever be found to solve If the answer is “yes” then many problems for which there was not an efficient algorithm will automatically be efficiently solvable (in theory) Unfortunately, most researchers believe the answer is “no” Nobody has been able prove this


Download ppt "A Few Sample Reductions"

Similar presentations


Ads by Google