Download presentation
Presentation is loading. Please wait.
1
Solving Integer Programs
2
Natural solution ideas that don’t work well Solution idea #1: Explicit enumeration: Try all possible solutions and pick the best one. Example: max 3x 1 + 2x 2 + 4x 3 s. t. x 1 + x 2 + x 3 ≥ 1 x 1 + 2x 2 + x 3 2 x 1 + x 2 - 2x 3 ≥ 0 x 1, x 2, x 3 binary Checking for all possible solutions: x111110000x111110000 x211001100x211001100 x310101010x310101010 feasiblenononoyesnoyesnono value32 Select the best solution among the feasible ones: x 1 =1 x 2 = 0 x 3 = 0 with value 3
3
Natural solution ideas that don’t work well Number of possible solutions in the example is 2 3 = 8. Generally, if we have n binary variables, then the number of possible solutions is 2 n. We have exponential growth of number of solutions which makes the algorithm very slow for large n. This method might work only when the number of binary variables is small in a mixed integer program. In general, more sophisticated algorithms are needed: Structure the enumeration procedure so that only a small fraction of the possible solutions need to be examined. n=10n=30n=50n=100 2n2n 10 3 10 9 10 15 10 30
4
Natural solution ideas that don’t work well Solution idea #2: Solve the corresponding LP and round the solution. For every IP (or MIP) there is a corresponding linear program which is obtained by dropping the integrality constraints on the variables. That linear program is called LP-relaxation of the original IP (MIP). E.g., for the following IP: maxx 2 (IP) s.t.-2x 1 +2x 2 1 2x 1 +2x 2 7 x 1, x 2 ≥ 0 integer the LP-relaxation is: maxx 2 (LP) s.t.-2x 1 +2x 2 1 2x 1 +2x 2 7 x 1, x 2 ≥ 0
5
Natural solution ideas that don’t work well There are efficient algorithms (e.g., Simplex method) to solve LPs. So a natural algorithm for solving an IP is (i) solve the LP-relaxation; (ii) round its solution to get an integral solution for the original IP. Let’s see how it works on our example. maxx 2 s.t.-2x 1 +2x 2 1 2x 1 +2x 2 7 x 1, x 2 ≥ 0 Optimal solution is (1.5, 2) Rounded solutions are (1, 2) and (2, 2) ; but both are infeasible -2x 1 +2x 2 = 12x 1 +2x 2 = 7 Z=2
6
Natural solution ideas that don’t work well Consider another example. Integer ProgramLP relaxation max x 1 + 5x 2 s.t.x 1 +10x 2 20 x 1 2x 1 2 x 1, x 2 ≥ 0 integer x 1, x 2 ≥ 0 Solution to LP-relaxation: (2, 1.8) Rounded IP solution: (2, 1) with value 7 IP optimal solution: (0, 2) with value 10 Conclusion: Rounded solution too far from optimal solution x 1 +10x 2 = 20 x 1 = 2 Z=11
7
Natural solution ideas that don’t work well Summarizing, Solution idea #2 has the following two pitfalls: 1)The rounded solution might be infeasible. 2)The rounded solution might be too far from optimal solution. Solution idea #2 works well for a class of problems which have the following property: All CPF solutions of LP-relaxation are integral. For this class of problems, the optimal solution of LP-relaxation is also optimal solution for the original IP. Generally, we need more sophisticated algorithms to solve IPs (still using the idea of LP-relaxation).
8
LP-relaxation-based solution methods for Integer Programs Branch-and-Bound Technique (next handout) Cutting Plane Algorithms
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.