






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







CS787: Advanced Algorithms Scribe: Amanda Burton, Leah Kluegel Lecturer: Shuchi Chawla Topic: Primal-Dual Algorithms Date: 10-17-
We finished our discussion of randomized rounding and began talking about LP Duality.
Suppose we have the following primal LP.
min
i cixi^ s.t. ∑ i Aij^ xi^ ≥^ bj^ ∀j^ = 1, ..., m
xi ≥ 0
In this LP we are trying to minimize the cost function subject to some constraints. In considering this canonical LP for a minimization problem, lets look at the following related LP.
max
j bj^ yj^ s.t. ∑ j Aij^ yj^ ≤^ ci^ ∀i^ = 1, ..., n
yj ≥ 0
Here we have a variable yj for every constraint in the primal LP. The objective function is a linear combination of the bj multiplied by the yj. To get the constraints of the new LP, if we multiply each of the constraints of the primal LP by the multiplier yj , then the coefficients of every xi must sum up to no more than ci. In this way we can construct a dual LP from a primal LP.
Duality gives us two important theorems to use in solving LPs.
Theorem 14.3.1 (Weak LP Duality Theorem) If x is any feasible solution to the primal and y is any feasible solution to the dual, then V alP (x) ≥ V alD(y).
Figure 14.3.1: Primal vs. Dual in the Weak Duality Theorem.
On the number line we see that all possible values for dual feasible solutions lie to the left of all possible values for primal feasible solutions.
Last time we saw an example in which the optimal value for the dual was exactly equal to some value for the primal. This introduces the question: was it a coincidence that this was the case? The following theorem claims that no, it was not a coincidence. In fact, this is always the case.
Theorem 14.3.2 (Strong LP Duality Theorem) When P and D have non-empty feasible re- gions, then their optimal values are equal, i.e. V al P∗ = V al∗ D.
On the number line we see that the maximum value for dual feasible solutions is equivalent to the minimum value for primal feasible solutions.
Figure 14.3.2: Primal vs. Dual in the Strong Duality Theorem.
It could happen that there is some LP with no solution that satisfies all of the constraints. In this case the feasible region would be empty. In this case the LP’s dual will be unbounded in the sense that you can achieve any possible value in the dual.
The Strong LP Duality Theorem has a fairly simple geometric proof that will not be shown here due to time constraints. Recall from last time the proof of the Weak LP Duality Theorem.
For a nicer view of the correspondence between the primal and the dual consider the following way of viewing this property.
Primal LP Dual LP min
i cixi^ s.t.^ max^
∑^ j^ bj^ yj^ s.t. ∑^ i^ Ai^1 xi^ ≥^ b^1 y^1 ≥^0 i Ai^2 xi^ ≥^ b^2 y^2 ≥^0 .. .
i Aimxi^ ≥^ bm^ ym^ ≥^0 x 1 ≥ 0
j A^1 j^ yj^ ≥^ c^1 x 2 ≥ 0
j A^2 j^ yj^ ≥^ c^2 .. .
xn ≥ 0
j Anj^ yj^ ≥^ cn
Here we have associated regular constraints in the primal to non-negativity constraints in the dual and non-negativity constraints in the primal to regular constraints in the dual along the rows of this table. Notice that the primal has m regular constraints and n non-negativity constraints on it and the dual has a variable for each of the m regular constraints and a regular constraint for each of the n non-negativity constraints. Therefore, there is a one-to-one correspondence between constraints in the primal and constraints in the dual. If x and y are optimal solutions for the primal and the dual, then for each row in this table, either the left side or the right side of the table must be tight, i.e. an equality rather than an inequality.
From the Strong LP Duality Theorem we have
Corollary 14.3.3 (x∗, y∗) are primal and dual optimal solutions respectively if and only if they satisfy DCS and PCS.
Consider the following minimization LP.
min x 1 + 3x 2 + 4x 3 + x 5 s.t. 5 x 1 + 2x 4 ≥ 1 4 x 2 + 3x 3 + x 4 + x 5 ≥ 2 x 1 + x 3 + x 5 ≥ 7 x 1 ≥ 0 .. . x 5 ≥ 0
We want to compute the dual of this LP. We want to introduce a variable for each regular constraint in the primal, so we will have variables y 1 , y 2 , and y 3 in the dual. We want to introduce a constraint
for each variable in the primal, so we will have 5 constraints in the dual. Each constraint in the dual is written as a function of the variables y 1 , y 2 , and y 3 in such a way that the coefficients of xi sum up to no more than the coefficient of xi in the objective function of the primal. Finally, we determine the objective function of the dual by letting the right hand sides of the constraints in the primal be the coefficients of the yj. This gives us the following dual
max y 1 + 2y 2 + 7y 3 s.t. 5 y 1 + y 3 ≤ 1 4 y 2 ≤ 3 3 y 2 + y 3 ≤ 4 2 y 1 + y 2 ≤ 0 y 2 + y 3 ≤ 1 y 1 ≥ 0 y 2 ≥ 0 y 3 ≥ 0
In matrix form this transposes the coefficient matrix
x 1 x 2 x 3 x 4 x 5 5 0 0 2 0 0 4 3 1 1 1 0 1 0 1
into a coefficient matrix by transposing the first column of coefficients of the primal into the first row of coefficients of the dual, the second column into the second row, and so on.
y 1 y 2 y 3 5 0 1 0 4 0 0 3 1 2 1 0 0 1 1
We would now like to use LP-Duality for designing algorithms. The basic idea behind why we might want to use LP-Duality to design algorithms is to solve a problem more quickly than using Linear Programming on its own. When we need to solve an algorithm with Linear Programming, we relax some Integer Program so that the corresponding LP gives us a good lower bound, solve the LP for some optimal linear solution, and round it off. It is possible to solve Linear Programs in polynomial time for its optimal solution, but the known algorithms still run fairly slowly in practice.
There exists another equivalent way of writing the Max-flow LP in terms of the flow on paths:
xp : amount of flow on an s-t path p
P : set if all paths from s-t
This LP has the constraints on the variables:
xp ≥ 0 ∀p ∈ P - the flow on p is non-negative ∑ p 3 e xp^ ≤^ ce^ ∀e^ - the flow on^ e^ is no larger than the edge’s capacity
Subject to these constraints, our objective function maximizes the amount of flow on the xp paths:
max
p∈P xp
This is an equivalent LP, and the Primal we are going to talk about, because this one will be easier to work with when constructing the Dual.
First, we must define our variables for the Dual, where each variable in the Dual corresponds to a constraint in the Primal. Since the Primal contains one non-trivial constraint for every edge, the Dual must contain one variable for every edge in the Primal:
ye : variable for edge e ∈ E
The Dual LP must have one constraint for every variable. Like we did in the Simple Example, for each variable in the Primal, we look at the coefficient that you get when you multiply the Primal constraints by the new variables, ye, and sum over the number of constraints e. We want to find the coefficient of any fixed variable, and write the constraint coresponding to that variable. For any fixed path p, we analyze the coefficients using the constraints on xp: ∑ e
p 3 e xpye^ ≤^
e ceye ∑ p xp
e∈p ye^ ≤^
e ceye
From this analysis, we get the constraints on the variable ye:
ye ≥ 0 ∀e ∑ e∈p ye^ ≤^1 ∀p Subject to these constraints, our objective function is
min
e yece So far, we have mechanically applied a procedure to a Primal LP and determined its Dual. When you start from a combinatorial problem and obtain its Dual, it is a good question to ask what these variables and constraints actually mean. Do they have a nice combinatorical meaning? Usually,
if you start from some combinatorial optimization problem, then its Dual does turn out to have a nice combinatorial meaning.
So what is the meaning of this Dual? It is saying that it wants to assign some value to every edge, such that looking at any s-t path in the graph, the sum total of the values on the edges in that path should be at least one. In order to understand what kind of solution this LP is asking for, think of an integral solution to the same LP. Say that we require ye ∈ { 0 , 1 }. What, then, is a integral feasible solution to this program? If ye ∈ { 0 , 1 } ∀e, then we are picking some subset of the edges, specifically the subset of edges where ye = 1. What properties should those edges satisfy? It should be that for all s-t paths in the graph, the collection of edges that we pick should have at least one edge from that path, and these edges form a cut in the graph G. If we were to minimize the solution over all the cuts in the graph, this would give us a Min-cut.
Fact 14.6.1 all integral feasible solutions to the Dual form the set of all s-t cuts.
Because the Dual is minimizing over some values, any feasible solution to the Dual is going to be greater than or equal to any feasible solution to the Primal, by the Weak Duality Theorem.
Figure 14.6.3: Ranges of minimization vs. maximazation feasible solutions.
From this we determine the following corollary:
Corollary 14.6.2 Min-cut ≥ Max-flow
This result is unsurprising, though determining that Min-cut = Max-flow is still non-trivial. Thank- fully, the Strong Duality Theorem tells us:
Corollary 14.6.3 Min-fractional-cut = Max-flow
The optimal value of the Dual will be exactly equal to the optimal value of the Primal. So far, we do not know if the optimal solution to the Dual is an integral solution or not. If the solution to the Dual is integral, than it will prove the Max-flow Min-cut Theorem, but if it turns out to be a fractional solution, than we cannot determine the best solution to the problem. The Strong Duality Theorem gives us this weaker version of Max-flow Min-cut, that any fractional Min-cut is equal to the Max-flow of the graph. A fractional Min-cut is definted by this LP, where we assign some fractional value to edges, so that the total value of a path is less than or equal to 1. In order to get the Max-flow Min-cut Theorem from this weaker version, we need to show that for every fractional solution there exists integral solution that is no less optimal. We will give a sketch of the proof of this idea.
Theorem 14.6.4 There exists an integral optimal solution to the Min-cut LP.
Figure 14.6.5: Distance from u to v vs. possible distances on α.
This expectation represents the size of the cut. If an edge e is in the cut, it contributes ce to the size of the cut, and 0 otherwise. So we can assign indicator random variables to every edge that takes on a value 1 if it is in the cut, and 0 if it is not. So then the size of the cut is the weighted sum of the indicator variables. Then its expectation is the sum of its expected values of its variables, so it will turn out to be just the cost of each edge times the probability that the edge is in the cut, which is summed over all the edges.
As
e∈E ceye^ is the value of the fractional solution, the expected value of the integer cut is no greater than that of the fractional solution. If we are picking a cut with some probability and the expected value of that cut is small, then there has to be at least one cut in the graph which has small value. So, there exists one integral cut with value at most the value of y.
We will see more applications of LP-duality next time, as well as an algorithm based on LP-duality.