The Local Ratio Technique - PowerPoint PPT Presentation

1 / 139
About This Presentation
Title:

The Local Ratio Technique

Description:

The local ratio technique is an approximation ... Boolean logic minimization. F. E. D. C. B. A. In. 1. 0. 0. 0. 1. 1. 1. 1. 1. 0. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1 ... – PowerPoint PPT presentation

Number of Views:134
Avg rating:3.0/5.0
Slides: 140
Provided by: monaldoma
Category:

less

Transcript and Presenter's Notes

Title: The Local Ratio Technique


1
The Local Ratio Technique
  • A Unified Framework for Approximation Algorithms

Presented by Monaldo Mastrolilli
monaldo_at_idsia.ch
2
Lecture Schedule
  • Introduction
  • Some problems in discrete optimization
  • The Local Ratio Technique (LR)
  • Applications of the LR

3
Introduction
Reuven Bar-Yehuda
  • The local ratio technique is an approximation
    paradigm for NP-hard optimization to obtain
    approximate solutions
  • Its main feature of attraction is its simplicity
    and elegance it is very easy to understand, and
    has surprisingly broad applicability.

4
Problems Framework
  • Many optimization problems can be formulated as
    problems of selecting a subset (satisfying
    certain constraints) of a given set of weighted
    objects.

Given a (profit or cost) weight vector
w. Minimize Maximize w x Subject
to linear constraints F(x) where x is a 0-1
vector that represents our choice
5
Covering Problems
6
Set Cover
OUTPUT
INPUT
7
A Set Cover ProblemBoolean logic minimization
A
B
C
D
E
F
Given a set of feasible and'' terms, each of
which covers a subset of the vectors we need, we
seek to or'' together the smallest number of
terms that realize the function. This is exactly
the set cover problem.
8
Hitting Set
OUTPUT
INPUT
9
Set cover vs. Hitting set
  • Hitting set is, in fact, dual to set cover,
    meaning it is exactly the same problem in
    disguise.
  • Replace each element of U by a set of the names
    of the subsets that contain it. Now S and U have
    exchanged roles, for we seek a set of subsets
    from U to cover all the elements of S. This is is
    exactly the set cover problem.
  • Other applications efficient testing,
    statistical design of experiments, crew
    scheduling for airlines, etc

10
Vertex Cover
11
A Vertex Cover ProblemNetwork Testing
  • A network tester involves placing probes onto the
    network vertices.
  • A probe can determine if a connected link is
    working correctly.
  • The goal is to minimize the number of used probes
    to check all the links.

12
A Vertex Cover ProblemPrecedence Constrained
Scheduling
  • Schedule a set of jobs on a single machine
  • Jobs have precedence constraints between them
  • The goal is to find a schedule which minimizes
    the weighted sum of completion times.
  • This problem can be formulated as a vertex cover
    problem Ambuehl-Mastrolilli05

13
Forest Problems
14
Forest Problems
  • Input is an undirected connected graph
  • Output is a subgraph satisfying some condition.
  • Our goal is to find the minimum weight feasible
    output (which is in fact a forest).

15
Some Interesting Problems
  • Path between two vertices

16
Shortest Path
s gt t cut
s
t
17
Some Interesting Problems
  • Spanning Tree
  • Steiner Tree
  • Steiner Forest

18
Minimum Spanning Tree
cut
19
Steiner Tree
20
Packing and Scheduling Problems
21
Maximum Independent Set
22
Applications
  • Computer Vision/Pattern Recognition
  • Information/Coding Theory
  • Map Labeling
  • Molecular Biology
  • Scheduling

23
Independent Set in Interval Graphs
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
time
  • We must schedule jobs on a single processor with
    no preemption.
  • Each job may be scheduled in one interval only.
  • The problem is to select a maximum weight subset
    of non-conflicting jobs.

24
Interval Scheduling
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
time
  • Each job consists of a finite collection of time
    intervals during which it may be scheduled.
  • The problem is to select a maximum weight subset
    of non-conflicting intervals, at most one
    interval for each job.

25
Single Machine Scheduling with Release and
Deadlines
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
time
Each job has a time window within which it can be
processed.
26
Single Machine Scheduling with Release and
Deadlines
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
27
Scheduling on Unrelated Machines
  • Here we have an arbitrary number of machines
  • Each activity instance specifies a particular
    machine on which it may be scheduled In case an
    instance may be scheduled on several machines we
    simply replicate the instance once for each
    machine.
  • The profit gained by scheduling a job depends
    both on the job and on the machine to which it is
    assigned.

28
Bandwidth Allocation
  • In modern communication networks (e.g., ATM
    networks), there exists some available bandwidth
    between two endpoints in the network.
  • The bandwidth allocation problem is the problem
    of finding the most profitable set of sessions
    that can utilize the available bandwidth.
  • We consider the case in which a session may have
    either a time window or a finite set of intervals
    in which it can be scheduled.

29
Bandwidth Allocation
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
time
Bandwidth
time
30
General Off-line Caching
  • The general caching problem models situations in
    which a cache is to be used for pages of varying
    sizes and of varying (cache) reload costs.
  • Input a cache size and a sequence of requests
    for pages.
  • Constraints a requested page must be loaded into
    the cache, unless already present. Each page is
    characterized by its size and its reload cost,
    which is incurred whenever the page is loaded
    into the cache. (Requests for pages in the cache
    incur no cost.) Since the cache size is fixed,
    loading one page may necessitate evicting
    another.
  • Goal find a minimum cost replacement schedule.

31
The Local Ratio Technique
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/LR.ppt
  • Applications to some optimization algorithms (r
    1)
  • ( MST) Minimum Spanning Tree (Kruskal)
  • ( SHORTEST-PATH) s-t Shortest Path (Dijkstra)
  • (LONGEST-PATH) s-t DAG Longest Path (Can be
    done with dynamic programming)
  • (INTERVAL-IS) Independents-Set in Interval
    Graphs Usually done with dynamic programming)
  • (LONG-SEQ) Longest (weighted) monotone
    subsequence (Can be done with dynamic
    programming)
  • ( MIN_CUT) Minimum Capacity s,t Cut (e.g.
    Ford, Dinitz)
  • Applications to some 2-Approximation algorithms
    (r 2)
  • ( VC) Minimum Vertex Cover (Bar-Yehuda and
    Even)
  • ( FVS) Vertex Feedback Set (Becker and Geiger)
  • ( GSF) Generalized Steiner Forest (Williamson,
    Goemans, Mihail, and Vazirani)
  • ( Min 2SAT) Minimum Two-Satisfibility
    (Gusfield and Pitt)
  • ( 2VIP) Two Variable Integer Programming
    (Bar-Yehuda and Rawitz)
  • ( PVC) Partial Vertex Cover (Bar-Yehuda)
  • ( GVC) Generalized Vertex Cover (Bar-Yehuda
    and Rawitz)
  • Applications to some other Approximations
  • ( SC) Minimum Set Cover (Bar-Yehuda and Even)
  • ( PSC) Partial Set Cover (Bar-Yehuda)
  • ( MSP) Maximum Set Packing (Arkin and Hasin)

32
Approximation Algorithms
Given a (profit or cost) weight vector
w. Minimize Maximize w x Subject
to linear constraints F(x)
  • x is an r-approximation if F(x) and wx ? rwx

  • wx ? rwx
  • An algorithm is an r-approximation if for any w,
    F it returns an r-approximation in polynomial time

33
The Local Ratio Theorem(for minimization
problems)
  • Let w w1 w2 . If x is an r-approximate
    solution for w1 and w2 then x is r-approximate
    with respect to w as well.

Note that the theorem holds even when negative
weights are allowed.
34
Vertex Cover example
Weight functions
41
62
13
W 41, 62, 13, 14, 35, 26, 17
W1 0, 0, 0, 14, 14, 0, 0
W2 41, 62, 13, 0, 21, 26, 17
35
26
14
W W1 W2
17
35
Vertex Cover example (step 1)


Note any feasible solution is a 2-approximate
solution for weight function W1
36
Vertex Cover example (step 2)


37
Vertex Cover example (step 3)


38
Vertex Cover example (step 4)


39
Vertex Cover example (step 5)


40
Vertex Cover example (step 6)
  • The optimal solution value of the VC instance on
    the left is zero.
  • By a recurrent application of the Local Ratio
    Theorem we are guaranteed to be within 2 times
    the optimal solution value by picking the zero
    nodes.
  • Opt 120 Approx 129

41
62
13
0
8
0
35
14
26
0
0
0
12
17
41
2-Approx VC (Bar-Yehuda Even 81)Iterative
implementation edge by edge
  • For each edge u,v do
  • Let ? min w(u), w(v).
  • w(u) ? w(u) - ?.
  • w(v) ? w(v) - ?.
  • Return v w(v) 0.

42
Recursive implementation
The Local Ratio Theorem leads naturally to the
formulation of recursive algorithms with the
following general structure
  • If a zero-cost solution can be found, return one.
  • Otherwise, find a suitable decomposition of w
    into two weight functions w1 and w2 w - w1, and
    solve the problem recursively, using w2 as the
    weight function in the recursive call.

43
2-Approx VC (Bar-Yehuda Even 81)Recursive
implementation edge by edge
  • VC (V, E, w)
  • If E? return ?
  • If ? w(v)0 return vVC(V-v, E-E(v), w)
  • Let (x,y)?E
  • Let ? minp(x), p(y)
  • Define w1(v) ? if vx or vy and 0 otherwise
  • Return VC(V, E, w- w1 )

44
Algorithm Analysis
  • We prove that the solution returned by the
    algorithm is 2-approximate by induction on the
    recursion and by using the Local Ratio Theorem.
  • In the base case, the algorithm returns a vertex
    cover of zero cost, which is optimal.
  • For the inductive step, consider the solution
    returned by the recursive call.
  • By the inductive hypothesis it is 2-approximate
    with respect to w2.
  • We claim that it is also 2-approximate with
    respect to w1 . In fact, every feasible solution
    is 2-approximate with respect to w1 .

45
Generality of the analysis
  • The proof that a given algorithm is an
    r-approximation algorithm is by induction on the
    recursion.
  • In the base case, the solution is optimal (and,
    therefore, r-approximate) because it has zero
    cost, and in the inductive step, the solution
    returned by the recursive call is r-approximate
    with respect to w2 by the inductive hypothesis.
  • Thus, different algorithms differ from one
    another only in the choice of w1, and in the
    proof that every feasible solution is
    r-approximate with respect to w1.

46
The key ingredient
  • Different algorithms (for different problems),
    differ from one another only in the decomposition
    of W, and this decomposition is determined
    completely by the choice of W1.

W2 W W1
47
The creative partfind r-effective weights
  • w1 is fully r-effective if there exists a number
    b such that
  • b ? w1 x ? r b
  • for all feasible solutions x

48
Framework
The analysis of algorithms in our framework boils
down to proving that w1 is r-effective.
  • Proving this amounts to proving that
  • b is a lower bound on the optimum value,
  • r b is an upper bound on the cost of every
    feasible solution
  • and thus every feasible solution is
    r-approximate (all with respect to w1).

49
A different W1 for VC star by star (Clarkson83)
41
62
13
16/4
16/4
0
58
13
37


16
35
26
16
16/4
0
0
31
26
17
16/4
13
Let d(x) be the degree of vertex x
50
A different W1 for VC star by star
?
?
0
b 4 ? is a lower bound on the optimum value,
2 b is an upper bound on the cost of every
feasible solution W1 is 2-effective
?
4 ?
0
?
51
Another W1 for VChomogeneous ( proportional to
the potential coverage)
4 ?
2 ?
3 ?
b E ? is a lower bound on the optimum
value, 2 b is an upper bound on the cost of
every feasible solution W1 is 2-effective
5 ?
3 ?
4 ?
3 ?
52
Exercise 0
Weight functions
41
62
13
w41, 62, 13, 14, 35, 26, 17
w1 0, 0, 0, 0, 17, 17, 17
35
26
14
w241, 62, 13, 14, 18, 9, 0
w w1 w2
17
Show that any feasible solution is a
3/2-approximate solution for weight function w1
53
Exercise 1
  • The prize collecting vertex cover (PCV) problem
    is a generalization of vertex cover in which we
    are not obligated to cover all edges, but must
    pay a penalty for those left uncovered. More
    specifically, both vertices and edges have
    nonnegative weights every set of vertices is a
    feasible solution and the cost of a feasible
    solution is the total weight of its vertices,
    plus the total weight of the edges it does not
    cover.
  • Provide an approximation algorithm for PCV

54
Exercise 2
55
Problem
  • In each case, we identified a small subset of
    elements such that every feasible solution had to
    contain at least one of them, and by associating
    a weight of ? with each of these elements and a
    weight of zero with all others, we were able to
    obtain an approximation ratio bounded by the size
    of the subset.
  • There are many problems, though, where
    identifying such a small subset is impossible,
    simply because no such subset necessarily exists.

56
Partial Vertex Cover
Input VC with a fixed number k Goal Identify a
minimum cost subset of vertices that hits at
least k edges
41
62
13
25
26
14
  • Examples
  • if k 1 then OPT 13
  • if k 3 then OPT 14
  • if k 5 then OPT 25
  • if k 6 then OPT 1413

17
57
Partial Vertex Cover
Weight functions
41
62
13
w41, 62, 13, 14, 25, 26, 17

w1 0, 0, 0, 14, 14, 0, 0
w w1 w2
w241, 62, 13, 0, 11, 26, 17
25
26
14
Assume k lt E (number of edges) Note any
feasible solution is NOT a 2-approximate
solution for weight function w1
17
In VC every edge must be hit by a vertex. In
partial VC, k vertices are sufficient. So the
optimum for w1 is 0 (klt5) vice versa the
solution that takes for example vertex 4 is
infinite many times larger than the optimum
58
Positive Weight Function
  • We do not know of any single subset that must
    contribute to all solutions.
  • To prevent OPT from being equal to 0, we can
    assign a positive weight to every element.

59
Positive Weight Function
Weight functions
41
62
13
w41, 62, 13, 14, 25, 26, 17
w1 0, 0, 0, 14, 14, 0, 0
25
26
14
w241, 62, 13, 0, 11, 26, 17
w w1 w2
Observe that 14 is NOT a lower bound of the
optimal value! For example for k1 then 13 is the
optimal value.
17
60
Positive Weight Function
Let d(x) be the degree of vertex x What is the
amortized cost to hit one edge by using x ? What
is the minimal amortized cost to hit any edge?
x
61
Positive Weight Function W1
41
62
13
w1(x) ? min d(x) , k For k 3 then ?
14/3 Weight functions (k3) w 41, 62,
13, 14, 25, 26, 17 w1 14, 14, 28/3, 14, 14,
14, 14 w2 27, 48, 11/3, 0, 11, 12, 3
25
26
14
17
w w1 w2
62
Function W1
  • Lower Bound Every feasible solution costs at
    least ??k 14
  • Upper Bound There are feasible solutions whose
    value can be arbitrarily larger than ??k (e.g.
    take all the vertices)
  • But if you take all the vertices then not all of
    them are strictly necessary!!
  • We can focus on Minimal Solutions!!!

14
14
28/3
14
14
14
14
63
Minimal Solutions
  • By minimal solution we mean a feasible solution
    that is minimal with respect to set inclusion,
    that is, a feasible solution whose proper subsets
    are all infeasible.
  • Minimal solutions are meaningful mainly in the
    context of covering problems (covering problems
    are problems for which feasible solutions are
    monotone inclusion-wise, that is, if a set X is a
    feasible solution, then so is every superset of
    X MST is not a covering problem).

64
Minimal Solutionsr-effective weights
  • w1 is r-effective if there exists a number b such
    that
  • b ? w1 x ? r b
  • for all minimal feasible solution x

65
The creative partagain find r-effective weights
  • If we can show that our algorithm uses an
    r-effective w1 and returns minimal solutions, we
    will have essentially proved that it is an
    r-approximation algorithm.
  • Designing an algorithm to return minimal
    solutions is quite easy.
  • Most of the creative effort is therefore expended
    in finding an r-effective weight function (for a
    small r).

66
2-effective weight function
  • In terms of w1 every feasible solution costs at
    least ? k
  • In terms of w1 every minimal feasible solution
    costs at most 2 ? k
  • Minimal solution any proper subset is not a
    feasible solution

67
Proof of 2. ( costs at most 2 ? k )
68
Proof of 2. (cont.)
d1(x) 2 d2(x) 3
x
69
The approximation algorithm
Algorithm from Bar-Yehuda et al. Local Ratio A
Unified Framework for Approximation Algorithms
ACM Computing Surveys, 2004
70
Algorithm Framework
  • If a zero-cost minimal solution can be found, do
    optimal solution.
  • Otherwise, if the problem contains a zero-cost
    element, do problem size reduction.
  • Otherwise, do weight decomposition.

71
Exercise
  • Partial hitting set show that PHS is a
    maxsmax,2-approximation algorithm.

72
Some Tree Problems
73
Steiner Tree Problem (1/5)
  • We are interested in Steiner trees that are
    minimal with respect to set inclusion.
  • A Steiner tree F is minimal if F- e is not a
    Steiner tree for every edge e?F.
  • Observe that a Steiner tree is minimal if and
    only if every leaf in the tree is a terminal.

74
Steiner Tree Problem (2/5)
  • ?(e) number of terminals incident to edge e
  • In the picture terminals are in black

?(e)0
?(e)2
?(e)1
75
Steiner Tree Problem (3/5)
? represents the lowest possible cost to cover a
terminal
? 1


76
Steiner Tree Problem (4/5)
Value of any minimal solution
W1 is 2-effective!!
77
Edge Contraction
5
5
5
5
1
1
1
1
0
0
0
0
0
1
1
1
8
0
8
8
8
Contracting an edge consists in fusing its two
endpoints u and v into a single (new) vertex z.
The edge (or multiple edges) connecting u and v
are deleted, and every other edge incident on u
or v becomes incident on z instead.
78
Steiner Tree Problem (5/5)
Algorithm from Bar-Yehuda et al. Local Ratio A
Unified Framework for Approximation Algorithms
ACM Computing Surveys, 2004
79
Minimum Shortest Path (1/3)
  • Observe that the Steiner Tree problem is the
    minimum shortest path problem as soon as Ts,t
  • Note that a minimal Steiner tree connecting s and
    t is a path

s
t
80
Minimum Shortest Path (2/3)
Value of any minimal solution
W1 is 1-effective!!
81
Minimum Shortest Path (3/3)
  • The presented Local-Ratio based algorithm LR-ST
    returns an optimal solution for the Shortest Path
    problem.
  • It can be viewed as a recursive implementation of
    a variant of Dijkstras algorithm (see Nicholson
    1966)

82
Minimum Shortest Path (ex. 1/2)
7
5
3
1
1
1
4
5
9
83
7
5
3
1
1
1
4
5
9
1
6
7
1
1
2
? 1
1

0
1

1
1
1
0
1
1
0
1
2
0
1
1
9
0
9
5
6
1
1
? 1
0
1
0


1
1
0
1
1
1
1
0
0
1
1
1
8
9
5
5
5
5
1
1
1
1
0
0
0
0
0
1
1
1
8
0
8
8
8
1
4
5
? 1
1
0
1


1
7
8
If the solution is unfeasible take that edge that
has been just contracted (w(e) ?)
84
Minimum Spanning Tree
  • Observe that the Steiner Tree problem is the
    minimum spanning tree problem as soon as T V

Exercise Show that algorithm LR-ST returns an
optimal minimum spanning tree. Hint prove that
for any minimal spanning tree F it is
85
Local Ratio for Scheduling Problems
86
Profit Maximization
87
Independent Set in Interval Graphs
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



time
Maximize
s.t.
For each instance I
For each time t
88
Maximal Solutions
  • We say that a feasible schedule is I-maximal if
    either it contains instance I, or it does not
    contain I but adding I to it will render it
    infeasible.

Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



I2
I1
time
The schedule above is I1-maximal and also
I2-maximal
89
An effective profit function
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



P10
P1 P(Î)
P10
P10
P10
P1 P(Î)
P10
P1 P(Î)
P1 P(Î)
Î
Let Î be an interval that ends first
Observe that p2 can be negative
90
An effective profit function
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



P10
P1 P(Î)
P10
P10
P10
P1 P(Î)
P10
P1 P(Î)
P1 P(Î)
Î
For every feasible solution x p1 x ?
p(Î)
For
every Î-maximal solution x p1 x ? p(Î)
Every Î-maximal is optimal.
91
Independent Set in Interval GraphsAn
Optimization Algorithm
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
  • Algorithm MaxIS( S, p )
  • If S F then return F
  • If ?I ? S p(I) ?0 then return MaxIS( S - I,
    p)
  • Let Î ? S that ends first
  • ?I ? S define p1 (I) p(Î) ? (I in
    conflict with Î)
  • IS MaxIS( S, p- p1 )
  • If IS is Î-maximal then return IS else return
    IS ? Î

92
Running Example
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
P(I5) 3 -4
P(I6) 6 -4
-2
P(I3) 5 -5
P(I2) 3 -5
P(I1) 5 -5
P(I4) 9 -5 -4
-4
-5
-2
93
Single machine scheduling
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



Maximize
s.t.
For each instance I
For each time t
For each activity A
94
A ½-effective profit function
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



Î
Let Î be an interval that ends first
Observe that p2 can be negative
95
A ½-effective profit function
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity9 Activity8 Activity7 Activity6 Activity5
Activity4 Activity3 Activity2 Activity1



Î
For every feasible solution x p1 x ? 2
p(Î)
For
every Î-maximal solution x p1 x ? p(Î)
Every Î-maximal is ½-effective.
96
Bandwidth Allocation
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
time
Maximize
s.t.
For each instance I
For each time t
For each activity A
97
Outline of the algorithm
  • To approximate this problem, we first consider
    the following two special cases.
  • Case 1. All instances are wide, that is, w(I ) gt
    1/2 for all I .
  • Case 2. All activity instances are narrow, that
    is, w(I ) 1/2 for all I .
  • In the case of wide instances, the problem
    reduces to interval scheduling since no pair of
    intersecting instances may be
  • scheduled together. Thus, we can use Algorithm
    MaxIS to find a 1/2-approximate schedule.
  • In the case of narrow instances, we find a
    1/3-approximate schedule by a variant of MaxIS as
    described in the following.

98
An effective profit function for w 1/2
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
Î
Let Î be an interval that ends first
99
An effective profit function for w 1/2
For every feasible solution x p1 x ? 3
p(Î)
For
every Î-maximal solution x p1 x ? p(Î)
Every Î-maximal is 1/3-effective.
100
Bandwidth Allocation The 1/5-approximation for
any w ? 1
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
w gt ½
w gt ½
w gt ½
w gt ½
w gt ½
w gt ½
w gt ½
w gt ½
w gt ½
Algorithm GRAY Find
1/2-approximation for gray (wgt1/2)
intervals COLORED Find 1/3-approximation
for colored intervals Return the one with the
larger profit Analysis If GRAY ? 40OPT
then GRAY ? 1/2(40OPT)20OPT
else COLORED ? 60OPT thus COLORED ?
1/3(60OPT)20OPT
101
Exercise
  • Show that for the special case in which each
    activity has only one instance we can obtain
    1/3-approximate solution.

102
Continuous Scheduling
Activity 9 Activity 8 Activity 7 Activity
6 Activity 5 Activity 4 Activity 3 Activity
2 Activity 1
time
103
Continuous Scheduling Split and Round Profit
(Loose additional (1-?) factor)
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
  • If currant p(I1) ? ? ?original p(I1) then delete
    I1
  • else Split I2(s2,e2 to I21(s2, s1d1 and
    I22(s1d1,e2

? d(I1) ?
? d(I2) ?
I11
I12
? d(I1) ?
I21
I22
? d(I2) ?
104
Unrelated Parallel Machines
  • We define the set of instances intersecting the
    interval that ends first Î that belong to other
    activities and can be scheduled only on the same
    machine as Î .
  • In addition, we use the following criterion in
    the schedule construction phase
  • An instance may be added to the schedule if the
    activity to which it belongs is not currently
    represented in the schedule
  • and the instance does not intersect any other
    instance already in the schedule that belongs on
    the same machine.

105
Loss Minimization
106
The Demand Scheduling Problem
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Resource 0.9
0.8 0.7 0.6
0.5 0.4 0.3
0.2 0.1


w(I) 0.0 Minimize
s.t. For each
instance I For each
time t


t

107
Algorithm Framework
  • Let (H p) denote the input, where H is the
    description of the activities and p is the
    penalty function.
  • Decompose p by p p1 p2 such that p2(I ) gt 0
    for all instances I , with equality for at least
    one instance.
  • Solve recursively (H p2), where H is obtained
    from H by deleting all instances whose p2-penalty
    is 0, and obtain a schedule S.
  • Consider the instances in H H in arbitrary
    order and add each to the schedule iff doing so
    retains the feasibility of the schedule. We
    return the schedule S thus constructed.

108
Special Case Min Knapsack
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Demand
1 For all intervals I define p1 (I) ?
Min w(I), 1 ? is chosen such that p2
? 0, with equality for at least one instance
For every feasible x p1 x ? ?

minimal is
2-approximation For every minimal x p1
x ? 2 ?
109
From Knapsack to Demand Scheduling
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
max demand1 at time t





For
all intervals I intersecting time t define p1
(I) ? Min w(I), 1

p1 (others) 0 p1 (all right-minimal)
is at most 2 ? p1 (all left-minimal) is at
most 2 ? For every minimal x p1
x ? (22) ? For every feasible x
p1 x ? 1 ?
Every minimal is 4-approximation
110
4-Approximation for Demand Scheduling
Slide from http//www.cs.technion.ac.il/reuven/ST
OC2000.ppt
Algorithm MinDemandCover( S, p ) If S F
then return F If there exists an interval I ?
S s.t. p(I) 0 then return
IMinDemandCover( S - I, p) Let t be the
time with maximum demand k Let S be the set of
instances intersects time t Let d MIN
p(I)/w(I) I ?S
MIN w(I) ,k if I ? S For all intervals I ?
S define p1 (I) d
0 else C MinDemandCover( S, p- p1 )
Remove elements form C until it is minimal and
return C
111
General Off-line Caching
  • The general caching problem models situations in
    which a cache is to be used for pages of varying
    sizes and of varying (cache) reload costs.
  • Input a cache size and a sequence of requests
    for pages.
  • Constraints a requested page must be loaded into
    the cache, unless already present. Each page is
    characterized by its size and its reload cost,
    which is incurred whenever the page is loaded
    into the cache. (Requests for pages in the cache
    incur no cost.) Since the cache size is fixed,
    loading one page may necessitate evicting
    another.
  • Goal find a minimum cost replacement schedule.

112
Off-line Caching Problem (1/2)
  • Note if we have a replacement schedule that
    evicts a certain page at some time between two
    consecutive requests for it, we may as well evict
    it immediately after the first of these requests
    and bring it back only for the second request.
  • Thus, we may restrict our attention to schedules
    in which for every two consecutive requests for a
    page, either the page remains present in the
    cache at all times between the first request and
    the second, or it is absent from the cache at all
    times in between.
  • This leads naturally to a description of the
    problem in terms of time intervals

Page k is requested at time i and after at time j
size
Page k
i
j
time
113
Off-line Caching Problem (2/2)
  • In order to accommodate cache request r(t) at
    time t it is necessary to use s(r(t)) space and
    the available cache size is CacheSize(t) S -
    s(r(t)). So at time t the demand of pages (with
    an interval at time t) not in the cache must be
    at least

time
t
114
New Developments in the Local Ratio Technique
Fractional Local Ratio
115
Standard Local Ratio
  • The standard local ratio approach is to use a
    weight decomposition that guarantees that the
    solution constructed by the algorithm will be
    r-approximate with respect to w1.
  • The analysis consists of comparing, at each level
    of the recursion, the solution found in that
    level, and an optimal solution for the problem
    instance passed to that level, where the
    comparison is made with respect to w1 and with
    respect to w2.
  • Thus, in each level of the recursion, there are
    potentially two optima (one with respect to w1,
    and one with respect to w2) against which the
    solution is compared, and in addition, different
    optima are used at different recursion levels.

116
Fractional Local Ratio
  • The fractional local ratio paradigm takes a
    different approach. It uses a single solution x
    to the original problem instance as the yardstick
    against which all intermediate solutions (at all
    levels of the recursion) are compared.
  • In fact, x is not even feasible for the original
    problem instance, but rather for a relaxation of
    it.
  • Typically, x will be an optimal fractional
    solution to a linear programming (LP) relaxation.

117
Fractional Local Ratio Theorem(for maximization
problems)
Let w w1 w2 . Let x and x be solutions such
that x is r-approximate relative to x with
respect to w1, and with respect to w2. Then, x is
r-approximate relative to x with respect to w as
well.
Note that the theorem holds even when negative
weights are allowed.
118
Maximum Independent Set
119
Standard Local Ratio for IS
Consider the following weight function. For a
given vertex v, let Nv denote the set
consisting of vertex v and all its neighbors. Fix
some v, and let ? gt 0.
Let ? be the maximum degree of all nodes. Show
that w1 is 1/?effective for every maximal
solution.
120
Maximum Independent Set
Let x? be the optimal (fractional) solution of
the linear relaxation
121
2/(?1)-Approx IS(G,w)
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
?
If ? v? V w(v) ? 0 return IS(G-v, w) If E?
return V Let v? V s.t xv? is maximum and Let ?
w(v) ? if i ?
Nv w1(i) 0
else Claimw1 x r? w1 x? for Good(x)
//maximal sol. REC IS(G, w2 w-w1)
Induction hyp is w2 REC r? w2x?
so if Good(REC) w1 REC r? w1x? we are
done If RECv is an independent set then
RECRECv Return REC
?
Max xv?
?
?
?
?
122
Gain 1 integral, lose ½(d1) fractional
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
?
Claim w1 x r? w1 x? for Good(x)
If Max xv? ½ Then x(Nv) ½(d1)
Else x(Nv) ½(d1) Thus w1 x? ½(d1)
? But w1 x ? Hence w1 x/ w1 x?
2/(d1) 2/(?
1) r?
?
Max xv?
?
?
?
?
123
The generalized vertex cover problem
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
Minimize wx Subject to xu
xv xe ? 1 ? eu,v ?E x
?0,1VE
124
2-Approx GVC(G,w)
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
If E? return ? If ? e? E w(e)0 return
eGVC(G-e, w) If ? v? V w(v)0 return
vGVC(G-E(v)-v, w) Let eu,v? E s.t ? min
w(u), w(v), w(e)gt0.S ?
if x?u,v,e w1(x) 0
else Noticew1 x ? 2 w1 x? for Good(x) //
minimal solution REC GVC(G, w2 w-w1)
Induction hyp is w2REC ? 2 w2x?
so if Good(REC) w1REC ? 2 w1x? we are done If
REC e is a cover then RECREC e Return REC
?
?
?
125
2 integral for the price of 1 fractional The
local ratio technique for rounding
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
Let x? be the the fractional solution
Minimize wx Subject to xu xv xe ?
1 ? e(u,v) ?E x ?0,1VE
126
d integral for the price of ½(d1) fractional
2-2/(?1)-Approx GVC(G,w)
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
?
If E? return ? If ? e? E w(e)0 return
eGVC(G-e, w) If ? v? V w(v)0 return
vGVC(G-E(v)-v, w) Let v? V s.t xv? is minum
and Let ? min(w(i) i ? Nv
? if i ? Nv w1(i) 0
else Claimw1 x ? r? w1 x?
for Good(x) REC GVC(G, w2 w-w1)
Induction hyp is w2REC ? r? w2x?
so if Good(REC) w1REC ? r? w1x? we are done If
REC is not a minimal cover then make REC
minimal Return REC
?
?
?
?
Min xv?
?
?
?
?
?
?
127
d integral for the price of ½(d1) fractional
Slide from http//www.cs.technion.ac.il/reuven/AP
PROX-SEMINAR/spr06/FLR.ppt
?
Claim w1 x ? r? w1 x? for Good(x)
If Min xv? ½ Then x(Nv) ½(d1) Else
x(Nv) ½(d1) Thus w1 x? ½(d1) ? But
w1 x ? d? Hence w1 x/ w1 x? ? 2-2/(d1)
? 2-2/(? 1) r?
?
?
?
?
Min xv?
?
?
?
?
?
?
128
Some final considerations about FLR
  • Thus the fractional local ratio technique is a
    combination of LP rounding and the standard local
    ratio approach.
  • Intuitively, the drawback of the standard local
    ratio technique is that, at each level of the
    recursion, we attempt to approximate the weight
    of a solution that is optimal with respect to the
    weight function present at that level.
  • We could obtain a better bound, if at each level
    of the recursion, we approximated the weight of a
    solution that is optimal with respect to the
    original weight function. This is the idea behind
    the fractional local ratio approach.

129
Links and Credits
  • Some materials of this lecture were taken from
    the following resources
  • Reuven Bar-Yehudas web page http//www.cs.technio
    n.ac.il/reuven/
  • A collection of local-ratio papers
    http//www.cs.technion.ac.il/reuven/lr-papers.htm
    l
  • A seminar course http//www.cs.technion.ac.il/re
    uven/APPROX-SEMINAR/win06.html
  • A presentation for Forest Problems
    http//tx.technion.ac.il/yonie/seminar.ppt

130
Appendix
  • Network Design Model

131
A Network Design Model
132
A Network Design Model
133
Feasible solutions
134
Maximality Property
135
Feasibility checking
The set F of red edges is not a feasible s-t
path. The red marked vertices are the connected
component C of (V,F). Note that f(C)1.
136
Proof sketch
Exercise provide a complete proof.
137
0-1 Special Functions
0-1 proper functions
Downwards Monotone Functions
138
Downwards monotone functions
  • Applications
  • Edge covering select a minimum weight set of
    edges spanning the entire vertex set (f(S)1 iff
    S1)
  • Lower-capacitated tree partitioning problem find
    a minimum-cost set of edges that partitions the
    vertices into trees such that each tree has at
    least k vertices, for some parameter k. Exercise
    provide function f(S) and show that it is
    downwards monotone.
  • Location-Routing problems select depots among a
    subset D of vertices of a graph G(V,E) and cover
    all vertices in V with a set of cycles, each
    containing a selected depot. Minimize the sum of
    the fixed costs of opening depots and the sum of
    the costs of the edges of cycles.

139
Minimum Cut
s
t
140
Notation
  • All weights are nonnegative and denoted by w. We
    denote by w(x) the weight of element x, and by
    w(X ), the total weight of set X , that is, w(X )
    ? x?X w(x).
  • We denote the optimum value for a given problem
    instance by OPT.
  • We denote the number of vertices/nodes by n, and
    the number of edges/arcs by m.
Write a Comment
User Comments (0)
About PowerShow.com