1 / 11

Cutting Planes II

Cutting Planes II. The Knapsack Problem. Recall the knapsack problem: n items to be packed in a knapsack (can take multiple copies of the same item). The knapsack can hold up to W lb of items. Each item has weight w i lb and benefit b i . Goal: Pack the knapsack such that

Télécharger la présentation

Cutting Planes II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cutting Planes II

  2. The Knapsack Problem Recall the knapsack problem: • n items to be packed in a knapsack (can take multiple copies of the same item). • The knapsack can hold up to W lb of items. • Each item has weight wilb and benefit bi . • Goal: Pack the knapsack such that the total benefit is maximized.

  3. IP model for Knapsack problem • Define decision variables (i = 1, …, n): xi = number of copies of item i to take • Then the total benefit: the total weight: • Summarizing, the IP model is: max s.t. xi ≥ 0integer (i = 1, …, n)

  4. Cutting Planes for Knapsack Problem • Example: Knapsack size is W=50. • Size constraint for this example: 21x1+11x2+51x3+26x4+30x5 50. • IP optimum: (1, 0, 0, 1, 0) with value 87 . LP-relax. optimum: (0, 0, 50/51, 0, 0) with value 490.2 . LP solution is too far from IP solution. • How to cut the fractional optimal solution? Add the following constraint (cutting plane): x3 = 0 . Cuts off the old LP optimum: (0, 0, 50/51, 0, 0) with value 490.2 . The new LP-relax. optimum: (0, 0, 0, 50/26, 0) with value 96.2 .

  5. Cutting Planes for Knapsack Problem • More cutting planes? Add constraint x4 1 . Cuts off the old LP optimum: (0, 0, 0, 50/26, 0) with value 96.2 . The new LP-relax. optimum: (24/21, 0, 0, 1, 0) with value 92.3 . • Generally, for item i we can add the following cutting plane: xi W / wi . • E.g., x1  2 . Note, however, that this constraint doesn’t cut the LP-optimum: (24/21, 0, 0, 1, 0) . Can we add better (tighter) cutting planes? • Cutting planes can include more than one variable. E.g., the following constraint is a valid cutting plane: x1 + x4 2 . (Note that this constraint is tighter than x1  2 ). Cuts off the old LP optimum: (24/21, 0, 0, 1, 0) with value 92.3 . The new LP-relax. optimum: (1, 0, 0, 1, 1/10) with value 91.1 .

  6. Cutting Planes for Knapsack Problem • General form of cutting planes with more than one variable. Let k≥1 and S={ i | wi > W / k } . Then we have the following cutting plane: • Take k=3 in our example. Then S= { i | wi > W / 3 } = {1, 3, 4, 5} . Thus, we have the following cutting plane: x1 + x3 + x4 + x5 2 . (Note that this constraint is tighter than x1 + x4 2 ). Cuts off the old LP optimum: (1, 0, 0, 1, 1/10) with value 91.1 . The new LP-relax. optimum: (1, 3/11, 0, 1, 0) with value 90.3 .

  7. Pairing Problem • 2n students • n projects; each project needs two students • Value of pairing students i and j is value[i , j] • Goal: Pair up the students to work on the projects so that the total value is maximized. • Example: 4 students, 2 projects, value matrix: Possible solutions: (A, B), (C, D) with value 9 (A, C), (B, D) with value 17 (A, D), (B, C) with value 2 Optimal solution: (A, C), (B, D)

  8. IP Formulation for the Pairing Problem • Define the following variables. For any i1,…,2n and j1,…,2n (ij), • The goal is to maximize the total value: Maximize 0.5 * sum{i1,…,2n, j1,…,2n : ij}value[i,j]*x[i,j] • Need the following constraints. Symmetry constraints: x[i,j]= x[j,i] for each i1,…,2n, j1,…,2n (ij) Each student works with exactly one other student: sum{j1,…,2n : ij}x[i,j] = 1 for each i1,…,2n • Q: How good (tight) is this formulation?

  9. Solving the LP-relaxation • Consider the following example: There are multiple optimal IP solutions with value 21 The optimal solution to the LP-relaxation: x[A,B] = x[B,A] = x[A,C] = x[C,A] = x[B,C] = x[C,B] = .5 ; x[D,E] = x[E,D] = x[D,F] = x[F,D] = x[E,F] = x[F,E] = .5 ; all other variables have value 0 . Optimal LP value: 6*0.5*10 = 30 B D .5 .5 A .5 E .5 .5 .5 C F

  10. Cutting Planes for the Pairing Problem • Add the following cutting plane: sum{ i  S, j  S } x[i, j] ≥ 1 for S = {A, B, C} Cuts off the old LP optimum with value 30. The new LP-relaxation has multiple optimal solutions with value 21. • General form: For any set S  {1,…,2n} that has an odd number of elements sum{ i  S, j  S } x[i, j] ≥ 1 is a cutting plane. • Note that the number of this kind of cutting planes is exponential (order of 2n); so can’t add all of them in the IP formulation. Thus, this kind of cutting planes should be added only if necessary (to cut off a fractional solution of the current LP relaxation).

  11. Branch-and-cut algorithms • Integer programs are rarely solved based solely on cutting plane method. • More often cutting planes and branch-and-bound are combined to provide a powerful algorithmic approach for solving integer programs. • Cutting planes are added to the subproblems created in branch-and-bound to achieve tighter bounds and thus to accelerate the solution process. • This kind of methods are known as branch-and-cut algorithms.

More Related