15.053 Thursday, May 3: Cutting Plane Techniques For Getting Improved Bounds
15.053 Thursday, May 3: Cutting Plane Techniques For Getting Improved Bounds
15.053 Thursday, May 3: Cutting Plane Techniques For Getting Improved Bounds
053
Thursday, May 3
iPod 1
5 16
server
2 7 22
brass rat
3 4 12
15.053
6 6 19
3 8
4 11
maximize 16x1 + 22x2 + 12x3 + 8x4 +11x5 + 19x6 subject to 5x1 + 7x2 + 4x3 + 3x4 +4x5 + 6x6 14 xj binary for j = 1 to 6
2
44
zi = 43 x1 = 1 3
44 x2 = 1 7
x3 = 0
2
x2 = 1 5 44
x3 = 1 x3 = 0
x2 = 0 6 44
x3 = 1
44
x3 = 1
43
43 9
43 10
43 11
44 12
- 13
44 14 44 16 38 18
15 - 17 -
19 -
The only thing I wanted to focus on was that we fathom a node j of the branch and bound tree whenever zLP(j) zi.
The branch and bound tree is huge. With 100 binary variables, it is of size 2100. To give you a sense for how big that is, the universe has only existed for less than 260 seconds. The only chance for branch and bound to work with 100 binary variables is to fathom nodes that are not far from the root node (that is node 1) of the tree. Improving the quality of an incumbent is very important. But here, we will focus on improving the bound.
We will next show that we can easily improve the bound for the IHTFP game show problem. Moreover, the branch and bound algorithm can possibly terminate after looking only at node 1 of the tree.
Prize Points
iPod 1
5
server 2
7
brass rat
3 4
15.053
6 6
Claim: Nooz can select at most two of prizes 1, 2, 3 and 6. (Check it out). Therefore: we can add the constraint x1 + x2 + x3 + x6 2 to the original IP and it is still a correct IP model. It has the same set of integer solutions as before.
6
We note that the number of points needed for prizes 1, 2, 3 and 6 are such that at most two of the prizes can be selected. Any three of the prizes would use up at least 15 IHTFP points. So, we can add the constraint x1 + x2 + x3 + x6 2. This new constraint does not eliminate any feasible integer solutions, and so we can add it to the integer program. But it does change the LP relaxation of the integer program.
Fact: improving formulations of IPs to get better bounds has been critical to solving larger IPs faster.
7
When we used Excel to find the optimum solution to LP(1), we obtained an objective value of zLP(1) = 43.75. This means that Bound(1) = 43. We will also assume that we somehow discovered the integer solution with objective value 43, and that it was our current incumbent. (There is no guaranteed way of finding such a good solution. But often we can find such good solutions, and the major purpose in branch and bound is to prove that there are no better solutions.) In any case, if Bound(1) = 43, and if zI = 43, we can fathom node 1. At this point, there are no active nodes, and the algorithm terminates. We wont always be so fortunate as to be able to solve integer programs in a single bound, but we often can solve integer programs with a relatively small number of branches.
We say a constraint is valid for an integer program if it is satisfied by all feasible solutions.
The constraint x1 + x2 + x3 + x6 2 was valid.
z How
There are lots of techniques. We will show you Gomory cuts later But it is also very challenging to come up with valid constraints. And we want constraints that lead to improved bounds for the LP relaxation. This is even more challenging.
8
Here we want to emphasize that we found a better bound by adding a valid constraint to the integer program. This is a standard way of getting better bounds. In fact, it is often referred to as getting improved IP formulations, meaning that the LP relaxation gives better bounds.
An illustration of the value of getting an improved LP for use in better bounds. Diamond packing on a Chinese Checkerboard
proposed by Sidney Penner, AMA 1976 Vasek Chvatal 1985 Thanks also to Andreas Schulz
On Page 656 of The American Mathematical Monthly, Vol. 83, No. 8. (Oct., 1976), Sidney Penner from the Bronx Community College, CUNY, proposed the following elementary problem E2612: "How many diamonds can be packed in a Chinese checkerboard? This board consists of 2 order 13 triangular arrays of holes, overlapping in an order 5 hexagon, 121 holes in all. A diamond consists of four marbles that fill four adjacent holes." On Pages 199 and 200 of The American Mathematical Monthly, Vol. 85, No. 3. (Mar., 1978) , a solution by Paul Vojta, a student at the University of Minnesota, was reported. Others had submitted correct solutions as well (including the proposer). The connection to integer programming was established by Vasek Chvl in his paper on "Cutting planes in combinatorics," European J.Combin. 6 (1985), 217-226. In particular, he gives a cutting-plane proof of optimality, and he also exhibits a dual solution.
What is the maximum number of diamonds that can be packed on a Chinese checkerboard.
10
It turns out that it is not too difficult to come up with the best packing. But it is very tricky to prove that it is the best packing.
The diamonds are not permitted to overlap, or even to share a single circle.
11
12
13
z Decision
variables: xd for d D
We will try to use integer programming to come up with the best packing. Hopefully, we will also come up with a proof that it is the best packing. One natural way of expressing the constraints is to say that two overlapping diamonds can both be selected. We shall turn this into an integer programming constraint in two slides.
15
here we point out that there is one variable for each possible diamond, and the total number of diamonds is 264.
d D
xd + xd 1 0 xd 1
This problem is known as the set packing problem. zIP = 27 zLP = 132 The LP opt has xd = 1/2 for each diamond d.
There are many more constraints, but there are fewer than 3000 constraints. Perhaps we could use integer programming branch and bound. But we cant! The LP relaxation can be solved by setting each variable to . This gives an objective value of 132. So, we conclude that no feasible solution to the packing problem has more than 132 diamonds. But this bound is horrible. In fact, if you notice that there are only 121 dots on a Chinese Checkerboard, you would figure out that the maximum number of diamonds is at most 121/4 = 30.25. So, is the linear programming bound so horrible? Its because it is not a very good formulation of the integer program if we care about good bounds.
For each circle, you can select at most one diamond incident to the circle.
16 27 9 11 53 84
10 12
17
Here we come up with an alternative formulations, with one constraint per dot of the Chinese Checkerboard. It is a far better formulation. Here we express the constraint as follows: there is at most one diamond that covers any specified dot of the checkerboard.
d D
d S ( i )
x d {0,1}
27
If we express the integer program with these 121 constraints, we find that zLP(1) = 27.5. Therefore, Bound(1) = 27. Since we have already found a solution that packs 27 diamonds, the Branch and Bound algorithm terminates. So, with the poor (but easily understood and correct) formulation of the integer program, we could never solve the problem using Branch and Bound. The bounds would be so poor that we would have to enumerate most of the tree. But with the improved constraints, and thus an improved IP, Branch and Bound terminated after a single bound. Next we will look at some geometry to get a sense where the valid constraints are coming from and how to construct them.
P x
Example. maximize subject to -x - 10y x, y are in P x, y integer
19
Here P is the yellow region, and the feasible solutions are the black dots in P. The optimal fractional solution is the red dot at the bottom of the feasible region. But the best integer solution is far away.
P x
Any additional constraint that does not eliminate a feasible integer point is called a valid inequality.
20
But the yellow region is not the best feasible region for the IP. In fact, we would like to add constraints that cut off parts of the yellow region without cutting off any feasible integer points. A constraint that does not eliminate any feasible integer point is a valid inequality. (I suppose we could develop valid equalities as well, but techniques always develop valid inequalities.) The best kind of valid inequality is one that eliminates part of the LP feasible region, that is, it cuts off part of the yellow region. We call such a valid inequality a cut. We are using cut here very differently than we did when discussing the max flow algorithm. The two types of cuts have nothing to do with each other.
On adding cuts
y
For a max problem, we want to add cuts to make zLP - zIP smaller.
P x
zLP zIP is reduced when zLP is reduced. In this case, we added a cut, but ZLP did not change.
21
Adding a cut is good because it has a chance of making zLP lower since part of the feasible region is cut off. And a lower value of zLP means a better bound.
P
x
If we solve the linear program over the convex hull of X, we get an integer solution.
22
The best valid inequalities would essentially shrink wrap the feasible region. It would create the smallest feasible region containing all of the integer solutions. We illustrate this in blue-green in the diagram. The name for the smallest convex set containing X is the convex hull of X. Its interesting that every corner point of ConvexHull(X) is a point of X. So, if we were to optimize over the LP relaxation, we would get a corner point (LPs using the simplex algorithm always give corner point solutions), and this would be a point of X. Put another way, optimizing over the Convex Hull of X will also give the optimum solution over X.
P
x
23
This is just a cute animation showing the feasible region of an LP collapsing into the convex hull.
Solve the LP relaxation of an IP If you can find a valid cut that will reduce the LP bound, then do it. Iterate until you have the best bound you can get.
FACTS
z z
Cutting plane approaches dramatically speed up B&B through better bounding. There is a lot of research on how to find cuts that work well in practice.
24
Mental Break
25
Gomory Cuts
We want to solve an integer
program.
But we start by solving the
LP-relaxation of the integer
program.
Basic Premise: have a
technique that generates a
cut automatically.
Developed by Ralph Gomory 1958
26
Ralph Gomory
Actually, Gomory Cuts was designed to be more than a cut generator. It was designed to be in and of itself and IP solver. The idea was to develop cuts one at a time until eventually, the LP obtained an integer optimal solution. It was not designed as part of Branch and Bound. Theoretically, Gomory cuts can be used to solve an integer program, and they are guaranteed to work in finite time. Unfortunately, they solved integer programs very slowly. So, they were largely ignored during the 1970s and 1980s and 1990s. Only recently was it discovered that this same approach was very effective is used with Branch and Bound.
Gomory Cuts
z
Step 1. Solve the linear programming relaxation to optimality Step 2. If the optimum solution to the LP is integer valued, then quit with an optimum solution for the IP. Otherwise, find a constraint in the final tableau in which the basic variable is fractional. Step 3. Use the constraint found in Step 2 to create a valid inequality called a Gomory Cut. The current LP optimum solution is eliminated by the cut. Solve the new LP again using the Dual Simplex Algorithm.
27
The idea of generating cuts automatically is a natural one since we want integer programming solvers to find the optimum solution without lots of human involvement. In order to accomplish this automatic generation of cuts, we start from the final tableau of the LP relaxation. If the optimal solution to an LP relaxation is integer valued, then it is optimal for the Integer program, and we are done. Otherwise, we can take a constraint of the final tableau, create a Gomory cut, add the cut to the current LP relaxation, and get a new and improved LP relaxation. We solve the new relaxation using the dual simplex method since this method can create a great starting point by using the optimal tableau for the previous LP relaxation.
x 0, y 0 It follows that
.6x .8 why?
The fractional part of 1.6x y is .8. Same as the fractional part of .6x Also, .6x fractional part of .6x
We will soon show how to take an equality constraint from the final tableau and create a Gomory cut. The approach relies on some elementary properties of fractions and fractional parts. First note how fractional parts are defined by looking at the right part of the slide. It is always a real number that is at least 0 and less than 1. Example one shows how to obtain a valid inequality from an equality constraint. If we know that 1.6 x y = 1.8 and both x and y are non-negative, then it follows directly that .6x .8 (There are other constraints that are also implied, but this particular constraint is easily derived and easily explained.) To obtain the constraint, all one has to do is focus on fractions. Somehow, we need the fractional part of 1.6 x y to be .8. But the fractional part of 1.6x y is the fractional part of .6 x. Does this mean that .6x = .8? No, it is possible that .6x = 1.8 for example. Rather, we know that .6x is .8 plus an integer. So, it immediately follows that .6x .8 .
.3 x + .4 y .9 why?
Fractional part of 2.3 x - .6 y is the same as the fractional part of .3 x + .4 y. This equals the fractional part of 3.9, which is .9 .3 x + .4 y FractionalPart( .3 x + .4 y) = .9 e.g., x = 3, y = 5 .3 x + .4 y = 2.9
29
On this slide, we consider a more general equality, with two components with
fractional values.
As before, we know that the fractional part of 2.3 x - .6 y is .9.
This means that the fractional part of .3 x + .4 y is .9
And as before, it means that .3x + .4y = .9 plus an integer.
So, we conclude that .3x + .4y .9.
It may seem that we can come up with an even better inequality. Perhaps. But the
inequality .3x + .4y is just fine for our purposes.
1. Replace each coefficient by its fractional part, 0 FractionalPart < 1 2. Replace the RHS by its fractional part 3. Replace the equality by a .3 x + .4 y .9
30
We now formalize the approach for developing an inequality from an equality constraint. This approach works whenever the RHS is non integer. It is the approach that was used by Gomory to develop his cuts.
Final Tableau
z 1 0 0 0 Gold 0 0 0 1 Silver 2 1/8 5/8 3/8 Bronze 0 0 1 0 s1 0 1 0 0 s2 12 -5 3/4 1 1/4 - 1/4 s3 4 3/8 - 1/8 1/8 RHS 1160 2 1/2 12 1/2 17 1/2
31
We now illustrate finding Gomory cuts on an integer program. We return to Zors problem. Actually, the original problem discussed in the duality lecture had an integer optimum solution. So, we modified the RHS a little so that the optimum solution to the LP relaxation would be fractional.
Finding a cut.
z 1 0 0 0 Gold 0 0 0 1 Silver 2 1/8 5/8 3/8 Bronze 0 0 1 0 s1 0 1 0 0 s2 12 -5 3/4 1 1/4 - 1/4 s3 4 3/8 - 1/8 1/8 RHS 1160 2 1/2 12 1/2 17 1/2
We assume here that we Zors problem is an IP and we have solved the LP relaxation and obtained the optimum tableau. Select any constraint from the LP final tableau that has a fractional RHS. Use this to create a cut.
32
There are three constraints involving the basic variables as well as the z-row. We can use the z-row for cuts as well if the RHS is non-integer and if z is required to be integer valued or if all variables are required to be integer and all cost coefficients are integer. So, we could create three different Gomory cuts. We will look at the first constraint only and create a Gomory cut.
1/8 x2 + s1 5 s2 + 3/8 s3 = 2 .
Replace all coefficients by fractional parts. Replace the equality by a 1/8 x2 + s2 + 3/8 s3
33
We carry out the rule defined just a few slides ago, and we derive the constraint 1/8 x2 + s2 + 3/8 s3 , which is a Gomory cut.
z 1 0 0 0 z 1 0 0 0 0 Gold 0 0 0 1 Gold 0 0 0 1 0 Silver 2 1/8 5/8 3/8 Silver 2 1/8 5/8 3/8 1/8 Bronze 0 0 1 0 Bronze 0 0 1 0 0 s1 0 1 0 0 s1 0 1 0 0 0 s2 12 -5 3/4 1 1/4 - 1/4 s2 12 -5 3/4 1 1/4 - 1/4 1/4 s3 4 3/8 - 1/8 1/8 3/8 s3 4 3/8 - 1/8 1/8 RHS 1160 2 1/2 12 1/2 17 1/2 s4 0 0 0 0 -1 RHS 1160 2 12 17
34
Once a Gomory cut is created, it is added to the previous LP relaxation creating an improved LP relaxation. Since the Gomory cut is an inequality constraint, we also need to add a surplus variable s4 in order to create a basic solution. Here we create a basic solution with variables x1, x3, s1, and s4. The basic solution is dual feasible, and so one can use the Dual Simplex Algorithm to find an optimal feasible solution.
z 1 0 0 0 0 Gold Silver Bronze 0 0 0 1 0 1 1/2 0 2/3 1/3 1/3 0 0 1 0 0 s1 0 1 0 0 0 s2 11 -6 1 1/3 - 1/3 2/3 s3 2.5 0 0 0 1 s4 4 1 - 1/3 1/3 -2 2/3 RHS 1158 2 12 2/3 17 1/3 1 1/3
Note. The LP bound for this tableau is better (lower) than that for the last tableau. There are three fractional constraints that we can use to create the next Gomory cut. (Generating several at a time is a good approach.) 35
With only one additional pivot, we have found an optimal solution for this new LP relaxation. Moreover, the objective value has decreased from 1160 to 1158, and thus the upper bound is better. (It is closer to the true integer solution.) Unfortunately, we are still not optimal since we do not have an integer solution. There are three constraints with fractional right hand sides. So, we can create three new Gomory Cuts if we wish.
z 0 0 Gold Silver Bronze 0 1 2/3 1/3 1 0 s1 0 0 s2 1 1/3 - 1/3 s3 0 0 s4 - 1/3 1/3 RHS 12 2/3 17 1/3
36
On Gomory Cuts
Gomory cuts is a very nice way of generating cuts for improving bounds in B&B
z z
easy to automate the current optimum LP solution is cut off by the Gomory cut One can solve the IP by just adding Gomory cuts, but this is a very slow procedure.
37
As mentioned earlier, Gomory cuts can be a great way of improving an LP relaxation. But it is not a great way to solve an LP in and of itself. It really should be used as part of a Branch and Bound procedure to be effective.
For many combinatorial problems there are special purpose cuts that yield better bounds.
Knapsack 053 chocolates (covering problems) Traveling Salesman Problem many more
38
We wont discuss it here, but researchers have developed lots of methods of finding cuts for specific problems. So, there are special routines that can find cuts for knapsack problems. And there are special routines for finding cuts for the traveling salesman problem. These techniques are useful, but there is not time to develop them in this lecture.
This doesnt really have anything to do with cuts, but its cool.
39
This really has nothing to do with cuts. What we will show soon is how to visualize
a solution to the dual problem of Diamond Packing so that one can see why there is
at most 27.5 diamonds that can be packed.
The dual problem assigns dual variables to constraints.
Each constraint corresponds to a circle of the Chinese Checkerboard.
So, the dual problem assigns a dual variable (or weight) to each circle.
There is a constraint in the dual for each variable of the primal problem, and thus
for each diamond.
The dual constraint says that the weight of the circles that a diamond covers is at
least 1.
Example, assign all circles a weight of . Each diamond d has weight w(d) 1.
w (d ) j w j
j
w j = 121/ 4 = 30.25
41
Here we develop a feasible solution to the dual problem. Assign each circle a weight of . Then each diamond has a weight of exactly 1. Since there are 121 circles, the objective for the dual problem is 30.25, which is the weight of the circles. So, no solution has more than 30.25 diamonds. Incidentally, one naturally sees the bound of 30.25 by recognizing that each diamond includes 4 circles, and thus the number of diamonds is at most the number of circles divided by 4.
Number of Diamonds
w (d ) j w j
w j = 43 / 4 + 18 = 28.75
42
But one can develop even better bounds. Here we have three types of weights. There are the small black circles with a weight of 0, the blue inner circles with a weight of , and the large red circles with a weight of 1. You can see that the weight of the circles covered by any diamond is at least 1. The total weight of the circles is 28.75 and thus there are at most 28 diamonds that can be packed. But we can do better.
w j = 27.5
43
In this example, every diamond has a weight of at least 1. And the sum of the weights is 27.5. Thus there are at most 27 diamonds that can be packed.
44
z z
45
What makes a really good integer programming formulation? Assuming that one is going to use Branch and Bound, we want a formulation such that the LP relaxation gives low bounds (assuming a maximization problem). A good IP formulation leads to an improved solution time. As for Integer Programming, its incredibly useful in practice because of its ability to model logical constraints, nonlinearities, as well as natural situations in which solutions need to be integer valued. Its not as easy to model, and its much harder to solve. But its worth the effort when it can be solved.
Cutting planes
clever way of improving bounding active area for research, theoretical and applied
46