1 Greedy algorithms 2 Inapproximability 3 Recherche locale

Transcription

1 Greedy algorithms 2 Inapproximability 3 Recherche locale
MPRI 2-24-1: Optimization
Spyros Angelopoulos, Evripidis Bampis and Christoph Dürr
final exam, Dec 2nd, 2014
You can write down the answers in either French or English, as you prefer.
1
Greedy algorithms
Give a (polynomial-time) 1/2-approximation algorithm for the following problem. Justify
your answer.
Acyclic Subgraph
Instance: Directed graph G = (V, A).
Solution: A0 ⊆ A such that G0 = (V, A0 ) does not have a directed cycle.
Objective: Maximize |A0 |.
Hint: Partition A into two appropriately defined sets, and choose one of them.
2
Inapproximability
Consider the following problem
Directed Steiner Tree
Instance: Directed graph G = (V, A), with edge cost function c : A → R+ . Also given is a
set T ⊆ V of vertices, as well as a specific vertex s ∈ V .
Solution: Set of edges A0 ⊆ A such that for every vertex v ∈ T there is a directed path from
s to v in the graph G0 = (V, A0 ).
P
Cost: Cost of all edges in A0 , that is e∈A0 c(e).
Objective: Minimize the cost of the solution.
Show that Directed Steiner Tree cannot be approximated within a factor better
than ln|T | unless NP has slightly superpolynomial time algorithms (that is, unless N P ⊆
DT IM E(nO(log log n)) )).
Hint: Use a reduction from a suitable problem whose inapproximability is known from what
we covered in class. Justify your answer: simply stating the reduction will not suffice.
3
Recherche locale
On se donne n tâches et deux machines M1 et M2 . Chaque tâche j a une durée d’exécution
tj . On veut partitionner l’ensemble des tâches en deux sous-ensembles A et B. Le sousensemble A sera affecté à M1 etP
le sous-ensemble
PB à M2 . Les temps d’exécution sur les
machines M1 et M2 seront T1 = j∈A tj et T2 = j∈B tj . On voudrait minimiser |T1 − T2 |.
1
On propose un algorithme de recherche locale dans lequel on effectue un mouvement en
changeant l’affectation d’une tâche seulement si la différence absolue des temps d’exécution
des deux machines diminue.
P
(i) Supposons que pour tout j, tj ≤ 12 ni=1 ti . Montrer que pour tout optimum local,
nous avons 12 T1 ≤ T2 ≤ 2T1 .
(ii) Si à chaque mouvement on transfère la tâche avec le tj maximum, montrer que chaque
tâche ne changera de machine qu’une seule fois au plus.
(iii) Montrer que cet algorithme ne donne pas toujours la solution optimale.
4
Dual fitting
Consider the following problem. We are given a path P = {v1 , . . . , vn } where vi is adjacent
to vi+1 . In addition we are given a set R of m requests {R1 , R2 , . . . , Rm }. Specifically, each
request Rl ∈ R consists of a pair of vertices vi , vj , and can be interpreted as a request to use
the path from vi to vj . The problem is then to find a subset of requests S ⊆ R of maximum
cardinality such that each edge in the path P is used by at most one request in S.
We also consider the following simple greedy algorithm for this problem. The algorithm
orders the requests in R in increasing order of length (here the “length” refers to the number of edges in the path that corresponds to the request), and greedily selects them while
maintaining feasibility.
Prove that the above algorithm is 1/2-approximation using the dual fitting technique. In
particular, you should go over the following steps:
(i) We need an integer-program formulation of the problem, its relaxation and its dual.
We do this part for you: The primal has a variable xi for each request Ri , and is as
follows,
m
X
max
xi
(P)
i=1
X
subject to
xi ≤ 1
for all 1 ≤ t ≤ n
t∈Ri
xi ≥ 0
for all 1 ≤ i ≤ m.
with dual
min
n
X
yt
(D)
t=1
subject to
X
yt ≥ 1
for all 1 ≤ i ≤ m
t∈Ri
yt ≥ 0
for all 1 ≤ t ≤ n.
2
(ii) Explain clearly how to recast the greedy algorithm using the dual LP. Hint: Start
with a feasible dual solution yt = 1 for all t (note that the dual LP is a minimization
program). Show how to modify this solution so as to obtain a re-statement of the
greedy algorithm. Recall that the dual solution may (and will) be infeasible.
(iii) Express the cost of the greedy algorithm in terms of the dual objective obtained in (ii).
Hint: They should be identical.
(iv) Relate the cost of the greedy algorithm to the cost of a suitable feasible dual solution,
and last prove the desired approximation guarantee. Justify your answer. Hint: Try
to “distribute” a suitably-chosen multiple of the dual objective of step (iii) so as to
guarantee a feasible dual.
5
Objectif fractionnel
Considérez le problème suivant, qu’on appelle programme linéaire fractionnel.
cT x + d
eT x + f
subject to Ax ≤ b
inf
(F)
eT x + f > 0.
Ici x est un vecteur de variables de dimension n, c, e sont des vecteurs constants de dimension
n, d, f des scalaires, b est un vecteur constant de dimension m et A une matrice constante
de dimension m × n. Il n’y a pas de contrainte de non-négativité sur x, et aucune hypothèse
n’est faite sur A, b, c, d, e, f .
(i) Donnez un exemple pour n = 1, où l’espace des solution n’est pas fermé, dans le sens
que pour tout δ > 1, il existe une solution de valeur δ, mais il n’existe pas de solution
de valeur 1.
(ii) Montrez comment à l’aide d’un programme linéaire on peut décider si le problème (F)
admet une solution (pas forcément optimale).
(iii) Transformez (F) en un programme linéaire (L), en utilisant à la place de x des variables
y, t avec la relation
x
eT x + f
1
t := T
.
e x+f
y :=
(iv) Soit F l’ensemble des solutions à (F) et L+ l’ensemble des solutions à (L) avec t > 0 et
L0 l’ensemble des solutions à (L) avec t = 0. Montrez que pour toute solution x ∈ F
il existe une solution dans L+ de même valeur objective, et vice-versa.
3
Bonus Supposons que l’optimum OPT de (L) est de valeur non-nulle et dans L0 , et que F soit
non-vide. Montrez qu’il existe une suite de solutions dans F dont la valeur objective
tend vers OPT.
4