200 likes | 421 Views
The course so far. Worst case exponential time. Mixed Integer Linear Programming. …. TSP. …. Worst case polynomial time by Local Search. Linear Programming. Min Cost Flow. = reduction. Max Flow. Maximum matching. Shortest paths. Two topics of today.
E N D
The course so far Worst case exponential time. Mixed Integer Linear Programming … TSP … Worst case polynomial time by Local Search Linear Programming Min Cost Flow = reduction Max Flow Maximum matching Shortest paths
Two topics of today • Worst case polynomial time algorithms for LP. • State of the art for solving TSP (uses ILP, is practical, but runs in worst case exponential time)
State of the art for TSP • TSP instances of thousand of cities can be consistently solved to optimality. • Instances of up to 25000 cities have been solved: All cities in Sweden! • Technique: Branch-and-Bound combined with cutting plane algorithms: Branch-and-cut.
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.
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?
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.
Some line in final dictionary reads xi = bi+ jaj xj where biis not integer. Let b’i= bi- bbic and a’j= aj - bajc. xi- bbic - jbajcxj= b’i + j aj’ xj For every feasible integer solution: Left hand side is integer. Right hand side is strictly bigger than zero. xi- bbic - jbajcxj¸ 1 is a valid cut.
Gomory Cutting Plane Algorithm For ILP • 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.
Cutting planes for TSP (and other problems) • Use ILP formulation of TSP. • Use specially tailored cutting planes.
Symmetric TSP • Distance from i to j is equal to distance from j to i. • Let yij= xij+ xji
T S The TSP tour has to pass every cut at least twice. i 2 S, j2T yij¸ 2 is a valid inequality.
Cutting plane algorithm for TSP • Find optimal solution x* of LP-relaxation of • Let y*ij = x*ij + x*ji • Check if some S,T has i2S, j2Tyij< 2. • This can be efficiently done by Max flow algorithm. • Add inequality i 2S, j2Tyij¸ 2.
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.
Branch-and-cut for TSP • Branch-and-bound with relaxation being LP-relaxation + 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.
The course so far Worst case exponential time. Mixed Integer Linear Programming … TSP … ? Worst case polynomial time by Local Search Linear Programming Min Cost Flow = reduction Max Flow Maximum matching Shortest paths
NP-completeness (dSoegOpt) Mixed Integer Linear Programming … TSP Worst case exponential time (unless P=NP) Worst case polynomial time by Local Search Linear Programming Min Cost Flow = reduction Max Flow Maximum matching Shortest paths