Presentation is loading. Please wait.

Presentation is loading. Please wait.

MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta

Similar presentations


Presentation on theme: "MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta"— Presentation transcript:

1 MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta ngupta@cs.du.ac.in

2 Table of Contents Set Cover TSP : Traveling Salesman Problem

3 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.

4 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.

5 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

6 Set Cover Problem is NPC Prove that it is in NP NP – hardness follows from generalization of vertex cover. HOW?......Assignment

7 (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

8 TSP is NPC Prove that it is in NP NP – hardness follows from reduction from Hamiltonian Cycle. HOW? Assignment.


Download ppt "MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta"

Similar presentations


Ads by Google