32
Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Embed Size (px)

Citation preview

Page 1: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Approximation Algorithms for Stochastic Optimization

Chaitanya SwamyCaltech and U. Waterloo

Joint work with David Shmoys Cornell University

Page 2: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Stochastic Optimization

• Way of modeling uncertainty.

• Exact data is unavailable or expensive – data is uncertain, specified by a probability distribution.

Want to make the best decisions given this uncertainty in the data.

• Applications in logistics, transportation models, financial instruments, network design, production planning, …

• Dates back to 1950’s and the work of Dantzig.

Page 3: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Stochastic Recourse Models

Given : Probability distribution over inputs.

Stage I : Make some advance decisions – plan ahead or hedge against uncertainty.

Uncertainty evolves through various stages.

Learn new information in each stage.

Can take recourse actions in each stage – can augment earlier solution paying a recourse cost.

Choose initial (stage I) decisions to minimize

(stage I cost) + (expected recourse cost).

Page 4: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

2-stage problem 2 decision points

0.2

0.020.3 0.1

stage I

stage II scenarios

0.5

0.20.3

0.4

stage I

stage II

scenarios in stage k

k-stage problem k decision points

Page 5: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

2-stage problem 2 decision points

Choose stage I decisions to minimize expected total cost =

(stage I cost) + Eall scenarios [cost of stages 2 … k].

0.2

0.020.3 0.1

stage I

stage II scenarios

0.5

0.2 0.4

stage I

stage II

k-stage problem k decision points

0.3

scenarios in stage k

Page 6: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

2-Stage Stochastic Facility Location

Distribution over clients gives the set of clients to serve.

client set D

facility

Stage I: Open some facilities in advance; pay cost fi for facility i.

Stage I cost = ∑(i opened) fi .

stage I facility

Page 7: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

2-Stage Stochastic Facility Location

Distribution over clients gives the set of clients to serve.

facility

Stage I: Open some facilities in advance; pay cost fi for facility i.

Stage I cost = ∑(i opened) fi .

stage I facility

Actual scenario A = { clients to serve}, materializes.Stage II: Can open more facilities to serve clients in A; pay cost fi

A to open facility i. Assign clients in A to facilities.

Stage II cost = ∑ fiA + (cost of serving

clients in A).

i opened inscenario A

Page 8: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Want to decide which facilities to open in stage I.

Goal: Minimize Total Cost = (stage I cost) + EA D [stage II cost for

A].How is the probability distribution

specified?

•A short (polynomial) list of possible scenarios

•Independent probabilities that each client exists

•A black box that can be sampled.

Page 9: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Approximation Algorithm

Hard to solve the problem exactly. Even special cases are #P-hard.Settle for approximate solutions. Give polytime algorithm that always finds near-optimal solutions.

A is a -approximation algorithm if,

•A runs in polynomial time.

•A(I) ≤ .OPT(I) on all instances I,

is called the approximation ratio of A.

Page 10: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Overview of Previous Work• polynomial scenario model: Dye, Stougie &

Tomasgard;Ravi & Sinha; Immorlica, Karger, Minkoff & Mirrokni.

• Immorlica et al.: also consider independent activation modelproportional costs: (stage II cost) = (stage I cost),

e.g., fiA = .fi for each facility i, in each scenario A.

• Gupta, Pál, Ravi & Sinha (GPRS04): black-box model but also with proportional costs.

• Shmoys, S (SS04): black-box model with arbitrary costs. approximation scheme for 2-stage LPs + rounding procedure “reduces” stochastic problems to their deterministic versions.for some problems improve upon previous results.

Page 11: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Boosted Sampling (GPRS04)

Proportional costs: (stage II cost) = (stage cost)Note: is same as in previous talk.

– Sample times from distribution

– Use “suitable” algorithm to solve deterministic instance consisting of sampled scenarios (e.g., all sampled clients) – determines stage I decisions

Analysis relies on the existence of cost-shares that can be used to share the stage I cost among sampled scenarios.

Page 12: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Shmoys, S ’04 vs. Boosted sampling

– Can handle arbitrary costs in the two stages.

– LP rounding: give an algorithm to solve the stochastic LP.

– Need many more samples to solve stochastic LP.

Need proportional costs:(stage II cost) = (stage cost) can depend on scenario.

Primal-dual approach: cost-shares obtained by exploiting structure via primal-dual schema.

Need only samples.

Both work in the black-box model: arbitrary distributions.

Page 13: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Stochastic Set Cover (SSC)

Universe U = {e1, …, en }, subsets S1, S2, …, Sm U, set S has weight wS.

Deterministic problem: Pick a minimum weight collection of sets that covers each element.Stochastic version: Set of elements to be covered is given by a probability distribution.

– choose some sets initially paying wS for set S – subset A U to be covered is revealed – can pick additional sets paying wS

A for set S.

Minimize (w-cost of sets picked in stage I) + EA U [wA-cost of new sets picked for scenario A].

Page 14: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

A Linear Program for SSCFor simplicity, consider wS

A = WS for every scenario A.S : stage weight of set S

pA : probability of scenario A U.xS : indicates if set S is picked in stage I.yA,S : indicates if set S is picked in scenario A.Minimize ∑S SxS + ∑AU pA ∑S WSyA,S

subject to,

∑S:eS xS + ∑S:eS yA,S ≥ 1 for

each A U, eA

xS, yA,S ≥ 0 for each S, A.

Exponential number of variables and exponential number of constraints.

Page 15: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

A Rounding Theorem

Assume LP can be solved in polynomial time.

Suppose for the deterministic problem, we have an -approximation algorithm wrt.

the LP relaxation, i.e., A such that A(I) ≤ .

(optimal LP solution for I)for every

instance I.

e.g., “the greedy algorithm” for set cover is a log n-approximation algorithm wrt. LP relaxation.

Theorem: Can use such an -approx. algorithm to get a 2-approximation algorithm for stochastic set cover.

Page 16: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Rounding the LPAssume LP can be solved in polynomial time. Suppose we have an -approximation algorithm wrt. the LP relaxation for the deterministic problem.

Let E = {e : ∑S:eS xS ≥ ½}.

So (2x) is a fractional set cover for the set E can round to get an integer set cover S for E of cost ∑SS S ≤ (∑S 2SxS) .

S is the first stage decision.

Let (x,y) : optimal solution with cost OPT.

∑S:eS xS + ∑S:eS yA,S ≥ 1 for each A U, eA

for every element e, either

∑S:eS xS ≥ ½ OR in each scenario A : eA, ∑S:eS yA,S ≥ ½.

Page 17: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Sets

Elements

Rounding (contd.)

Set in S

Element in E

Consider any scenario A. Elements in A E are covered.

For every e A\E, it must be that ∑S:eS yA,S ≥ ½.

So (2yA) is a fractional set cover for A\E can round to get a set cover of W-cost ≤ (∑S

2WSyA,S) .

A

Using this to augment S in scenario A, expected cost

≤ ∑SS S +

2.∑ AU pA (∑S WSyA,S) ≤ 2.OPT.

Page 18: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

An -approx. algorithm for deterministic problem gives a 2-approximation guarantee for stochastic problem.

In the polynomial-scenario model, gives simple polytime approximation algorithms for covering problems.

•2log n-approximation for SSC.•4-approximation for stochastic vertex cover.•4-approximation for stochastic multicut on

trees.

Ravi & Sinha gave a log n-approximation algorithm for SSC, 2-approximation algorithm for stochastic vertex cover in the polynomial-scenario model.

Rounding (contd.)

Page 19: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Let E = {e : ∑S:eS xS ≥ ½}.

So (2x) is a fractional set cover for the set E can round to get an integer set cover S of cost ∑SS S ≤ (∑S 2SxS) .

S is the first stage decision.

Rounding the LPAssume LP can be solved in polynomial time. Suppose we have an -approximation algorithm wrt. the LP relaxation for the deterministic problem.

Let (x,y) : optimal solution with cost OPT.

∑S:eS xS + ∑S:eS yA,S ≥ 1 for each A U, eA

for every element e, either

∑S:eS xS ≥ ½ OR in each scenario A : eA, ∑S:eS yA,S ≥ ½.

Page 20: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

A Compact Convex Program

pA : probability of scenario A U.

xS : indicates if set S is picked in stage I.Minimize h(x) = ∑S SxS + ∑AU pAfA(x) s.t. xS ≥ 0

for each S (SSC-

P)

where fA(x) = min. ∑S WSyA,S

s.t. ∑S:eS yA,S ≥ 1 – ∑S:eS xS for each eA

yA,S ≥ 0 for each S.

Equivalent to earlier LP.

Each fA(x) is convex, so h(x) is a convex function.

Page 21: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

The General Strategy

1.Get a (1+)-optimal fractional first-stage solution (x) by solving the convex program.

2.Convert fractional solution (x) to integer solution– decouple the two stages near-optimally– use -approx. algorithm for the deterministic

problem to solve subproblems.

Obtain a c.-approximation algorithm for the stochastic integer problem.Many applications: set cover, vertex cover, facility location, multicut on trees, …

Page 22: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

•Need a procedure that at any point y,if yP, returns a violated inequality which shows that yP

Solving the Convex Program

Minimize h(x) subject to xP. h(.) : convex

Ellipsoid method Py

Page 23: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

•Need a procedure that at any point y,if yP, returns a violated inequality which shows that yPif yP, computes the subgradient of h(.) at y

dm is a subgradient of h(.) at u, if v, h(v)-h(u)

≥ d.(v-u).

•Given such a procedure, ellipsoid runs in polytime and returns points x1, x2, …, xkP such that mini=1…k h(xi) is close to OPT.

Solving the Convex Program

Minimize h(x) subject to xP. h(.) : convex

Ellipsoid method

Computing subgradients is hard. Evaluating h(.) is hard.

P

yh(x) ≤ h(y)

d

Page 24: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

•Need a procedure that at any point y,if yP, returns a violated inequality which shows that yPif yP, computes an approximate subgradient of h(.) at y

d'm is an -subgradient at u,

if vP, h(v)-h(u) ≥ d'.(v-u) – .h(u).

•Given such a procedure, can compute point xP such thath(x) ≤ OPT/(1-) + without ever evaluating h(.)!

Solving the Convex Program

Minimize h(x) subject to xP. h(.) : convex

P

yh(x) ≤ h(y)

d'

Ellipsoid method

Can compute -subgradients by sampling.

Page 25: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Putting it all together

Get solution x with h(x) close to OPT.

Sample initially to detect if OPT is large –

this allows one to get a (1+).OPT guarantee.

Theorem: (SSC-P) can be solved to within a factor of (1+) in polynomial time, with high probability.

Gives a (2log n+)-approximation algorithm for the stochastic set cover problem.

Page 26: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

A Solvable Class of Stochastic LPs

Minimize h(x) = .x + ∑AU pAfA(x) s.t. x P

m

where fA(x)= min. wA.yA + cA.rA

s.t. DA rA + TA

yA ≥ jA – TA x

yA m, rA n, yA, rA ≥ 0.Theorem: Can get a (1+)-optimal solution for this class of stochastic programs in polynomial time.

Includes covering problems (e.g., set cover, network design, multicut), facility location problems, multicommodity flow.

≥ 0

Page 27: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Moral of the Story

• Even though the stochastic LP relaxation has exponentially many variables and constraints, we can still obtain near-optimal fractional first-stage decisions

• Fractional first-stage decisions are sufficient to decouple the two stages near-optimally

• Many applications: set cover, vertex cover, facility locn., multicommodity flow, multicut on trees, …

• But we have to solve convex program with many samples (not just )!

Page 28: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Sample Average Approximation

Sample Average Approximation (SAA) method:– Sample initially N times from scenario distribution

– Solve 2-stage problem estimating pA with frequency of occurrence of scenario A

How large should N be to ensure that an optimal solution to sampled problem is a (1+)-optimal solution to original problem?Kleywegt, Shapiro & Homem De-Mello (KSH01):

– bound N by variance of a certain quantity – need not be polynomially bounded even for our class of programs.

S, Shmoys ’05 :– show using -subgradients that for our class, N can be

poly-bounded.

Charikar, Chekuri & Pál ’05:– give another proof that for a class of 2-stage problems,

N can be poly-bounded.

Page 29: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Multi-stage ProblemsGiven :Distribution over inputs.

Stage I : Make some advance decisions – hedge against uncertainty.

Uncertainty evolves in various stages.

Learn new information in each stage.

Can take recourse actions in each stage – can augment earlier solution paying a recourse cost.

k-stage problem k decision points

0.5

0.2 0.4

stage I

stage II

scenarios in stage k Choose stage I decisions to minimize

expected total cost = (stage I cost) + Eall scenarios [cost of stages 2 …

k].

0.3

Page 30: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Multi-stage ProblemsFix k = number of stages.LP-rounding: S, Shmoys ’05– Ellipsoid-based algorithm extends– SAA method also works

black-box model, arbitrary costsRounding procedure of SS04 can be easily adapted: lose an O(k)-factor over the deterministic guarantee– O(k)-approx. for k-stage vertex cover, facility location,

multicut on trees; k.log n-approx. for k-stage set cover

Gupta, Pál, Ravi & Sinha ’05: boosted sampling extends but with outcome-dependent proportional costs– 2k-approx. for k-stage Steiner tree (also Hayrapetyan, S &

Tardos)– factors exponential in k for k-stage vertex cover, facility

location

Computing -subgradients is significantly harder, need several new ideas

Page 31: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Open Questions

•Combinatorial algorithms in the black box model and with general costs. What about strongly polynomial algorithms?

• Incorporating “risk” into stochastic models.

•Obtaining approximation factors independent of k for k-stage problems.Integrality gap for covering problems does not increase. Munagala has obtained a 2-approx. for k-stage VC.

• Is there a larger class of doubly exponential LPs that one can solve with (more general) techniques?

Page 32: Approximation Algorithms for Stochastic Optimization Chaitanya Swamy Caltech and U. Waterloo Joint work with David Shmoys Cornell University

Thank You.