Download presentation
Presentation is loading. Please wait.
1
Transitivity of poly Theorem: Let , ’, and ’’ be three decision problems such that poly ’ and ’ poly ’’. Then poly ’’. Proof: Corollary: If , ’ NP such that ’ poly and ’ NP-complete, then NP-complete Proof: –How can we prove that NP-hard? –How can we prove that NP-complete?
2
Proving NP-Completeness SAT 3-CNF-SAT Subset-Sum CliqueHamiltonian CycleVertex-CoverTraveling Salesman
3
Example NP-Complete Problems 3-CNF-SAT –Input: Boolean formula f in CNF, such that each clause consists of exactly three literals. –Question: Is f satisfiable. Hamiltonian Cycle –Input: G = (V,E), undirected graph. –Does G have a cycle that visits each vertex exactly once (Hamiltonian Cycle)? Traveling Salesman –Input: A set of n cities with their intercity distances and an integer k. –Question: Does there exist a tour of length less than or equal to k? A tour is a cycle that visits each vertex exactly once.
4
Example 1 Show that the traveling salesman problem is NP-complete, assuming that the Hamiltonian cycle problem is NP-complete.
5
Example 2 Prove that the Problem Clique is NP- Complete. Proof: 1.Clique NP 2.Clique NP-Hard 3-CNF-SAT poly Clique
6
Example 3 Prove that the problem Vertex Cover is NP- Complete Proof:
7
Example 4 Prove that the problem Independent Set is NP-Complete Proof:
8
Example NP-Complete Problems (Cont.) Subset Sum 3-Coloring 3D-Matching Hamiltonian Path Partition Knapsack Bin Packing Set Cover Multiprocessor Scheduling Longest Path …
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.