Download presentation
Presentation is loading. Please wait.
Published byStephen Malone Modified over 6 years ago
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 ๐) .
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.
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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.