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.

Slides:



Advertisements
Similar presentations
Iterative Rounding and Iterative Relaxation
Advertisements

The Primal-Dual Method: Steiner Forest TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A AA A A A AA A A.
Great Theoretical Ideas in Computer Science
Covers, Dominations, Independent Sets and Matchings AmirHossein Bayegan Amirkabir University of Technology.
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
1 Matching Polytope x1 x2 x3 Lecture 12: Feb 22 x1 x2 x3.
GRAPH BALANCING. Scheduling on Unrelated Machines J1 J2 J3 J4 J5 M1 M2 M3.
Approximation Algorithms Chapter 14: Rounding Applied to Set Cover.
Great Theoretical Ideas in Computer Science for Some.
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 of 56 Linear Programming-Based Approximation Algorithms Shoshana Neuburger Graduate Center, CUNY May 13, 2009.
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
Combinatorial Algorithms
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
Approximation Algorithm for Multicut
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
Semidefinite Programming
1 Introduction to Linear and Integer Programming Lecture 9: Feb 14.
Primal Dual Method Lecture 20: March 28 primaldual restricted primal restricted dual y z found x, succeed! Construct a better dual.
Approximation Algorithm: Iterative Rounding Lecture 15: March 9.
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
Approximation Algorithms
Increasing graph connectivity from 1 to 2 Guy Kortsarz Joint work with Even and Nutov.
1 Bipartite Matching Polytope, Stable Matching Polytope x1 x2 x3 Lecture 10: Feb 15.
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Matching Polytope, Stable Matching Polytope Lecture 8: Feb 2 x1 x2 x3 x1 x2 x3.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Linear Programming and Parameterized Algorithms. Linear Programming n real-valued variables, x 1, x 2, …, x n. Linear objective function. Linear (in)equality.
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
(work appeared in SODA 10’) Yuk Hei Chan (Tom)
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Packing Element-Disjoint Steiner Trees Mohammad R. Salavatipour Department of Computing Science University of Alberta Joint with Joseph Cheriyan Department.
1 Spanning Tree Polytope x1 x2 x3 Lecture 11: Feb 21.
Approximation Algorithms: Bristol Summer School 2008 Seffi Naor Computer Science Dept. Technion Haifa, Israel TexPoint fonts used in EMF. Read the TexPoint.
1 Chapter 11 Approximation Algorithms Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
Minimizing Makespan and Preemption Costs on a System of Uniform Machines Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir Univ. of Washington Gerhard.
C&O 355 Mathematical Programming Fall 2010 Lecture 17 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
Decision Procedures An Algorithmic Point of View
Fixed Parameter Complexity Algorithms and Networks.
C&O 355 Mathematical Programming Fall 2010 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A.
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 Department of Mathematics and Computer Science Drexel University.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
5.2 Trees  A tree is a connected graph without any cycles.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
Introduction to Graph Theory
1 Chapter 11 Approximation Algorithms Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
Iterative Rounding in Graph Connectivity Problems Kamal Jain ex- Georgia Techie Microsoft Research Some slides borrowed from Lap Chi Lau.
Problems in Combinatorial Optimization. Linear Programming.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Approximation Algorithms based on linear programming.
Discrete Optimization MA2827 Fondements de l’optimisation discrète Material from P. Van Hentenryck’s course.
Integer Programming (정수계획법)
Richard Anderson Lecture 28 Coping with NP-Completeness
Integer Programming (정수계획법)
Presentation transcript:

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 finish this job j on machine i) There are m machine available. Task: to scheduling the jobs -To minimize the completion time of all jobs (the makespan) NP-hard to approximate within 1.5 times of the optimal solution. We’ll design a 2-approximation algorithm for this problem.

Why Unrelated? For example, different processors have different specialties. Computational jobs, display images, etc…

Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to finish this job j on machine i) There are m machine available. Task: to scheduling the jobs -To minimize the completion time of all jobs (the makespan) Approach: Linear Programming. How to formulate this problem into linear program?

Linear Programming Relaxation whether job j is scheduled in machine i for each job j Each job is scheduled in one machine. for each machine i Each machine can finish its jobs by time T for each job j, machine i Relaxation

How good is this relaxation? for each job j for each machine i for each job j, machine i Example One job of processing time K for each machine Optimal solution = K. Optimal fraction solution = K/m. The LP lower bound could be very bad.

How good is the relaxation? for each job j for each machine i for each job j, machine i Example One job of processing time K for each machine Optimal solution = K. Optimal fraction solution = K/m. Problem of the linear program relaxation: an optimal solution T could be even smaller than the processing time of a job!

How to tackle this problem? Problem of the linear program relaxation: an optimal solution T could be even smaller than the processing time of a job! Ideally, we could write the following constraint: but this is not a linear constraint… Idea?To enforce this constraint by preprocessing!

Preprocessing Fix T. Consider the decision problem instead of an optimization problem Call the resulting linear program LP(T). Note that different T have different linear programs. This is known as parametric pruning.

Decision Problem for each job j for each machine i for each job j, machine i Fix TLet S(T) be the set of jobs with p(i,j) < T. Use binary search to find the minimum T* such that this LP is feasible. We will use T* as the lower bound on the value of an optimal solution, clearly T* <= OPT, since LP(OPT) is feasible.

for each job j for each machine i for each job j, machine i Basic Solution What can we say about a vertex solution of this LP? Basic solution: unique solution of n linearly independent tight inequalities, where n is the number of variables.

for each job j for each machine i for each job j, machine i A tight inequality of the last type corresponds to a variable of zero value. There are at most n+m inequalities of the first two types, and hence there are at most n+m nonzero variables. Basic Solution

There are at most n+m nonzero variables. Say a job is integral if it is assigned entirely to one machine; otherwise a job is fractional. Each fractional job is assigned to at least two machines. Let p be the number of integral jobs, and q be the number of fractional jobs.  p + q = n  p + 2q <= n + m  p >= n – m  q <= m There are at most m fractional jobs. Basic Solution

Integral Jobs How to handle integral jobs? Just follow the optimal fractional solution. And so we can schedule all the integral jobs in time at most T* <= OPT, as this schedule (on integral jobs) is just a subset of the fractional solution.

Fractional Jobs Observation: Suppose there are m machines and at most m jobs. If we can assign all jobs to the m machines so that each machine is assigned at most 1 job, then the completion time (makespan) is at most T* <= OPT. There are at most m fractional jobs. If we could find such a “matching”, then we use this matching to schedule all the fractional jobs in time at most T* <= OPT.

Goal: to design a 2-approximation algorithm for this problem 1)Do preprocessing (parametric pruning) and find a smallest T* so that LP(T*) is feasible. 2)Find a vertex (basic) solution, say x, to LP(T*). 3)Assign all integral jobs to machines as in x. 4)Match the fractional jobs to the machines so that each machine is assigned at most one job. Approximation Algorithm Proof (assuming a matching exists): Schedule all integral jobs in time T*, Schedule all fractional jobs in time T*, Schedule all jobs in time 2T* <= 2OPT.

Bipartite Matching Task: Match the fractional jobs to the machines so that each machine is assigned at most one job. Create a vertex for each job j, and create a vertex for each machine i, add an edge between machine i and job j if 0 < x(i,j) < 1. Now, the problem is to find a matching so that every job is matched.

job machine Bipartite Matching Assume the graph is connected. There are at most n+m nonzero variables. n + m vertices, n + m edges, at most one cycle.

Bipartite Matching n + m vertices, n + m edges, at most one cycle. Leaves must be machines, since each fractional job is adjacent to two machines. Match a leaf machine with its adjacent job, then remove these vertices and repeat.

Bipartite Matching n + m vertices, n + m edges, at most one cycle. Eventually a cycle is left, and we can find a perfect matching. Match a leaf machine with its adjacent job, then remove these vertices and repeat.

Bipartite Matching If the graph is not connected, we apply the same argument to each connected component. Prove: (1) each component has at most n’+m’ edges. (2) each component has a matching.

Bad Examples m machines m 2 – m + 1 jobs: 1 job of processing time m on all machines remaining jobs have processing time 1 on all machines Optimal solution: the large job on one machine, m small jobs on the remaining m-1 machines, makespan = m LP vertex solution: 1/m of the first job and m-1 other jobs to each machine. Our rounding procedure will produce a schedule of makespan 2m-1.

General Assignment There are n jobs, each job has: a processing time p(i,j) (the time to finish this job j on machine i) a processing cost c(i,j) (the cost to finish this job j on machine i) There are m machine available. Task: to scheduling the jobs -To minimize the total cost of the assignment -Satisfying time constraint T(i) for each machine Theorem. Let OPT be the optimal cost to satisfy all constraints. There is a polynomial time algorithm which finds an assignment with cost at most OPT and the constraint is violated at most twice.

Linear Programming Relaxation for each job j for each machine i for each job j, machine i Pruning: Delete every variable x(i,j) with p(i,j) > Ti

Iterative Relaxation Iterative General Assignment Algorithm (Basic solution) Compute a basic optimal solution of the LP. Delete every variable x(i,j) with x(i,j)=0 (Assigning a job) If there is a variable with x(i,j)=1, assign job j to machine i, and set Ti = Ti – p(i,j). (Relaxing a constraint) If there is a machine i with only one job, or there is a machine with two jobs j1 and j2 and x(i,j1) + x(i,j2) >= 1, remove the time constraint for machine i. repeat

Performance Guarantee Lemma. Suppose the algorithm terminates. Then the total cost is at most LP, and each time constraint is violated at most twice. Deleting a job of value 0 does not change anything. Assigning a job of value 1 keeps the total cost and the constraints satisfied. Relaxing a machine i with only one job can add at most Ti to machine i. Relaxing a machine i with two jobs j1 and j2 with x(i,j1) + x(i,j2) >= 1. In the worse case, both j1 and j2 are assigned to machine i (in future). Then x(i,j1)p(i,j1) + x(i,j2)p(i,j2) + Ti >= p(i,j1) + p(i,j2), and so the constraint is violated by at most Ti.

Counting Argument Lemma. If there is no variable with value 0 or 1, then the relaxation step applies. job machine Each job has degree at least 2 (otherwise there is a job with value 1). Each machine has degree at least 2 (otherwise the relaxation step applies). So there are at least n+m edges and thus n+m nonzero variables. There are n jobs and m machines, so there are n+m constraints, and so in a basic solution, there are at most n+m nonzero variables. n jobs m machines

Counting Argument Lemma. If there is no variable with value 0 or 1, then the relaxation step applies. job machine So there are exactly m+n edges, and so is a disjoint union of cycles. So each machine has degree exactly 2. Each job has total value 1. So there exists a machine with total value at least 1. n jobs m machines The relaxation step applies!

There are many more scheduling problems in the literature. Iterative relaxation method is very useful. Project outline Meeting signup 5 more lectures to go. Remarks