Presentation is loading. Please wait.

Presentation is loading. Please wait.

Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.

Similar presentations


Presentation on theme: "Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have."โ€” Presentation transcript:

1 Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have to be integral: max ๐‘ โŠค ๐‘ฅ s.t. ๐ด๐‘ฅโ‰ค๐‘ ๐‘ฅโ‰ฅ0 ๐‘ฅโˆˆ โ„ค ๐‘› Very useful new possibility: We can now model Boolean variables. This makes ILPs much more powerful than LPs for modelling purposes! Unfortunately it also makes them a lot harder to solve computationally!

2 Integer Linear Program in standard form
P: max ๐‘ โŠค ๐‘ฅ s.t. ๐ด๐‘ฅโ‰ค๐‘ ๐‘ฅโ‰ฅ0 ๐‘ฅโˆˆ โ„ค ๐‘› where ๐ดโˆˆ โ„ ๐‘šร—๐‘› , ๐‘โˆˆ โ„ ๐‘š ,cโˆˆ โ„ ๐‘› .

3 Bounded Integer Linear Program
P: max ๐‘ โŠค ๐‘ฅ s.t. ๐ด๐‘ฅโ‰ค๐‘ ๐‘™ ๐‘– โ‰ค๐‘ฅ ๐‘– โ‰ค ๐‘ข ๐‘– ๐‘ฅโˆˆ โ„ค ๐‘› Where ๐ดโˆˆ โ„ ๐‘šร—๐‘› , ๐‘โˆˆ โ„ ๐‘š ,cโˆˆ โ„ ๐‘› and ๐‘™ ๐‘– < ๐‘ข ๐‘– , ๐‘™ ๐‘– , ๐‘ข ๐‘– โˆˆโ„ค.

4 Branch and Bound Solve P* (using e.g. Simplex algorithm)
If P* is infeasible, then P is infeasible (return (๐ง๐ฎ๐ฅ๐ฅ,โˆ’โˆž)). Otherwise let ( ๐‘ฅ โˆ— , ๐œ† โˆ— ) be optimal solution to P*. If ๐‘ฅ โˆ— is integer, return ( ๐‘ฅ โˆ— , ๐œ† โˆ— ) . If ๐œ† โˆ— โ‰คcurrentbest (bound), then return from branch with no solution (return (๐ง๐ฎ๐ฅ๐ฅ,โˆ’โˆž)). Otherwise, pick ๐‘– such that ๐‘ฅ ๐‘– โˆ— โˆ‰โ„ค. Recursively solve (branch) (P*[ ๐‘ข ๐‘– โ‰” ๐‘ฅ ๐‘– โˆ— ], currentbest) to get ( ๐‘ฅ ๐‘™ , ๐œ† ๐‘™ ). If ๐œ† ๐‘™ >currentbest, update currentbestโ‰” ๐œ† ๐‘Ÿ Recursively solve (branch) (P*[ ๐‘™ ๐‘– โ‰” ๐‘ฅ ๐‘– โˆ— ], currentbest) to get ( ๐‘ฅ ๐‘Ÿ , ๐œ† ๐‘Ÿ ). If ๐œ† ๐‘™ > ๐œ† ๐‘Ÿ , return ( ๐‘ฅ ๐‘™ , ๐œ† ๐‘™ ), otherwise return ( ๐‘ฅ ๐‘Ÿ , ๐œ† ๐‘Ÿ ).

5 Termination If ๐‘ข ๐‘– = ๐‘™ ๐‘– for all ๐‘– we terminate immediately.
If we do not terminate, then in each recursive call, either one ๐‘™ ๐‘– increased or one ๐‘ข ๐‘– has decreased. Since ๐‘™ ๐‘– and ๐‘ข ๐‘– are integers, we terminate.

6 Complexity Unit of time = number of leaves in the recursion tree.
We can show by induction: ๐‘‡โ‰ค ๐‘– ๐‘› ๐‘ข ๐‘– โˆ’ ๐‘™ ๐‘– +1 . In practice, it can be hoped that many subcalls finish early. However, all known algorithms for solving integer linear programs are worst case exponential time. In contrast to the case of the Simplex algorithm, the worst case is no longer exceptional!

7 Non-depth first Branch and Bound
Instead of letting the recursion stack represent the branch and bound tree, we can make it an explicit data structure This allows us to do best first search: Choose to expand the subproblem with the lowest relaxed solution value. Hope: This also contains very good valid solutions which will allow the currentbest value to decrease significantly.

8 Branch and Bound activeset := root currentbest := โˆž;
โ€‹while activeset is not empty do choose a branching node, node ๐‘˜โˆˆ activeset remove node ๐‘˜ from activeset; generate the subproblems of node ๐‘˜, ๐‘–=1,โ€ฆ, ๐‘› ๐‘˜ and the corresponding relaxed optimal values ๐œ† 1 ,โ€ฆ, ๐œ† ๐‘› ๐‘˜ . โ€‹for ๐‘–=1,โ€ฆ, ๐‘› ๐‘˜ do โ€‹if ๐‘ง ๐‘– โ‰ฅ currentbest then kill child ๐‘– โ€‹else if optimal relaxed solution of child ๐‘– is integral then currentbest := ๐œ† ๐‘– โ€‹else add child ๐‘– to activeset

9 Branch and Bound in a general context
Ingredients needed: Relaxation method. Expands space of feasible solution. Relaxed instance must be efficiently solvable. Search space division. The optimal solution of the relaxed problem can not be feasible in any of the relaxed subproblems (it should be โ€œkilledโ€) Any non-relaxed feasible solution should be feasible in one of the subproblems.

10 Traveling Salesman Problem (Section 23.2)
Input: Cost (distance) matrix ๐ถ=( ๐‘ ๐‘–๐‘— ), ๐‘–,๐‘—=1,โ€ฆ,๐‘› Output: Permutation ๐œ‹ on {0,1,โ€ฆ,๐‘›โˆ’1} minimizing ๐‘–=1 ๐‘› ๐‘ ๐œ‹(๐‘–),(๐œ‹ ๐‘–+1 mod ๐‘›) .

11

12 State of the art for TSP TSP instances of thousand of cities can be consistently solved to optimality. Instances of up to cities have been solved: All cities in Sweden! Technique: Branch-and-Bound combined with cutting plane algorithms: Branch-and-cut.

13

14 Valid inequality for an ILP
Given integer linear program, a new inequality is called valid if it does not change the set of integer solutions to the program. It is a cutting plane if it removes the (non-integer) optimum solution to the relaxed linear program.

15 Cutting plane algorithm for ILP
input ILP instance P Pโ€™ := LP-relaxation of P while(optimal solution to Pโ€™ is not integer) { add valid cutting plane to P Pโ€™ := LP-relaxation of P } return optimal solution to Pโ€™ How to find valid cutting plane?

16 Gomory Cutting Plane Algorithm
Assume that all initial coefficients in (standard form) ILP instance are integer. Solve LP-instance using simplex method. Suppose the simplex method terminates with a non-integer optimal solution.

17 Suppose some line in final dictionary reads
๐‘ฅ ๐‘– = ๐‘ ๐‘– + ๐‘— ๐‘Ž ๐‘— ๐‘ฅ ๐‘— where ๐‘ ๐‘– is not integer. Let ๐‘ ๐‘– โ€ฒ = ๐‘ ๐‘– โˆ’ ๐‘ ๐‘– and ๐‘Ž ๐‘— โ€ฒ = ๐‘Ž ๐‘— โˆ’ ๐‘Ž ๐‘— . Then ๐‘ฅ ๐‘– โˆ’ ๐‘ ๐‘– โˆ’ ๐‘— ๐‘Ž ๐‘— ๐‘ฅ ๐‘— = ๐‘ ๐‘– โ€ฒ + ๐‘— ๐‘Ž ๐‘— โ€ฒ ๐‘ฅ ๐‘— For every feasible integer solution: Left hand side is integer. Right hand side is strictly bigger than zero. Thus ๐‘ฅ ๐‘– โˆ’ ๐‘ ๐‘– โˆ’ ๐‘— ๐‘Ž ๐‘— ๐‘ฅ ๐‘— โ‰ฅ1 is a valid cutting plane.

18 Gomory Cutting Plane Algorithm
Partial correctness is obvious. Termination is not guaranteed. Can be guaranteed if simplex algorithm uses special pivot rule and line of final dictionary is chosen carefully (non-trivial!) Not very practical by itself, but is component of state-of-the-art solvers.

19 Cutting planes for TSP (and other problems)
Use ILP formulation of TSP. Use specially tailored cutting planes.

20 Traveling Salesman Problem - ILP formulation
Decision variables: ๐‘ฅ ๐‘–๐‘— โˆˆ 0,1 , ๐‘–,๐‘—=1,โ€ฆ,๐‘› ๐‘ก ๐‘— โˆˆ{0,1,โ€ฆ,๐‘›โˆ’1}, j=0,โ€ฆ,๐‘› Interpretation: ๐‘ฅ ๐‘–๐‘— =1 if and only if for some ๐‘˜ it holds ๐œ‹ ๐‘˜ =๐‘– and ๐œ‹( ๐‘˜+1 mod ๐‘›)=j ๐‘ก ๐‘— =๐‘– if and only if ๐œ‹(๐‘–)=๐‘—

21 Traveling Salesman Problem - ILP formulation
min ๐‘–,๐‘—=1 ๐‘› ๐‘ ๐‘–๐‘— ๐‘ฅ ๐‘–๐‘— s.t. ๐‘—=1 ๐‘› ๐‘ฅ ๐‘–๐‘— =1 , for ๐‘–=1,โ€ฆ,๐‘š ๐‘–=1 ๐‘› ๐‘ฅ ๐‘–๐‘— =1 , for ๐‘—=1,โ€ฆ,๐‘š ๐‘ก ๐‘— โ‰ฅ ๐‘ก ๐‘– +1โˆ’๐‘› 1โˆ’ ๐‘ฅ ๐‘–๐‘— , for ๐‘–โ‰ฅ0, ๐‘—โ‰ฅ1,๐‘–โ‰ ๐‘—

22 Symmetric TSP Distance from i to j is equal to distance from j to i.
Let ๐‘ฆ ๐‘–๐‘— = ๐‘ฅ ๐‘–๐‘— + ๐‘ฅ ๐‘—๐‘– Consider a cut (๐‘†,๐‘‡), ๐‘†โˆฉ๐‘‡=โˆ…, ๐‘†โˆช๐‘‡={1,โ€ฆ,๐‘›} The TSP tour has to cross the cut ๐‘†,๐‘‡ at least twice! ๐‘–โˆˆ๐‘† ๐‘—โˆˆ๐‘‡ ๐‘ฆ ๐‘–๐‘— โ‰ฅ2 is a valid inequality.

23 Cutting plane algorithm for TSP
Find optimal solution ๐‘ฅ โˆ— of relaxaton ๐‘ƒ โˆ— . Let ๐‘ฆ ๐‘–๐‘— = ๐‘ฅ ๐‘–๐‘— + ๐‘ฅ ๐‘—๐‘– Check if some ๐‘†,๐‘‡ has ๐‘–โˆˆ๐‘†, ๐‘—โˆˆ๐‘‡ ๐‘ฆ ๐‘–๐‘— <2 . (this can be efficiently checked by Max Flow algorithm using the max-flow min-cut theorem). Add inequality ๐‘–โˆˆ๐‘†, ๐‘—โˆˆ๐‘‡ ๐‘ฆ ๐‘–๐‘— โ‰ฅ2 .

24 Cutting plane algorithm for TSP
At some point we will fail to find new cuts. Still may not have integer solution. If not, add other kinds of specially tailored inequalities (big literature) or BRANCH.

25 Branch-and-cut for TSP
Branch-and-bound with relaxation being LP- relaxation + some set of valid inequalities. When to stop adding inequalities and start branching is a matter of heuristics and experiments. Yields state-of-the art solver. Many non-trivial implementation issues.


Download ppt "Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have."

Similar presentations


Ads by Google