linear programming (lp) relaxation-based approximation reconnect ‘04 lp...

7
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract DE-AC04-94AL85000. Reconnect ‘04 LP-Based Approximation Algorithms Cynthia Phillips Sandia National Laboratories Slide 2 Linear Programming (LP) Relaxation-Based Approximation • Variables can take rational values (relax integrality constraints) • Efficiently solvable: gives lower bound on optimal IP solution • Common technique: Use structural information from LP solution to find feasible IP solution Bound quality using LP bound • Integrality gap = (best IP solution)/(best LP solution) • This technique cannot prove anything better than integrality gap Slide 3 Integer Program (IP) for capacitated network design A simple IP for capacitated network design: Where d(C) is the maximum demand d i for any pair that crosses cut C x e = 1 if edge e is selected min c e x e Σ e C u e x e d (C) cutset C Σ e C x e 0,1 Slide 4 Knapsack Cover (KC) Inequalities u( A) = u A < D(C) e A residual D( A) = D u( A) u A (e) = min(u e , D( A)) KC: u A (e) x e D( A) e CA A C

Upload: others

Post on 19-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company,for the United States Department of Energy under contract DE-AC04-94AL85000.

Reconnect ‘04LP-Based Approximation Algorithms

Cynthia PhillipsSandia National Laboratories

Slide 2

Linear Programming (LP) Relaxation-Based Approximation

• Variables can take rational values (relax integrality constraints)

• Efficiently solvable: gives lower bound on optimal IP solution

• Common technique:

– Use structural information from LP solution to find feasible IP solution

– Bound quality using LP bound

• Integrality gap = (best IP solution)/(best LP solution)

• This technique cannot prove anything better than integrality gap

Slide 3

Integer Program (IP) for capacitated network design

A simple IP for capacitated network design:

Where d(C) is the maximum demand di for any pair that crosses cut C

xe = 1 if edge e is selected

min cexeΣe ∈ C

uexe ≥ d(C) ∀ cutset CΣe ∈ C

xe ∈ 0,1

Slide 4

Knapsack Cover (KC) Inequalities

u(A) = uA < D(C)e∈A∑

residual D(A) = D− u(A)uA (e) = min(ue,D(A))

KC : uA(e)xe ≥ D(A)e∈C−A∑

AC

Page 2: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Slide 5

Finding An Approximate Solution

Let

Set of edges at least half selected by LP

• Select all these edges

– Increases cost (for A) by factor of 2

• Now much meet demand D(A) = D - u(A) with rest of edges

A = e ∈ E | xe ≥12

Slide 6

Finding an Approximate Solutions

• Sort edge by ue

Consider the three cases

uA (e) = min(ue,D(A))if ue1

≤ ue2 then

uA (e1) ≤ uA (e2)

ue1 ≤ ue2 ≤ DA

ue1 ≤ DA ≤ ue2DA ≤ ue1 ≤ ue2

Slide 7

Finding an Approximate Solution

xe = q/p rational

r is least common multiple of denominators so rxe integral for all e

Make 2rxe “copies” of xe

(convex multipliers will be 1/r)

Slide 8

Approximate solution for knapsack (gap 2)

• 2rxe copies of edge e, sorted by capacity

• Place in r buckets, round robin

• Each bucket will be a solution Si

• No edge in any solution twice

e1 e1 e1 e1 e1 e1e2e2

e2e2e3e3

xe <12

2rxe < r

Page 3: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Slide 9

All buckets are Feasible

First Bucket (biggest) Last Bucket (smallest)

ek4

ek2

e1

ek3

ek1

<

<

uA (e)e∈first∑ ≤ uA (e)

e∈last∑ + D(A)

Slide 10

All Buckets Feasible

Suppose

We have

So for all buckets

From total capacity:

Contradicts KC inequality

uA (e)e∈last∑ < D(A)

uA (e)e∈first∑ ≤ uA (e)

e∈last∑ + D(A)

uA (e)∑ < 2D(A)

uA (e)e∈E−A∑ xe < 2rD(A)

Slide 11

Separation

Only have to satisfy KC inequality for

Add these cuts if violated till we get an LP solution where KC inequality

holds for it’s A.€

A = e ∈ E | xe ≥12

Slide 12

Polynomial Time

Really only m+1 distinct solutions

e1 e1 e1 e1 e1 e1e2e2

e2e2e3e3

Page 4: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Slide 13

A Scheduling Example

Given n jobs J1, J2, …, Jn

Job Ji has length pi, weight wi

Precedence constraints: mean Ji must finish before Jj starts

No preemption, one machine

Cj = completion time of job Jj

Goal: minimize

NP-complete. We’ll get a 4-approximation

Ji p Jj

wjCjj=1

n

Slide 14

Integer Programming Formulation

Subject to

x jt =1 if job J j completes at time t0 otherwise

xjtt= p j

T

∑ = 1 ∀j

x ju ≤ 1u =t

t+ pj −1

∑j=1

n

∑ t = 1,...,T = pjj=1

n

x juu=1

t

∑ − xkuu=1

t+ pk

∑ ≥ 0 ∀Ji p Jk , t = 1,...,T − pk

xjt ∈ 0,1{ } j =1,..., n; t = pj ,...,T

min w jt= p j

T

∑j=1

n

∑ tx jt

Slide 15

Constraint: One Job at a Time

Consider all (job, finish time) pairs that would run over (t-1, t]

x ju ≤ 1u =t

t+ pj −1

∑j=1

n

t

t+1

t+2

t+pj-1

t-1

T-pj

...

t-1

Slide 16

Precedence Constraints

If job Jk finishes by time t + pk, then job Jj must finish by time t

x juu=1

t

∑ − xkuu=1

t+ pk

∑ ≥ 0 Jj p Jk

Page 5: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Slide 17

LP relaxation, Fractional Schedule

xjt

pj

Slide 18

Fractional Schedule x*

Fractional Completion Time:

Midpoint: min t* such that

Cj* = tx jt

*

t= pj

T

xjt*

t= p j

t *

∑ ≥12

Slide 19

Approximation Algorithm

• Solve LP

• Compute midpoints for all jobs

• Order by midpoints

Slide 20

Approximate Schedule is feasible

• No preemption

• One job at a time

• Precedence constraints

Midpoint of Jj < Midpoint of Jk

x juu=1

t

∑ − xkuu=1

t+ pk

∑ ≥ 0 Jj p Jk

Page 6: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Slide 21

Proof of Quality Road Map

• Relate Cj to LP values

Renumber jobs by midpoint:

We’ll show

t1* ≤ t2

* ≤ ... ≤ tn*

Cj ≤ 2tj* and

Cj* ≥

tj*

2

⇒ Cj ≤ 4Cj*

⇒ 4 - approximation

Slide 22

Upper Bound on Completion Times

• At time tj* fractional schedule has done pj/2 work.

• Since tk*≤ tj* for k<j, schedule has done pk/2 work on Jk.

• One unit of work/time unit ⇒

• But by construction

t-pjt

xjt

total ≥ 12

pkk=1

j

tj* ≥

12

pkk=1

j

∑Cj = pk

k=1

j

∑⇒ Cj ≤ 2t j

*

Slide 23

Lower Bound on LP values

• By definition:

So Cj* = tx jt

t= pj

T

≥ tx jtt=t j

*

T

≥ tj* x jtt=t j

*

T

≥12tj

*

xju <12u= pj

t j* −1

Slide 24

Proof of Quality

Therefore

Cj ≤ 2t j* and

Cj* ≥

tj*

2 ∀j

⇒ Cj ≤ 4Cj* ∀j

wjCj ≤ 4 wjCj*∑

j∑ ≤ 4 wjtx jt

*

j∑

≤ 4 * Optimal

Page 7: Linear Programming (LP) Relaxation-Based Approximation Reconnect ‘04 LP …dimacs.rutgers.edu/reconnect/Lafayette/lectures/LP-based... · 2004-07-08 · Linear Programming (LP)

Slide 25

Comments

• Can create alternative schedules using α point tjα

• LP-based approximation algorithms can give feasible solutions in branch

and bound

• Other LP-based approximation algorithms for scheduling problems are

based on matching/assignment

tjα = min t s.t. xjt '

t' = pj

t

∑ ≥α