程序代写代做代考 34198l20ndp.dvi

34198l20ndp.dvi

Solving Integer Programming with Branch-and-Bound Technique

This is the divide and conquer method. We divide a large problem into a few smaller ones. (This is the
“branch” part.) The conquering part is done by estimate how good a solution we can get for each smaller
problems (to do this, we may have to divide the problem further, until we get a problem that we can handle),
that is the “bound” part.
We will use the linear programming relaxation to estimate the optimal solution of an integer programming.

* For an integer programming model P , the linear programming model we get by dropping the require-
ment that all variables must be integers is called the linear programming relaxation of P .

The steps are:

• Divide a problem into subproblems
• Calculate the LP relaxation of a subproblem

— The LP problem has no feasible solution, done;

— The LP problem has an integer optimal solution; done. Compare the optimal solution with the
best solution we know (the incumbent).

— The LP problem has an optimal solution that is worse than the incumbent, done.

In all the cases above, we know all we need to know about that subproblem. We say that subproblem
is fathomed.

— The LP problem has an optimal solution that are not all integer, better than the incumbent. In
this case we would have to divide this subproblem further and repeat.

Example 1
Max Z = −x1 + 4×2

Subject to

−10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

x1 ≤ 5

xi ≥ 0, xi’s are integers

-1

0

1

2

3

4

-1 1 2 3 4 5 6

(3.8,3)

1

For the LP relaxation
MaxZ = −x1 + 4×2

s. t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

x1 ≤ 5
xi ≥ 0

Optimal solution of the relaxation is (3.8, 3) with z = 8.2. Then we consider two cases: x1 ≥ 4 and x1 ≤ 3.
−10×1 + 20×2 = 22

6543210-1

4

3

2

1

0

-1

31 =x 41 =x

The linear programming relaxation
Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

x1 ≤ 5
x1 ≥ 4
x2 ≥ 0

has optimal solution at (4, 2.9) with Z = 7.6.

6543210-1

4

3

2

1

0

-1

(4, 2.9)

2

The linear programming relaxation
Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

4 ≤ x1 ≤ 5
x2 ≥ 3

has no feasible solution (5×1 + 10×2 ≥ 50) so the IP has no feasible solution either.
The linear programming relaxation

Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

4 ≤ x1 ≤ 5
0 ≤ x2 ≤ 2

has an optimal solution at (4, 2) with Z = 4. This is the optimal solution of the IP as well. Currently, the
best value of Z for the original IP is Z = 4.

6543210-1

4

3

2

1

0

-1

(4,2)

Now we consider the branch of 0 ≤ x1 ≤ 3. The LP relaxation

Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

x1 ≤ 3
0 ≤ xi

3

has an optimal solution at (3, 2.6) with Z = 7.4. We branch out further to two cases: x2 ≤ 2 and x2 ≥ 3.

6543210-1

4

3

2

1

0

-1

(3, 2.6)

4=Z

The LP relaxation
Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

x1 ≤ 3
x2 ≥ 3

has no feasible solution (−10×1 + 20×2 ≥ 30). The IP has no solution either. The LP relaxation
Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

0 ≤ x1 ≤ 3
0 ≤ x2 ≤ 2

has an optimal at (1.8, 2) with Z = 6.2.

6543210-1

4

3

2

1

0

-1

(1.8, 2) 4=Z

4

We branch further with two cases: x1 ≥ 2 or x1 ≤ 1 (we still have 0 ≤ x2 ≤ 2).

6543210-1

4

3

2

1

0

-1

4=Z

The LP relaxation
Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

2 ≤ x1 ≤ 3
0 ≤ x2 ≤ 2

has an optimal at (2, 2), with Z = 6. Since this is better than the incumbent Z = 4 at (4, 2), this new integer
solution is our current best solution.

6543210-1

4

3

2

1

0

-1

(2,2)

6=Z

The LP relaxation
Max Z = −x1 + 4×2

s.t. − 10×1 + 20×2 ≤ 22
5×1 + 10×2 ≤ 49

0 ≤ x1 ≤ 1
0 ≤ x2 ≤ 2

5

has an optimal at (1, 1.6) with Z = 5.4. Then any integer solution in this region can not give us a solution
with the value of Z greater than 5.4. This branch is fathomed.

6543210-1

4

3

2

1

0

-1

(1, 1.6)
4.5=Z

6=Z

Example 2 Consider the following BIP problem:

Max Z = 9×1 + 5×2 + 6×3 + 4×4

s.t. 6×1 + 3×2 + 5×3 + 2×4 ≤ 10
x3 + x4 ≤ 1
−x1 + x3 ≤ 0
−x2 + x4 ≤ 0

xi are binary

The optimal solution of the LP relaxation

Max Z = 9×1 + 5×2 + 6×3 + 4×4

s.t. 6×1 + 3×2 + 5×3 + 2×4 ≤ 10
x3 + x4 ≤ 1
−x1 + x3 ≤ 0
−x2 + x4 ≤ 0

xi ≤ 1 for 1 ≤ i ≤ 4
xi ≥ 0

has optimal solution at (5/6, 1, 0, 1) with Z = 16.5.
Branch 1: x1 = 0 or x1 = 1.
1. x1 = 0. The problem becomes

Max Z = 5×2 + 4×4

Subject to

3×2 + 2×4 ≤ 10
−x2 + x4 ≤ 0
xi are binary

6

The optimal solution of the LP relaxation is at (1, 1) with Z = 9. (Current best solution.)
2. x1 = 1. The LP relaxation

Max Z = 9 + 5×2 + 6×3 + 4×4

s.t. 3×2 + 5×3 + 2×4 ≤ 4
x3 + x4 ≤ 1

x3 ≤ 1
−x2 + x4 ≤ 0

xi ≤ 1 for 2 ≤ i ≤ 4
xi ≥ 0

has optimal solution at (1, 0.8, 0, 0.8) with Z = 16.2.
Branch: x2 = 0 or x2 = 1.
2.1 x2 = 0. The LP relaxation (in this case we have x4 = 0 as well)

Max Z = 9 + 6×3

s.t. 5×3 ≤ 4
x3 ≤ 1
x3 ≥ 0

has optimal solution at (1, 0, 0.8, 0) with Z = 13.8.
Branch: x3 = 0 or x3 = 1.
2.1.1 x3 = 0. The optimal solution is (1, 0, 0, 0) with Z = 9 (not better than the current best solution).
2.1.2 x3 = 1. Not feasible.
2.2 x2 = 1. The optimal solution of the LP relaxation

Max Z = 14 + 6×3 + 4×4

s.t. 5×3 + 2×4 ≤ 1
x3 + x4 ≤ 1

x3 ≤ 1
x4 ≤ 1
xi ≥ 0

is at (1, 1, 0, 0.5) with Z = 16.
2.2.1 x3 = 0. The previous optimal solution (1, 1, 0, 0.5) is still feasible therefore still ooptimal.
2.2.1.1 x4 = 0. (1, 1, 0, 0) is feasible. Z = 14. (It becomes the current best solution.)
2.2.1.2 x4 = 1. (1, 1, 0, 1) is not feasible.
2.2.2 x3 = 1. No feasible solution.
Therefore the current best solution (1, 1, 0, 0) with Z = 14 is the optimal solution.

7

(5/6,1,0,1)
z=16.5

(0,1,0,1)
z=9

x_1 = 0

(1,0.8,0,0.8)
z=16.2

(1,0,0.8,0)
z=13.8

(1,1,0,0.5)
z=16

(1,0,0,0)
z=9

No FS

x_1 = 1

x_2 = 0

x_2 = 1

x_3 = 0

x_3 = 1

(1,1,0,0.5)
z=16

No FS

x_3 = 0

x_3 = 1

(1,1,0,0)
z=14

(1,1,0,1)
Not

feasible

x_4 = 0

x_4 = 1

Rule of Fathoming

A subproblem is fathomed

1. The relaxation of the subproblem has an optimal solution with z < z∗ where z∗ is the current best solution; 2. The relaxation of the subproblem has no feasible solution; 3. The relaxation of the subproblem has an optimal solution that has all integer values (or all binary if it is an BIP). 8