NP-Completeness Introduction Decision Problems Polynomial-Time Reductions Introduction .............................................. 2 Decision Problems .......................................... 3 Reductions ............................................... 4 Problem Reduction Sequence ................................... 5 3SAT ................................................... 6 CLIQUE ................................................. 7 Reducing 3SAT to CLIQUE .................................... 8 VERTEX-COVER .......................................... 9 Reducing CLIQUE to VERTEX-COVER .......................... 10 SUBSET-SUM ........................................... 11 Reducing 3SAT to SUBSET-SUM .............................. 12 Complexity Class P ........................................ 13 Verification Algorithms ...................................... 14 Complexity Class NP ....................................... 15 Polynomial-Time Reducibility.................................. 16 Complexity Class NPC ...................................... 17 1 Introduction NP-Complete problems are of interest because they are problems we would like to solve, but it is unknown whether they have efficient algorithms. This includes: traveling salesman, knapsack, analysis of boolean expressions (always/never/sometimes true). We will start with examples of reductions , then to the definition of NP and NP-complete. CS 3343 Analysis of Algorithms NP-Completeness – 2 Decision Problems A problem specifies an input-output relationship, e.g., sorting a sequence of numbers, finding the minimum spanning tree. An instance is a single, specific input of a problem, a specific sequence of numbers, a specific weighted graph. In a decision problem, the output is either yes or no. Is the median greater than 50? Does the minimum spanning tree have a weight less than 50? CS 3343 Analysis of Algorithms NP-Completeness – 3 2
5
Embed
NP-Completeness - University of Texas at San Antoniobylander/cs3343/notes/np-completenesshandout.pdfCS3343AnalysisofAlgorithms NP-Completeness –6 CLIQUE CS3343AnalysisofAlgorithms
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
NP-Complete problems are of interest because they are problems we would liketo solve, but it is unknown whether they have efficient algorithms. Thisincludes: traveling salesman, knapsack, analysis of boolean expressions(always/never/sometimes true).
We will start with examples of reductions, then to the definition of NP andNP-complete.
CS 3343 Analysis of Algorithms NP-Completeness – 2
Decision Problems
A problem specifies an input-output relationship, e.g., sorting a sequence ofnumbers, finding the minimum spanning tree.
An instance is a single, specific input of a problem, a specific sequence ofnumbers, a specific weighted graph.
In a decision problem, the output is either yes or no. Is the median greater than50? Does the minimum spanning tree have a weight less than 50?
CS 3343 Analysis of Algorithms NP-Completeness – 3
2
Reductions
Most of NP-completeness is not concerned with algorithms for decisionproblems, but with relationships between decision problems. In particular, howan algorithm for one decision problem reduces to (can be used to solve)another decision problem.
Figure corresponds to the notation: A ≤P B
CS 3343 Analysis of Algorithms NP-Completeness – 4
Problem Reduction Sequence
CS 3343 Analysis of Algorithms NP-Completeness – 5
3
3SAT
CS 3343 Analysis of Algorithms NP-Completeness – 6
CLIQUE
CS 3343 Analysis of Algorithms NP-Completeness – 7
4
Reducing 3SAT to CLIQUE
CS 3343 Analysis of Algorithms NP-Completeness – 8
VERTEX-COVER
CS 3343 Analysis of Algorithms NP-Completeness – 9
5
Reducing CLIQUE to VERTEX-COVER
CS 3343 Analysis of Algorithms NP-Completeness – 10
SUBSET-SUM
CS 3343 Analysis of Algorithms NP-Completeness – 11
6
Reducing 3SAT to SUBSET-SUM
CS 3343 Analysis of Algorithms NP-Completeness – 12
Complexity Class P
CS 3343 Analysis of Algorithms NP-Completeness – 13
7
Verification Algorithms
CS 3343 Analysis of Algorithms NP-Completeness – 14
Complexity Class NP
Computer scientists believe P 6= NP, but no proof exists.
CS 3343 Analysis of Algorithms NP-Completeness – 15
8
Polynomial-Time Reducibility
CS 3343 Analysis of Algorithms NP-Completeness – 16
Complexity Class NPC
CS 3343 Analysis of Algorithms NP-Completeness – 17