MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta
Table of Contents Set Cover TSP : Traveling Salesman Problem
Set Cover Problem Problem Statement Given 1.A set U of n elements 2.A collection S 1, S 2,……., S m of subsets of U To Find : A collection of minimum number of subsets that cover (whose union equals U) all the elements in U. Decision Version: Given a number k, If there exists a collection of at most k of these subsets that covers (all the elements of) U.
Set Cover Problem An Application Suppose we want to build a system with n functionalities using m available modules of software. Each module is capable of performing some subset of these tasks (functionalities). Let S i denotes the set of functionalities provided by the i th module. Our goal, then, is to use a small number of modules such that the system possesses all n functionalities.
Set Cover Problem The little blue dots are the elements of U Black and Red figures represent sets. The dots that lie within a figure are the elements contained by that set. The red figure form the set cover. An Instance
Set Cover Problem is NPC Prove that it is in NP NP – hardness follows from generalization of vertex cover. HOW?......Assignment
(Metric) Traveling Salesman Problem Problem Statement Given A complete graph G with non- negative edge costs ( that satisfy triangle inequality) To Find A minimum cost cycle visiting every vertex exactly once. Decision Version: Does there exist a TS tour of cost <=k
TSP is NPC Prove that it is in NP NP – hardness follows from reduction from Hamiltonian Cycle. HOW? Assignment.