Docsity

Linear Programming: Separation Oracles and the Dynamic Simplex Method, Study notes of Linear Programming

Partial preview of the text

Download Linear Programming: Separation Oracles and the Dynamic Simplex Method and more Study notes Linear Programming in PDF only on Docsity!

NOTES ON COMBINATORIAL

OPTIMIZATION

GEIR DAHL∗

and

CARLO MANNINO†

October 1, 2012

∗ (^) Department of Mathematics and Department of Informatics, CMA, University of

Oslo, Norway. [email protected] † (^) University of Rome, La Sapienza, Department of Computer Science, Rome, Italy,

and visiting scientist at CMA. [email protected]

List of Figures

  • combinatorics 1 Combinatorial optimization and polyhedral
  • 1.1 Formulations and relaxations for (CO)
  • 1.2 Separation oracles and the dynamic simplex method
  • 1.3 A separation oracle for the forest polytope.
    • matrices 2 Integral polyhedra, TDI systems and totally unimodular
  • 2.1 Integral polyhedra and TDI systems
  • 2.2 Totally unimodular matrices
  • 2.3 Applications: network matrices and minmax theorems
    • problems 3 Heuristic algorithms for combinatorial optimization
  • 3.1 Constructive heuristics
  • 3.2 Improvement heuristics
  • 4 Exact methods
  • 4.1 Relaxations and branch-and-bound
  • 4.2 Finding additional valid inequalities
  • 4.3 Lagrangian relaxation
  • 4.4 The Traveling Salesman Problem
  • 4.5 Exercises
  • 1.1 The feasible points (solid circles) of Example 1.1
  • 1.2 An example of Hamilton tour
  • 1.3 An example of maximum weight forest
  • 1.4 A formulation for the set of feasible solutions of Example 1.1
  • 1.5 The natural formulation for the set of solutions of Example 1.1
  • 1.6 Comparisons among different formulations of Example 1.1
  • 1.7 Best against natural formulation of Example 1.1
  • 3.1 The greedy solution of Example 3.2
  • 3.2 A Eulerian graph and a corresponding Eulerian tour
    • Tree 3.3 Step 1 of Christofides Algorithm: build a Minimum Spanning
    • shown in solid lines 3.4 Step 2, 3 and 4 of Christofides Algorithm: the final Hamilton tour is
  • 3.5 A 2-exchange move
  • 3.6 Two distinct tours in the Sarvanov and Doroshko neighborhood
  • 3.7 A tour and its associated matching problem
  • 4.1 A (partial) enumeration tree
  • 4.2 A branching tree
  • 4.3 The (partial) branch-and-bound tree of Example 4.1
  • 4.4 A vehicle routing for three vehicles
  • 4.5 From sequencing to TSP
  • 4.6 A 1-tree: the solid edges form a spanning tree F in G[V \ { 1 }]
  • 4.7 Shrinking nodes u and v (zero-weight edges are omitted)
  • 4.8 A comb
    • tour of G|uv (G|st), 4.9 Shrinking edge uv (st) maps an Hamilton tour of G into a graphical

iii

Chapter 1

Combinatorial optimization and polyhedral

combinatorics

Consider the following combinatorial optimization problem (CO). We have a class F of feasible sets each being a subset of a finite ground set E; we are also given a weight function w : E → IR, and for F ∈ F we define its weight w(F ) =

e∈F w(e). Then the combinatorial optimization problem is:^ Combinatorial Optimization Problem max{w(F ) : F ∈ F } (1.1)

One major goal in the area polyhedral combinatorics is to translate the (CO) problem into an optimization problem in IRE^. To this end, we represent each F ∈ F by its incidence vector χF^ in IRE^ ; so χFe = 1 if e ∈ F and χFe = 0 otherwise. Let S = {χF^ : F ∈ F } ⊆ { 0 , 1 }E^ be the set of the incidence vectors of the sets in F. Then the following problem is equivalent to (CO):

max{wT^ x : x ∈ S} (1.2)

Example 1.1. Project Selection. An organization has stated that the budget for project selec- all projects for the upcoming half-year is $600,000, which must cover all internal tion problem and external costs associated with the projects. In addition, the amount of work that can be accomplished by the organization’s personnel is limited to 5,000 hours for the half-year. The project manager has picked up two possible project alter- natives, say A 1 and A 2. Project A 1 gives a profit of $400,000 and requires an investment of $300,000 plus 4000 hours of personnel. Project A 2 gives a profit of $ 500,000 and requires an investment of $400,000 plus 2000 hours of personnel. We need to find an investment which maximizes profit, satisfying the budget and personnel constraints.

1 n

2 n 3 n

4 n

5 n 6 n





H H

HH 1

H H

HH 1

H H

HH 4



1 n

2 n 3 n

4 n

5 n 6 n





H H

HH 1

H H

HH 1

Figure 1.2: An example of Hamilton tour

The area of polyhedral combinatorics attempts to solve (1.2) (and thus (CO)) by means of linear programming. This is done by exploiting the properties of the convex hull conv(S) of S, which is a polytope^1. If we denote by ext(P ) the set of vertices of a polyhedron P , we have S = ext(conv(S)). Consider now the following linear programming problem:

max{wT^ x : x ∈ conv(S)} (1.3)

If S is empty, so it is conv(S). Otherwise conv(S) 6 = ∅ and there exists an optimal solution x∗^ ∈ ext(conv(S)) = S. So, in principle (CO) can be solved by applying the simplex method to (1.3), if we are given an external representation of conv(S) in terms of a system of linear inequalities. Unfortunately, for the great majority of combinatorial optimizations, such a representation is not at hand, not even implicitly.

There exist, however, some remarkable exceptions. One such exception is the problem of finding a maximum weight forest in a given connected, undirected maximum weight forest problem

graph G = (V, E) with weight function w; this example is from [18]. Recall that a forest is an acyclic undirected graph (whereas a tree is a connected forest). The weight of a forest is simply the sum of weights of its edges, which implies that when looking for maximum weight forests we are not interested in including isolated nodes^2. So, it is natural to identify a forest H = (V ′, F ) of G = (V, E) with the set F of its edges. Note also that if all weights are nonnegative the maximum weight forest is equivalent to the spanning tree problem (show this!).

With negative weights present, an optimal solution may be a forest and not a

  1. Recall that a polytope P is the convex hull of a finite set of points in IRn, and, by the main representation theorem for polyhedra, a set is a polytope if and only if it is a bounded polyhedron.
  2. A node is isolated in a graph H if no arcs of H are incident to it.

1 n

2 n 3 n

4 n

5 n 6 n

H H

HH 4



H H

HH -

H H

HH -





1 n

2 n 3 n

4 n

5 n 6 n

H H

HH 4



Figure 1.3: An example of maximum weight forest

tree. Let G = (V, E) be a graph and, for each S ⊆ V , denote by E(S) the set of edges with both ends in S. It is easy to show that G is a forest if and only if, for each S ⊆ V , we have |E(S)| ≤ |S| − 1. This translates immediately into the following characterization of the incidence vectors of forests:

Lemma 1.1. Let G = (V, E) be a graph. Then x ∈ { 0 , 1 }E^ is the incidence vector of (the edges of) a forest if and only if

x(E[S]) ≤ |S| − 1 for all S ⊆ V. (1.4)

Inequalities of type (1.4) are called subtour elimination constraints.

In Chapter 1 of [21] the spanning tree problem is solved in polynomial time by the greedy algorithm. The idea is to iteratively extend a forest by adding a minimum weight edge which does not introduce any cycles. This algorithm also solves the maximum weight forest problem, provided that we terminate whenever the next edge has nonpositive weight.

First we define the polytope of interest. We let the forest polytope F (G) be the convex hull of the incidence vectors of all forests in G. Jack Edmonds showed in [7] the following theorem which gives a complete linear description of F (G).

Theorem 1.2. F (G) ⊂ IRE^ is the solution set of the following linear system

(i) xe ≥ 0 for all e ∈ E; (ii) x(E[S]) ≤ |S| − 1 for all S ⊆ V.

Proof. We follow the presentation of [18]. The idea of this proof, due to Ed- monds, is to show that every vertex of the bounded polyhedron defined by (1.5) is the incidence vector of a forest of G. This in turn is done by using the greedy algorithm on the LP dual of the problem of maximizing cT^ x subject to the linear system (1.5). Also, via complementary slackness, an optimal primal solution is constructed.

6

(0,0) 1

1

2

2

u u

u e

J

J

J

J

J

J

J

J

J

JJ

((((((((

(

A

A

A

A

A

A

AA 













P

Figure 1.4: A formulation for the set of feasible solutions of Example 1.

1.1 Formulations and relaxations for (CO)

We start with an important definition. Definition 1.1. Let S ⊆ { 0 , 1 }n. A formulation for S is a polyhedron P ⊆ IRn satisfying P ∩ { 0 , 1 }n^ = S. In other words, P is a formulation for S iff the 0-1 points of P are precisely the points of S. A possible formulation for the set of feasible solutions of Example 1.1 is given in Figure 1.1. Clearly, one can build an infinite number of different formulations for the same set S. Since conv(S) ∩ { 0 , 1 }n^ = S, it follows that conv(S) is one such formulation for S. A special role is played by the so called natural natural formulation, which is the one directly obtained from the constraints of formulation the original problem when this is stated as a linear pogramming problem with integrality constraints on the variables. In particular, S is sometimes directly de- fined as the set of binary solutions to a family of linear constraints. In other cases, such a family of linear constraints may be derived directly from the description of the problem, as in Example 1.1. Of course, a natural formulation may not be available in general. Example 1.1 (continued). Let S be the set of feasible solutions of Example 1.1, and let x ∈ S. Since x is a binary vector, then it satisfies:

0 ≤ xi ≤ 1 i = 1, 2 (1.7)

Also, x satisfies the budget constraint:

300000 x 1 + 400000x 2 ≤ 600000 (1.8)

6

(0,0) 1

1

2

2

u u

u e

  • (^) Working hours constraint
    • (^) Budget constraint

Z

Z Z

Z Z

Z Z Z

Z Z

Z Z

Z Z

Z Z

ZZ

A

A

A

A

A

A

A

A

A

A

A

A

A

AA

P

Figure 1.5: The natural formulation for the set of solutions of Example 1.

and the working hours constraint:

5000 x 1 + 2000x 2 ≤ 6000 (1.9)

Constraints (1.7), (1.8) and (1.9) define a natural formulation for S (see Picture 1.1).

Example 1.2 (continued). Consider again the TSP problem associated with a graph G = (V, E). One can show that a 0-1 vector x is the incidence vector χF^ of a Hamilton tour F ⊆ E iff it satisfies the following system of linear inequalities

(i) x(δ(v)) = 2 for all v ∈ V ; (ii) x(δ(W )) ≥ 2; for all W ⊂ V , W 6 = ∅, W 6 = V.

The constraints (i) assure that every 0-1 solution x is of the form x = χF^ where F ⊆ E and d(V,F )(v) = 2 for each v ∈ V ; such a set F is called a 2 − matching (or 2-factor). Clearly, every tour is a 2-matching, so all these inequalities must be satisfied by the incidence vectors of Hamilton tours. However, in general a 2- matching is a union of disjoint cycles, so it may not be a tour. The 2-connectivity inequalities (ii) eliminate such a possibility, i.e., a 2-matching that satisfies (ii) is a tour (otherwise we could let W be the node set of one subtour, and we would get a violated inequality). From this it is not difficult to see that the 0-1 feasible solutions in (1.10) are precisely the incidence vectors of tours.

An equivalent set of constraints that can replace (1.10)(ii) is the set of subtour

The optimal value of (Q) belongs to the interval between the lower and the upper bound (we are assuming that both can be computed efficiently). Its size UB −LB is called the gap. The smaller the gap is, the better it is. If gap = 0 then UB = LB, which in turn implies UB = v(R) = g(y∗) = w(x∗) = w(¯x) = LB, which proves that ¯x is an optimal solution to (Q). So, in general, we would like the upper bound to be as small as possible; in contrast, the lower bound should be as large as possible. In other words, we want to have at hand

  • strong relaxations of (Q), providing small upper bounds on v(Q) and
  • effective heuristic methods, capable to find good quality solutions to (Q), hopefully optimal.

The rest of this chapter is devoted to the first goal, whereas heuristic methods will be discussed in a subsequent chapter.

Now, let (Q) be max{wT^ x : x ∈ S} where S ⊆ { 0 , 1 }n^ be a combinatorial optimization problem, and let P ⊆ IRn^ be a formulation for S. By definition, S ⊆ P. It follows from the above discussion that the following problem

(R) max{wT^ x : x ∈ P }

is a relaxation of (Q). Since problem (R) amounts to maximizing a linear func- tion over a polyhedron, (R) is a linear program (LP), and we there are a number of efficient algorithms to solve LPs. The simplex method is one of these, even though its theoretical complexity is still unknown. This means that the simplex method works very well in practice, but in principle there exist highly complicated instances requiring an enormous amount of time to be solved. Interestingly, the- oretically more efficient methods as the interior point algorithms do not perform significantly better in practice. So, problem (R) along with the simplex method can be used to compute upper bounds on v(Q). comparing formulations As already mentioned, we may have different formulations for the same set S. How can we distinguish among them? We need some criteria to compare between formulations and to measure their quality. So, let (Q) be max{wT^ x : x ∈ S ⊆ { 0 , 1 }n} be a combinatorial optimization, and let P 1 and P 2 be two distinct for- mulations for S. Since we want to use P 1 and P 2 to compute upper bounds on v(Q), one candidate quality criterium is the following: P 1 is better than P 2 if and only if max{wT^ x : x ∈ P 1 } ≤ max{wT^ x : x ∈ P 2 }. So, if we consider the two for- mulations in Figure 1.1 for the problem of Example 1.1, the natural formulation P 1 has to be preferred to the other when the objective function is the original one, to maximize 4x 1 + 5x 2.

However, if the objective becomes max x 2 , then P 2 has to be preferred to P 1. So, this indicator is dependent on the objective and thus on the problem. It is

6

(0,0) 1

1

2

2

u u

u e

(^6) max x 2

\ \ \ \ \ \ \ \ \ \ \

\

max 4x 1 + 5x 2

 Z Z

Z

ZZ

A

A

A

A

A P 1 

J

J

J

J

J

J

J

JJ

A((((((((

A

A

AA











SSw P 2 Figure 1.6: Comparisons among different formulations of Example 1.

6

(0,0) 1

1

2

2

u u

u e Z Z

Z

ZZ

A

A

A

A

A

@ @ @ @ @@

Figure 1.7: Best against natural formulation of Example 1.

preferable to establish a criterium which only depends on the formulations. So, we say that P 1 is better than P 2 iff P 1 ⊆ P 2. This implies that max{wT^ x : x ∈ P 1 } ≤ max{wT^ x : x ∈ P 2 } for any w ∈ IRn^ and P 1 will always return a bound which is not worse than that associated with P 2. Actually, from convexity we have the following theorem:

Theorem 1.4. Let P 1 and P 2 be polytopes in IRn. Then P 1 ⊆ P 2 if and only if max{wT^ x : x ∈ P 1 } ≤ max{wT^ x : x ∈ P 2 } for all w ∈ IRn.

Now, it is not difficult to see that conv(S) is contained in every formulation for S, and we say that conv(S) is the best formulation for S. Indeed, we have that conv(S) returns the best possible upper bound, since for all w ∈ IRn, we have: max{wT^ x : x ∈ conv(S)} = max{wT^ x : x ∈ S}.

b cannot be explicitly represented, typically because m is too large and such a representation would require too much computer space and time to be obtained. One such example is the formulation (1.5) of the Maximum Weight Forest in a graph G. The number of constraints of type (1.5.ii) grows exponentially in the number of nodes of G, which makes it impossible to generate all of them even for small graphs. However, this is not necessary to solve the corresponding optimization problem. To understand this, we need to introduce the concept of separation oracles.

Definition 1.3. Let A ∈ IRm×n, b ∈ IRm, let P = {x ∈ IRn^ : Ax ≤ b} be a polyhedron and let x¯ ∈ IRn. A separation oracle is an algorithm which either concludes that x¯ ∈ P or, if x /¯ ∈ P , returns a constraint

j aij^ xj^ ≤^ bi^ in the description of P violated by x¯ (i.e.

j aij^ x¯j^ > bi).

Example 1.3 (continued). Consider the formulation P for the set S = {x ∈ { 0 , 1 }^5 : 7x 1 + 6x 2 + 5x 3 + 3x 4 + 2x 5 ≤ 11 } obtained by considering the knapsack constraint 7x 1 + 6x 2 + 5x 3 + 3x 4 + 2x 5 ≤ 11 and all constraints (1.11) and let x¯ 1 = 2/3, ¯x 2 = 2/3, ¯x 3 = ¯x 4 = ¯x 5 = 0. Then a separation oracle for P would return ¯x /∈ P , along with the violated cover inequality x 1 + x 2 ≤ 1. Remark that the knapsack constraint is not violated by ¯x.

In the above example the oracle finds a violated constraint by inspection, as the number of inequalities is very small and they are listed explicitly. This is in general not the case and separation oracles can be rather complicated algorithms, not necessarily efficient. We will describe now an efficient, LP-based algorithm to solve the separation problem for the forest polytope.

1.3 A separation oracle for the forest polytope.

Let ¯x ∈ IRE^ : we need to establish whether ¯x violates one of the constraints of (1.5) and, if so, which one. Clearly, if ¯xi < 0 for some i ∈ E, then an oracle could check it by simple inspection and return the violated constraint xi ≥ 0. So, we can assume ¯x ≥ 0. In this case, the oracle must only check for violated subtour elimination constraints (1.5.ii), that is it must solve the following problem:

Problem 1. Find a set S¯ ⊆ E such that x¯(E[ S¯]) > | S¯| − 1 or prove that x ¯(E[S]) ≤ |S| − 1 for all S ⊆ E.

We solve the above problem by linear programming. In particular, we first build a suitable 0-1 linear program and then show that we can drop the integrality constraint on the variables.

To this end, let z ∈ { 0 , 1 }V^ be the incidence vector of a set S ⊆ V. Observe that w ∈ { 0 , 1 }E^ is the incidence vector of E[S] if and only if wij = 1 precisely when zi = 1 and zj = 1, whereas wij = 0 otherwise. This can be expressed by the following system of linear inequalities (plus the 0-1 constraints on the variables):

we ≤ zi, we ≤ zj for e = (i, j) ∈ E SUB(V, E) we ≥ zi + zj − 1 for e = (i, j) ∈ E (1.12) w ∈ { 0 , 1 }E^ , z ∈ { 0 , 1 }V

Denote by SUB(V, E) the set of feasible solutions to (1.12). So (¯z, w¯) identifies a subtour elimination constraint associated to S¯ and is violated by ¯x if and only if

  • z¯ is the incidence vector of S¯
  • (¯z, w¯) ∈ SUB(V, E) and

e∈E[ ¯S] ¯xe^ >^ |^

S¯| − 1.

By observing that

e∈E[ S¯] x¯e^ =^

e∈E x¯e^ w¯e^ and^ |^

S¯| = ∑

i∈V ¯zi, the last condition can be rewritten as follows:

∑

e∈E

¯xe w¯e >

i∈V

¯zi − 1 (1.13)

We are finally able to write a separation oracle for the subtour elimination con- straints. Define the following 0-1 linear optimization problem:

max

e∈E

x ¯ewe −

i∈V

zi

s.t. (1.14) (z, v) ∈ SUB(V, E)

Denote by (z∗, w∗) an optimal solution to (1.14), and let v∗^ be its value. Then it is easy to see that

  • if v(z∗, w∗) > −1, the (z∗, w∗) identifies a subtour elimination constraint violated by ¯x which is returned by the oracle.
  • if v(z∗, w∗) ≤ −1 then no solutions in SUB(V, E) satisfy (1.13) and the oracle returns no violated constraint.