Approximation Algorithms

Similar documents
Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

11. APPROXIMATION ALGORITHMS

Applied Algorithm Design Lecture 5

Algorithm Design and Analysis

Approximation Algorithms

Near Optimal Solutions

Scheduling Shop Scheduling. Tim Nieberg

Guessing Game: NP-Complete?

14.1 Rent-or-buy problem

Optimal Online-list Batch Scheduling

Topic: Greedy Approximations: Set Cover and Min Makespan Date: 1/30/06

Well-Separated Pair Decomposition for the Unit-disk Graph Metric and its Applications

Fairness in Routing and Load Balancing

THE BANACH CONTRACTION PRINCIPLE. Contents

Ph.D. Thesis. Judit Nagy-György. Supervisor: Péter Hajnal Associate Professor

5.4 Closest Pair of Points

MATH10040 Chapter 2: Prime and relatively prime numbers

Triangle deletion. Ernie Croot. February 3, 2010

CMPSCI611: Approximating MAX-CUT Lecture 20

Closest Pair Problem

Pigeonhole Principle Solutions

1. Prove that the empty set is a subset of every set.

20 Selfish Load Balancing

2.3 Convex Constrained Optimization Problems

Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

Load balancing of temporary tasks in the l p norm

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

Closest Pair of Points. Kleinberg and Tardos Section 5.4

An improved on-line algorithm for scheduling on two unrestrictive parallel batch processing machines

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

3. Mathematical Induction

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

8 Primes and Modular Arithmetic

Metric Spaces. Chapter Metrics

GRAPH THEORY LECTURE 4: TREES

6.2 Permutations continued

Load Balancing. Load Balancing 1 / 24

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

Cpt S 223. School of EECS, WSU

CK-12 Geometry: Parts of Circles and Tangent Lines

Geometric Transformations

8 Divisibility and prime numbers

Chapter 3. if 2 a i then location: = i. Page 40

Approximability of Two-Machine No-Wait Flowshop Scheduling with Availability Constraints

Adaptive Online Gradient Descent

1 Solution of Homework

The Graphical Method: An Example

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

Data Structures Fibonacci Heaps, Amortized Analysis

Scheduling Parallel Jobs with Monotone Speedup 1

Scheduling Parallel Jobs with Linear Speedup

University Dortmund. Robotics Research Institute Information Technology. Job Scheduling. Uwe Schwiegelshohn. EPIT 2007, June 5 Ordonnancement

Systems of Linear Equations

1 Norms and Vector Spaces

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

List Scheduling in Order of α-points on a Single Machine

CMSC 858T: Randomized Algorithms Spring 2003 Handout 8: The Local Lemma

Private Approximation of Clustering and Vertex Cover

Diffuse Reflection Radius in a Simple Polygon

α = u v. In other words, Orthogonal Projection

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Modern Optimization Methods for Big Data Problems MATH11146 The University of Edinburgh

11 Multivariate Polynomials

Dynamic TCP Acknowledgement: Penalizing Long Delays

(Refer Slide Time: 01.26)

THE SCHEDULING OF MAINTENANCE SERVICE

SUM OF TWO SQUARES JAHNAVI BHASKAR

Collinear Points in Permutations

Descriptive statistics Statistical inference statistical inference, statistical induction and inferential statistics

CHAPTER 9. Integer Programming

Row Echelon Form and Reduced Row Echelon Form

Classification - Examples

Mechanisms for Fair Attribution

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Ronald Graham: Laying the Foundations of Online Optimization

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Distributed Load Balancing for Machines Fully Heterogeneous

No: Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics

TU e. Advanced Algorithms: experimentation project. The problem: load balancing with bounded look-ahead. Input: integer m 2: number of machines

Notes on metric spaces

DATA MINING CLUSTER ANALYSIS: BASIC CONCEPTS

ON THE COMPLEXITY OF THE GAME OF SET.

ON FIBER DIAMETERS OF CONTINUOUS MAPS

MATH 60 NOTEBOOK CERTIFICATIONS

Definition Given a graph G on n vertices, we define the following quantities:

Linear Programming Notes V Problem Transformations

GENERATING LOW-DEGREE 2-SPANNERS

Metric Spaces Joseph Muscat 2003 (Last revised May 2009)

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

Nimble Algorithms for Cloud Computing. Ravi Kannan, Santosh Vempala and David Woodruff

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Mathematical Methods of Engineering Analysis

BANACH AND HILBERT SPACE REVIEW

Transcription:

Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one of three desired features. Solve problem to optimality. Solve problem in poly-time. Solve arbitrary instances of the problem. ρ-approximation algorithm. Guaranteed to run in poly-time. Guaranteed to solve arbitrary instance of the problem Guaranteed to find solution within ratio ρ of true optimum. Challenge. Need to prove a solution's value is close to optimum, without even knowing what optimum value is! 2

11.1 Load Balancing

Load Balancing Input. m identical machines; n jobs, job j has processing time t j. Job j must run contiguously on one machine. A machine can process at most one job at a time. Def. Let J(i) be the subset of jobs assigned to machine i. The load of machine i is L i = Σ j J(i) t j. Def. The makespan is the maximum load on any machine L = max i L i. Load balancing. Assign each job to a machine to minimize makespan. 4

Load Balancing: List Scheduling List-scheduling algorithm. Consider n jobs in some fixed order. Assign job j to machine whose load is smallest so far. List-Scheduling(m, n, t 1,t 2,,t n ) { for i = 1 to m { L i 0 load on machine i J(i) φ } jobs assigned to machine i } for j = 1 to n { i = argmin k L k J(i) J(i) {j} L i L i + t j } machine i has smallest load assign job j to machine i update load of machine i Implementation. O(n log n) using a priority queue. 5

Load Balancing: List Scheduling Analysis Theorem. [Graham, 1966] Greedy algorithm is a 2-approximation. First worst-case analysis of an approximation algorithm. Need to compare resulting solution with optimal makespan L*. Lemma 1. The optimal makespan L* max j t j. Pf. Some machine must process the most time-consuming job. Lemma 2. The optimal makespan Pf. The total processing time is Σ j t j. L * m 1 j t j. One of m machines must do at least a 1/m fraction of total work. 6

Load Balancing: List Scheduling Analysis Theorem. Greedy algorithm is a 2-approximation. Pf. Consider load L i of bottleneck machine i. Let j be last job scheduled on machine i. When job j assigned to machine i, i had smallest load. Its load before assignment is L i - t j L i - t j L k for all 1 k m. blue jobs scheduled before j machine i j 0 L i - t j L = L i 7

Load Balancing: List Scheduling Analysis Theorem. Greedy algorithm is a 2-approximation. Pf. Consider load L i of bottleneck machine i. Let j be last job scheduled on machine i. When job j assigned to machine i, i had smallest load. Its load before assignment is L i - t j L i - t j L k for all 1 k m. Sum inequalities over all k and divide by m: L i t j 1 m k L k = 1 m k t k L * Now L i = (L i t j ) 14 243 + t j 2L *. { L* Lemma 1 L* Lemma 2 8

Load Balancing: List Scheduling Analysis Q. Is our analysis tight? A. Essentially yes. Ex: m machines, m(m-1) jobs length 1 jobs, one job of length m machine 2 idle machine 3 idle machine 4 idle m = 10 machine 5 idle machine 6 idle machine 7 idle machine 8 idle machine 9 idle machine 10 idle list scheduling makespan = 19 9

Load Balancing: List Scheduling Analysis Q. Is our analysis tight? A. Essentially yes. Ex: m machines, m(m-1) jobs length 1 jobs, one job of length m m = 10 optimal makespan = 10 10

Load Balancing: LPT Rule Longest processing time (LPT). Sort n jobs in descending order of processing time, and then run list scheduling algorithm. LPT-List-Scheduling(m, n, t 1,t 2,,t n ) { Sort jobs so that t 1 t 2 t n for i = 1 to m { L i 0 J(i) φ } load on machine i jobs assigned to machine i } for j = 1 to n { i = argmin k L k J(i) J(i) {j} L i L i + t j } machine i has smallest load assign job j to machine i update load of machine i 11

Load Balancing: LPT Rule Observation. If at most m jobs, then list-scheduling is optimal. Pf. Each job put on its own machine. Lemma 3. If there are more than m jobs, L* 2 t m+1. Pf. Consider first m+1 jobs t 1,, t m+1. Since the t i 's are in descending order, each takes at least t m+1 time. There are m+1 jobs and m machines, so by pigeonhole principle, at least one machine gets two jobs. Theorem. LPT rule is a 3/2 approximation algorithm. Pf. Same basic approach as for list scheduling. L i = (L i t j ) 14 243 + t j { 2 3 L *. L* 1 2 L* Lemma 3 ( by observation, can assume number of jobs > m ) 12

Load Balancing: LPT Rule Q. Is our 3/2 analysis tight? A. No. Theorem. [Graham, 1969] LPT rule is a 4/3-approximation. Pf. More sophisticated analysis of same algorithm. Q. Is Graham's 4/3 analysis tight? A. Essentially yes. Ex: m machines, n = 2m+1 jobs, 2 jobs of length m+1, m+2,, 2m-1 and one job of length m. 13

11.2 Center Selection

Center Selection Problem Input. Set of n sites s 1,, s n. Center selection problem. Select k centers C so that maximum distance from a site to nearest center is minimized. k = 4 r(c) center site 15

Center Selection Problem Input. Set of n sites s 1,, s n. Center selection problem. Select k centers C so that maximum distance from a site to nearest center is minimized. Notation. dist(x, y) = distance between x and y. dist(s i, C) = min c C dist(s i, c) = distance from s i r(c) = max i dist(s i, C) = smallest covering radius. to closest center. Goal. Find set of centers C that minimizes r(c), subject to C = k. Distance function properties. dist(x, x) = 0 (identity) dist(x, y) = dist(y, x) (symmetry) dist(x, y) dist(x, z) + dist(z, y) (triangle inequality) 16

Center Selection Example Ex: each site is a point in the plane, a center can be any point in the plane, dist(x, y) = Euclidean distance. Remark: search can be infinite! r(c) center site 17

Greedy Algorithm: A False Start Greedy algorithm. Put the first center at the best possible location for a single center, and then keep adding centers so as to reduce the covering radius each time by as much as possible. Remark: arbitrarily bad! greedy center 1 k = 2 centers center site 18

Center Selection: Greedy Algorithm Greedy algorithm. Repeatedly choose the next center to be the site farthest from any existing center. Greedy-Center-Selection(k, n, s 1,s 2,,s n ) { } C = φ repeat k times { Select a site s i with maximum dist(s i, C) Add s i to C } site farthest from any center return C Observation. Upon termination all centers in C are pairwise at least r(c) apart. Pf. By construction of algorithm. 19

Center Selection: Analysis of Greedy Algorithm Theorem. Let C* be an optimal set of centers. Then r(c) 2r(C*). Pf. (by contradiction) Assume r(c*) < ½ r(c). For each site c i in C, consider ball of radius ½ r(c) around it. Exactly one c i * in each ball; let c i be the site paired with c i *. Consider any site s and its closest center c i * in C*. dist(s, C) dist(s, c i ) dist(s, c i *) + dist(c i *, c i ) 2r(C*). Thus r(c) 2r(C*). Δ-inequality r(c*) since c i * is closest center ½ r(c) ½ r(c) C* sites ½ r(c) s c i c i * 20

Center Selection Theorem. Let C* be an optimal set of centers. Then r(c) 2r(C*). Theorem. Greedy algorithm is a 2-approximation for center selection problem. Remark. Greedy algorithm always places centers at sites, but is still within a factor of 2 of best solution that is allowed to place centers anywhere. e.g., points in the plane Question. Is there hope of a 3/2-approximation? 4/3? Theorem. Unless P = NP, there no ρ-approximation for center-selection problem for any ρ < 2. 21