Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.

Slides:



Advertisements
Similar presentations
Shortest Vector In A Lattice is NP-Hard to approximate
Advertisements

Covers, Dominations, Independent Sets and Matchings AmirHossein Bayegan Amirkabir University of Technology.
Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Approximation Algorithms Chapter 14: Rounding Applied to Set Cover.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Private Approximation of Search Problems Amos Beimel Paz Carmi Kobbi Nissim Enav Weinreb Ben Gurion University Research partially Supported by the Frankel.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Combinatorial Algorithms
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
P-Center & The Power of Graphs A part of the facility location problem set By Kiril Yershov and Alla Segal For Geometric Optimizations course Fall 2010.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Approximation Algorithm: Iterative Rounding Lecture 15: March 9.
Vertex Cover, Dominating set, Clique, Independent set
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
Approximation Algorithms
1 Vertex Cover Problem Given a graph G=(V, E), find V' ⊆ V such that for each edge (u, v) ∈ E at least one of u and v belongs to V’ and |V’| is minimized.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
A 2-Approximation algorithm for finding an optimum 3-Vertex-Connected Spanning Subgraph.
1 Combinatorial Dominance Analysis Keywords: Combinatorial Optimization (CO) Approximation Algorithms (AA) Approximation Ratio (a.r) Combinatorial Dominance.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Complexity 1 Hardness of Approximation. Complexity 2 Introduction Objectives: –To show several approximation problems are NP-hard Overview: –Reminder:
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
A General Approach to Online Network Optimization Problems Seffi Naor Computer Science Dept. Technion Haifa, Israel Joint work: Noga Alon, Yossi Azar,
Hardness Results for Problems
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
1 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
APPROXIMATION ALGORITHMS VERTEX COVER – MAX CUT PROBLEMS
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Approximation Algorithms
1 Combinatorial Algorithms Parametric Pruning. 2 Metric k-center Given a complete undirected graph G = (V, E) with nonnegative edge costs satisfying the.
Private Approximation of Search Problems Amos Beimel Paz Carmi Kobbi Nissim Enav Weinreb (Technion)
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
MCS 312: NP Completeness and Approximation Algorithms Instructor Neelima Gupta
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Approximation Algorithms based on linear programming.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The NP class. NP-completeness
Haim Kaplan and Uri Zwick
Vertex Cover, Dominating set, Clique, Independent set
NP-Completeness Yin Tat Lee
Computability and Complexity
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 28 Coping with NP-Completeness
Problem Solving 4.
NP-Completeness Yin Tat Lee
EE5900 Advanced Embedded System For Smart Infrastructure
Clustering.
Presentation transcript:

Approximation Algorithms Chapter 5: k-center

Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm for k-center n 3-approx. algorithm for weighted k-center n Proof of inapproximabilities of k-center –Under the assumption that P ≠ NP. No (2-  )-approx. algorithm for k-center No a (n)-approx. algorithm for k-center –Where the triangle inequality does not necessarily hold on weights of edges.

k-center n Task: –Choose k vertices that minimize the distances (costs) between any vertex and the chosen vertices.

k-center n Task: –Choose k vertices that minimize the distances (costs) between any vertex and the chosen vertices. –In the example below, k = 2.

Applications of k-center (1/2) n Find appropriate location of branch offices. –It could be cost-effective if the branch offices place as close as possible to any offices.

Applications of k-center (2/2) n Clustering by center points –In this application, the sum of the distances among vertices in a cluster is not considered. –In this clustering, the longest distance in each cluster should be minimized.

Definition of k-center (1/2) n Input: –Undirected complete graph with n vertices G=(V, E). The triangle inequality holds on costs of edges. –Positive integer k. # vertices selected as centers k =2 ab cd

Definition of k-center (2/2) Output: S ⊆ V that minimizes the cost of S (|S|=k). –The cost of S: the maximum value of costs of edges e=(v,s) between v ∈ V and s ∈ S k = ab cd ab cd ab cd Cost: 5Cost: 6 : vertex chosen

Parametric pruning (1/3) n Technique to search for optimal solution. n [Basic idea] –Suppose the cost of the optimal solution is known. –This assumption makes an input simpler by removing irrelevant parts (edges). –However, how do we know the cost in advance? Cost: 5 Pruning ab cd 54 ab cd

Parametric pruning (2/3) n Case of a minimization problem n I(t): pruned input of input I without its irrelevant parts –irrelevant parts are what will not be used in any solution of cost < t. Parametric pruning 1.Let T={t 1,…,t k }. 2.Find a lower bound of the optimal cost OPT from I(t). Let I(t*) be a pruned input for finding the lower bound. 3.Choose appropriate positive a, and find the solution of I(at*).

Parametric pruning (3/3) n Prune parts of an input based on cost. –In case of k-center, pruning is done on weights of edges. pruning ab cd 4 ab cd 54 ab cd 54 6 ab cd ab cd ab cd ab cd G1G1 G2G2 G3G3 G4G4 G5G5 G6G6 G

Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm for k-center n 3-approx. algorithm for weighted k-center n Proof of inapproximabilities of k-center –Under the assumption that P ≠ NP. No (2-  )-approx. algorithm for k-center No a (n)-approx. algorithm for k-center –Where the triangle inequality does not necessarily hold on weights of edges.

2-approximation algorithm 2-approx. algorithm for k-center Theorem 5.5 Lower bound of the optimal cost OPT Lemma 5.4 Parametric pruning based on the maximal independent set Algorithm 5.3 Square of a graph Relation between the dominating set and the maximal independent set Lemma 5.2 Equivalence between k-center and the dominating set The dominating setk-center

Dominating set n A set of chosen vertices s.t. any vertex is adjacent to a chosen vertex. a bc de a bc de a bc de a bc de a bc de Input

Equivalence between… n k-center –Any weight of edge between a vertex and some chosen vertex is not more than OPT. n Dominating set of G i –Any vertex is connected to some chosen vertex by a edge with weight less than OPT a bc de 4 54 a bc de cost (e i* ) = OPT.

2-approximation algorithm 2-approx. algorithm for k-center Theorem 5.5 Lower bound of the optimal cost OPT Lemma 5.4 Parametric pruning based on the maximal independent set Algorithm 5.3 Square of a graph Relation between the dominating set and the maximal independent set Lemma 5.2 Equivalence between k-center and the dominating set The dominating setk-center

Square of a graph n G 2 : Any pair of vertices are adjacent if the path length between the vertices in G is at most two. GG2G2 G’G’ 2 G’’ G’’ 2

Stars and cliques n Star: K 1,p n Stars: A set of stars that cover all the vertices. K 1,6 G Stars in G K 1,3 K 1,3 2 Clique

Independent set n Independent set S ⊆ V in H –Chosen vertices s, s’ ∈ S are not adjacent. G G’ G’’ Independent set G G’ G’’ Non-independent set

Algorithm 5.3 n Input: graph G, positive integer k. n 1. Construct G 1 2, …, G m 2. n 2. Compute a maximal independent set, M i, in each graph G i 2. n 3. Find the smallest index i s.t. |M i | ≦ k, say j. n 4. Return M j.

Overview of Algorithm 5.3 Find a maximal independent set in G i 2. There is at most one chosen vertex in a clique in G i 2. Construct G i 2 from G i. There is at most one chosen vertex in a star in G i. Any vertex is connected to a chosen vertex with a path of length 2

Algorithm 5.3 n Input: graph G, pos. int. k. n 1. Construct G 1 2, …, G m 2. n 2. Find a maximal indep- endent set M i for each G i 2. n 3. Find the smallest index j s.t. |M i | ≦ k. n 4. Return M j. G k=2

Algorithm 5.3 n Input: graph G, pos. int. k. n 1. Construct G 1 2, …, G m 2. n 2. Find a maximal indep- endent set M i for each G i 2. n 3. Find the smallest index j s.t. |M j | ≦ k. n 4. Return M j. G k=2

Lemma 5.2 (1/3) n |I| ≦ |D| holds in H. –I : independent set of H 2 (used in Algorithm 5.3), –D: a minimal dominating set of H (k-center). |I| ≦ # cliques in H 2 = # stars in H = |D|.

Lemma 5.2 (2/3) n |I| ≦ |D| holds in H, –where I is the independent set in H 2 and D is the minimum dominating set in H. |I| ≦ # cliques in H 2 = # stars in H = |D|. Only one vertex is available in a clique for an element of an independent set. H H2H2

Lemma 5.2 (3/3) n I| ≦ |D| holds in H, –where I is the independent set in H 2 and D is the minimum dominating set in H. Example of such case where |I| < # cliques in H. HH2H2 A clique in H 2 |I| ≦ # cliques in H 2 = # stars in H = |D|.

Lemma 5.4 (1/2) n Algorithm 5.3 finds j s.t. cost(e j ) ≦ OPT. k 12j-1j index i | M i | dom(G i ) i* 1 2

Lemma 5.4 (2/2) n Algorithm 5.3 finds j s.t. cost(e j ) ≦ OPT. k 12j index i | M i | dom(G i ) i* 1 2 j is not the minimum value s.t. | M i | ≦ k.

Theorem 5.5 (1/3) n Algorithm 5.3 is a 2-approximation algorithm for k-center. –A maximal independent set S is also a dominating set. To show this property, suppose that a set S is not a dominating set, but a maximal independent set. Maximal independent set S. Suppose a non- dominating vertex exists. This must be in the maximal independent set. This fact contradicts with “S is a maximal independent set.” Any of its adjacent vertices are not chosen. =

Theorem 5.5 (2/3) n The maximal dominating set M i Algorithm 5.3 finds is also a dominating set. –Dominating set = set of centers of stars in G i 2. Gi2Gi2 GiGi Some edges does not appear in G i. = Its weight is more than cost(e j ). The edge exists in G i 2. In G i, these two vertices are connected with a path length=2. =

Theorem 5.5 (3/3) n Algorithm 5.3 is a 2-approximation algorithm for k-center. –Weight of any edge in G i 2, but not in G i is at most 2cost (e i ). –The triangle inequalities are assumed on the weights. Edge in G i 2 but not in G i. a b 2 cost(e i ) ≦ 2 OPT. Less than cost(e i )

A tight example k = 1 OPT = Gi2Gi2 GiGi Cost: 2 2

Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm for k-center n 3-approx. algorithm for weighted k-center n Proof of inapproximabilities of k-center –Under the assumption that P ≠ NP. No (2-  )-approx. algorithm for k-center No a (n)-approx. algorithm for k-center –Where the triangle inequality does not necessarily hold on weights of edges.

Idea of Theorem 5.7 Assumption: P ≠ NP. P NP NP-hard problem cannot be solved in polynomial time. Input of dominating set (NP-complete problem) (2-  ) approx. poly. algorithm for k-center Answer for its input Such algorithm does not exist. Inconsistent

NP-hardness of dominating set (1/3) n Poly. time reduction from Vertex Cover. – –Vertex Cover is known as an NP-hard problem Input of vertex cover a bc de a bc de Input of dominating set abac bd cd ce de bc k=3

NP-hardness of dominating set n Solution of Vertex Cover → Solution of dominating set. Input of vertex cover a bc de bc de Input of dominating set bd cd ce de At least one of vertices for each edge must be chosen. Any vertex is adjacent to a chosen vertex. a abac bc

NP-hardness of dominating set n Solution of Vertex Cover ← Solution of dominating set Input of Vertex Cover a bc de bc de Input of dominating set bd cd ce de bc de Input of dominating set’ bd cd ce de a abac bc a abac bc

Theorem 5.7 n Poly. time reduction from dominating set to k- center. a bc de Dominating set a bc de k -center weight 1 weight 2 The triangle Inequality holds on weights of edges.

Theorem 5.7 n Reduction from dominating set to k-center. a bc de Dominating set a bc de k -center Cost of sol. = 1 [# vertices in a dominating set in G] ≦ k > k Cost of sol. = 2 For any input, cost of the solution is always less than (2- e )OPT. In this case, edges with weight 2 are unavailable. (2- e )-approx. algorithm exists.

Corollary n Suppose G does not satisfy the triangle inequality. No a (n)-approx. algorithm for k-center in G. a bc de Dominating set a bc de k -center Cost: 1 [# vertices in a dominating set in G] ≦ k > k Cost: a (n) + e For any input, the cost must be less than a (n)OPT. Edges with a (n) + e are unavailable.

Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm for k-center n 3-approx. algorithm for weighted k-center n Proof of inapproximabilities of k-center –Under the assumption that P ≠ NP. No (2-  )-approx. algorithm for k-center No a (n)-approx. algorithm for k-center –Where the triangle inequality does not necessarily hold on weights of edges.

Weighted k-center k = ab cd ab cd ab cd ab cd ab cd ab cd W = 30. k-centerWeighted k-center Weights on vertices

Weighted k-center n Weighted k-center is a generalization of k-center. k = ab cd ab cd ab cd ab cd ab cd W = ab cd k-centerWeighted k-center

Lemma 5.2 in weighted k-center n k-center –# vertices in an independent set in H 2 ≦ # vertices in a minimal dominating set of H n Weighted k-center –Sum of weights of vertices in an independent set in H 2 ≦ Sum of weights of vertices in a minimal dominating set of H ? HH2H Counter example

Adjacent vertices with min. weight n s(u): vertex adjacent to u in H with the minimum weight. –u can be s(u). –Not in H 2. ab cd s(a)=a, s(b)=a, s(c)=c, s(d)=c. H ab cd H2H2

Lemma 5.9 (1/2) w(S) ≦ w(D) = wdom(H). –Consider stars whose centers are in a minimal weight dominating set. H

Lemma 5.9 (2/2) w(S) ≦ w(D) = wdom(H). –S ={s(u)|u I} (a set of vertices that is adjacent to a vertex in I). –D: A minimum weight dominating set of H. –wdom(H): weight of a minimum weight dominating set of H. At most one vertex can be chosen from a clique as an element of an independent set. H H2H2 Choose a vertex with less weight. Weight of the vertex in S is less than weight in D. Vertex in a minimal weight dominating set D.

Algorithm 5.10 n Input: graph G, positive integer k. n 1. Construct G 1 2, …, G m 2. n 2. Compute a maximal independent set, M i, in each graph G i S i ={s i (u): u ∈ M i } 4. Find the minimum index j s.t. w(S i ) ≦ W. n 5. Return S j.

Algorithm 5.10 n Input: graph G, pos. int. k. n 1. Construct G 1 2, …, G m 2. n 2. Compute a max. indep- endent set, M i, in each G i Find the min. index j s.t. |M j | ≦ k. n 4. Return M j. G

Algorithm 5.10 n Input: graph G, pos. int. k. n 1. Construct G 1 2, …, G m 2. n 2. Compute a max. indep- endent set, M i, in each G i Find the min. index j s.t. |M j | ≦ k. n 4. Return M j. G W=30W=40W=20 W=10 W=30

Lower bound for OPT cost(e j ) ≦ OPT where j was obtained by Algorithm W 12j-1j index i w(Si)w(Si) wdom(G i ) i*

Theorem 5.11 n Like Theorem 5.5, the cost (length of path) between any vertex and the closest vertex in a weighted min. independent set is at most 2cost(e j ). n The cost between any vertex and the closest vertex in s(u) is at most 3cost(e j ). Moving to a vertex with less weight. Weight is at most 2cost(e j ) in G. Weight is at most 3cost(e j ) in G.

Example 5.12 ( A tight example ) 1 1+ e ∞ e 3+ e 4+ e G3G ∞ Sum of weights of vertices: ∞ G4G4 111 Cost: 3 1+ e W=3 G42G e Sum of weights of vertices: 1 A maximal independent set A maximal ind. set Moving to a vertex with less weight Minimum cost: 1+ 

Conclusion n Parametric pruning was introduced. –Technique for approximation algorithms –2-approx. algorithm for k-center –3-approx. algorithm for weighted k-center –Proof of inapproximabilities of k-center Under the assumption that P ≠ NP.