reconnect ‘04 lp-based approximation algorithms

25
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

Upload: hamal

Post on 21-Feb-2016

55 views

Category:

Documents


0 download

DESCRIPTION

Reconnect ‘04 LP-Based Approximation Algorithms. Cynthia Phillips Sandia National Laboratories. Linear Programming (LP) Relaxation-Based Approximation. Variables can take rational values (relax integrality constraints) Efficiently solvable: gives lower bound on optimal IP solution - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Reconnect ‘04 LP-Based Approximation Algorithms

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

Page 2: Reconnect ‘04 LP-Based Approximation Algorithms

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

Page 3: Reconnect ‘04 LP-Based Approximation Algorithms

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) ∀ cutsetCΣe ∈C

xe ∈ 0,1

Page 4: Reconnect ‘04 LP-Based Approximation Algorithms

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 5: Reconnect ‘04 LP-Based Approximation Algorithms

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

⎧ ⎨ ⎩

⎫ ⎬ ⎭

Page 6: Reconnect ‘04 LP-Based Approximation Algorithms

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 ≤ ue2

DA ≤ ue1≤ ue2

Page 7: Reconnect ‘04 LP-Based Approximation Algorithms

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)

Page 8: Reconnect ‘04 LP-Based Approximation Algorithms

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 e1

e2e2

e2e2

e3e3

xe < 12

2rxe < r

Page 9: Reconnect ‘04 LP-Based Approximation Algorithms

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)

Page 10: Reconnect ‘04 LP-Based Approximation Algorithms

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)

Page 11: Reconnect ‘04 LP-Based Approximation Algorithms

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

⎧ ⎨ ⎩

⎫ ⎬ ⎭

Page 12: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 12

Polynomial Time

Really only m+1 distinct solutions

e1 e1 e1 e1 e1 e1

e2e2

e2e2

e3e3

Page 13: Reconnect ‘04 LP-Based Approximation Algorithms

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

J i p J j

wjC jj=1

n∑

Page 14: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 14

Integer Programming Formulation

Subject to

xjt = 1 if job Jj completes at time t0 otherwise

⎧ ⎨ ⎩

xjtt=p j

T∑ =1 ∀j

xju ≤1u=t

t+pj −1

∑j=1

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

n∑xju

u=1

t∑ − xkuu=1

t+pk∑ ≥0 ∀J i p J k, t =1,...,T −pk

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

min w jt= p j

T

∑j=1

n

∑ tx jt

Page 15: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 15

Constraint: One Job at a Time

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

xju ≤1u=t

t+pj −1

∑j=1

n∑t

t+1

t+2

t+pj-1

t-1

T-pj

...

t-1

Page 16: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 16

Precedence Constraints

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

xjuu=1

t∑ − xkuu=1

t+pk∑ ≥0 J j p J k

Page 17: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 17

LP relaxation, Fractional Schedule

xjt

pj

Page 18: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 18

Fractional Schedule x*

Fractional Completion Time:

Midpoint: min t* such that

C j* = txjt

*

t=pj

T∑

xjt*

t=p j

t*

∑ ≥12

Page 19: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 19

Approximation Algorithm

• Solve LP• Compute midpoints for all jobs• Order by midpoints

Page 20: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 20

Approximate Schedule is feasible

• No preemption• One job at a time• Precedence constraints

Midpoint of Jj < Midpoint of Jk

xjuu=1

t∑ − xkuu=1

t+pk∑ ≥0 J j p J k

Page 21: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 21

Proof of Quality Road Map

• Relate Cj to LP values

Renumber jobs by midpoint:

We’ll show

t1* ≤t2

* ≤...≤tn*

C j ≤2tj* and

C j* ≥tj

*

2 ⇒ Cj ≤4C j

* ⇒ 4-approximation

Page 22: Reconnect ‘04 LP-Based Approximation Algorithms

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 pk

k=1

j

∑tj* ≥1

2 pkk=1

j

∑C j = pk

k=1

j

∑⇒ Cj ≤2tj

*

Page 23: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 23

Lower Bound on LP values

• By definition:

So C j* = txjt

t=pj

T∑ ≥ txjt

t=tj*

T

∑ ≥tj

* xjtt=tj

*

T∑≥1

2tj*

xju <12u=pj

tj* −1

Page 24: Reconnect ‘04 LP-Based Approximation Algorithms

Slide 24

Proof of Quality

Therefore

C j ≤2tj* and

C j* ≥tj

*

2 ∀j ⇒ Cj ≤4C j

* ∀j

wjCj ≤4 wjC j*∑

j∑ ≤4 wjtxjt

*

j∑

≤4* Optimal

Page 25: Reconnect ‘04 LP-Based Approximation Algorithms

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∑ ≥α