You are on page 1of 17

THE CHINESE UNIVERSITY OF HONG KONG

Department of Mathematics
MAT581SS Mathematics for Logistics (Fall 2009)
Suggested Solution for Homework 4
1 solution:
Maximise z=7x1 + 9x2 + 0x3 + 0x4
subject to
x1
7x1

+ 3x2
+ x2

+
+

x3
x4

= 6
= 35

x1 , x2 , x3 , x4 , 0 all are integers


all are integers
Tableau 1
z
x3
x4

Tableau 2
z
x3
x4

x1
-7
-1
7

0
6
35

0
2
35

18
2
33

Tableau 4
z
x2
x4

18
2
9
2

Tableau 5
z
x2
x1

63
2 32
9
2

x3
0
1
0

x4
0
0
1

x2
-9
1
1

x3
0

x4
0
0
1

2
35

x1
-10
- 13
7 13

x2
0
1
0

x1
-7
- 31
7

Tableau 3
z
x2
x4

x2
-9
3
1

x1
-10
- 31
1

x2
0
1
0

x1
0
0
1

x2
0
1
0

1
3

x3
3
1
3
1
- 22

x3
3

2
35

x4
0
0
1

1
3
- 13

1
3

R2

R1 + 9R2
9
2

R3 R2

x4
0
0
3
22

x3
6
2 11

x4
4
1 11

7
22
1
- 22

1
22
3
22

9
2

3
22

R3

R1 + 10R3
R2 + 13 R3

Therefore the desired Gomorys cut constraint is


f10 f13 x3 f14 x4 0
i.e.
1
2

7
22 x3

1
22 x4

7
22 x3

1
22 x4

+ x5 = 0, where x5 is the Gomorian slack.

i.e.
1
2

We next append this cut constraint to (LP )1 to get (LP )2 as


Maximise z = 7x1 + 9x2 + 0x3 + 0x4
subject to
+ 3x2
+ x2

x1
7x1

x3
7
22 x3

x4
1
22 x4

x5

x1 , x2 , x3 , x4 , x5 , 0

second iteration
Tableau 6
z
x2
x1
x5

63
2 32
9
2
- 12

Tableau 7
z
x2
x1
x5

63
2 32
9
2
11
7

Tableau 8
z
x2
x1
x3

59
3
4 47
11
7

x1
0
0
1
0

x2
0
1
0
0

x3
6
2 11

x4
4
1 11

7
22
1
- 22
7
- 22

1
22
3
22
1
- 22

-8

-30

x1
0
0
1
0

x2
0
1
0
0

x3
6
2 11

x4
4
1 11

7
22
1
- 22

1
22
3
22
1
7

x1
0
0
1
0

x2
0
1
0
0

x3
0
0
0
1

x4
1
0
1
7
1
7

x5
0
0
0
1

x5
0
0
0
- 22
7

x5
8
1
- 17
- 22
7

22
7 R4

R1
R2
R3 +

28
11
7
22
1
22

R4
R4
R4

Therefore the desired Gomorys cut constraint is


f20 f24 x4 f25 x5 0
i.e.
4
7

71 x4 67 x5 0

i.e.
4
7

71 x4 67 x5 + x6 = 0, where x6 is the Gomorian slack.

=
6
= 35
= 21

We next append this cut constraint to (LP )2 to get (LP )3 .

third iteration
Tableau 9
z
x2
x1
x3
x6

59
3
4 47
11
7
- 47

x1
0
0
1
0
0

x2
0
1
0
0
0

x3
0
0
0
1
0

x4
1
0

Tableau 10
x1
z
59
0
x2
3
0
x1 4 47
1
x3 11
0
7
x6
4
0

x2
0
1
0
0
0

x3
0
0
0
1
0

x4
1
0

Tableau 11
x1
z
59
0
x2
3
0
x1 4 47
1
x3 11
0
7
x6
4
0

x2
0
1
0
0
0

x3
0
0
0
1
0

x4
1
0

Tableau 12
x1
z 55 0
x2
3
0
x1
4
1
x3
1
0
x6
4
0

x2
0
1
0
0
0

x3
0
0
0
1
0

1
7
1
7
- 71

x5
8
1
- 71
- 22
7
- 76

-7

28
3

x5
8
1
- 17
- 22
7
6

x6
0
0
0
0
-7

x5
8
1
- 17
- 22
7
6

x6
0
0
0
0
-7

x4
0
0
0
0
1

x5
2
1
-1
-4
6

1
7
1
7

1
7
1
7

x6
7
0
1
1
-7

x6
0
0
0
0
1

7 R5

R1 R5
R3
R4

1
7
1
7

R5
R5

Since both x1 and x2 are integer, we get the optimal solution which satisfies the integer solution, i.e.,
x1 = 4, x2 = 3 and its optimal value is z = 55.

x2
7 x 1+ x 2 = 35

- x 1+ 3 x 2= 6

(9/2, 7/2)

x1

Figure 1: (LP )1

x2
7 x 1+ x 2 = 35

- x 1+ 3 x 2= 6
(32/7, 3)

x 2= 3

Figure 2: (LP )2

x1

x2
7 x 1+ x 2 = 35
x1 + x 2 = 7

- x 1+ 3 x 2= 6
(4, 3)

x 2= 3

Figure 3: (LP )3

x1

2 solution:
max

z = x1 + 2x2 + 0x3 + 0x4 + 0x5

subject to
x1
2x1

2x2
x2

+ x3
+ x4
+

x5

=
=
=

7
7
11

x1 , x2 , x3 , x4 , x5 , 0 all are integers

Tableau 1
z
x3
x4
x5

Tableau 2
z
x3
x4
x5

x1
-1
0
1
2

0
7
7
11

0
7
2

7
11

x1
-1
0
1
2

Tableau 3
z
x2
x4
x5

7
7
2
7
2

11

Tableau 4
z
x2
x1
x5

7 72
7
2
7
2
4

x1
0
0
1
0

x2
-2
2
1
0

x3
0
1
0
0

x4
0
0
1
0

x5
0
0
0
1

x2
-2
1
1
0

x3
0

x4
0
0
1
0

x5
0
0
0
1

7
2

x1
-1
0
1
2

x2
0
1
0
0

x3
1

x4
0
0
1
0

x2
0
1
0
0

1
2

0
0

x3
1
2
1
2
- 12

1
2
- 12

x4
1
0
1
-2

x5
0
0
0
1

7
2

1
2

R2

x5
0
0
0
1

R1 + 2 R2
7
2
11
2

R3 R2

R1 + R3

R4 2 R3

Therefore the desired Gomorys cut constraint is


f20 f23 x3 0
i.e.
1
2

21 x3 0

i.e.
1
2

21 x3 + x6 = 0, where x6 is the Gomorian slack.

We next append this cut constraint to (LP )1 to get (LP )2 .

Tableau 5
7
2
7
2

4
- 12

Tableau 6
z
x2
x1
x5
x6

7 72
7
2
7
2

4
1

Tableau 7
z
x2
x1
x5
x3

x1
0
0
1
0
0

7 72

z
x2
x1
x5
x6

10
3
4
3
1

x2
0
1
0
0
0

x3

x4
1
0
1
-2
0

1
2
1
2
- 12

1
- 12

-1

x1
0
0
1
0
0

x2
0
1
0
0
0

x3

x1
0
0
1
0
0

x2
0
1
0
0
0

x5
0
0
0
1
0

x6
0
0
0
0
1

1
1

x4
1
0
1
-2
0

x5
0
0
0
1
0

x6
0
0
0
0
-2

x3
0
0
0
0
1

x4
1
0
1
-2
0

x5
0
0
0
1
0

x6
1
1
-1
2
-2

1
2
1
2
- 12

2 R5

R1 12 R5
R2 12 R5
R3 + 12 R5
R4 R5

Since both x1 and x2 are integer, so we get the optimal solution which satisfies the integer solution.
Therefore,
x1 = 4, x2 = 3 and z = 10.
x2
x1 = 11/2
x 1 + x2 = 7

(7/2, 7/2)

x 2 = 7/2

(4, 3)
x2 = 3

Figure 4: (LP )2

x1

3 solution:
max z = x1 + x2 + 0x3 + 0x4
subject to
3x1

2x2
x2

x3
+

x4

= 5
= 2

x1 , x2 , x3 , x4 , 0

x1 isinteger
Tableau 1
x1
z 0 -1
x3 5 3
x4 2 0

x2
-1
2
1

x3
0
1
0

x4
0
0
1

Tableau 2
x1
z 2 -1
x3 1 3
x2 2 0

x2
0
0
1

x3
0
1
0

x4
1
-2
1

Tableau 3
x1
z
2 -1
x3 13
1
x2 2
0

x2
0
0
1

x3
0

x4
1
- 32
1

Tableau 4
z
x1
x2

2 13
1
3

x1
0
1
0

x2
0
0
1

1
3

x3

x4

1
3
1
3

1
3
- 23

5
2

R1 + R3
R2 2 R3

1
3

1
3

R2

R1 + R2

The Gomorian constraint is given by


1
1
x3 + 3
3
1

1
3

2
3

1
x4 ,
3

where x6 is the Gomorian slack. Thus, we get

second iteration
Tableau 5
z
x1
x2
x6

2 13
1
3

2
- 13

x1
0
1
0
0

x2
0
0
1
0

x3

x4

1
3
1
3

1
3
- 23

0
- 13

1
- 13

x5
0
0
0
1

1
1
1
= x3 x4 + x6 .
3
3
3

Tableau 6
z
x1
x2
x6

2 13
1
3

2
1

x1
0
1
0
0

Tableau 7
x1
z 2 0
x1 0 1
x2 2 0
x3 1 0

x2
0
0
1
0

x2
0
0
1
0

x3

x4

1
3
1
3

1
3
- 23

0
1

1
1

x3
0
0
0
1

x4
0
-1
1
1

x5
0
0
0
-3

x5
1
1
0
-3

3 R4

1
3
1
3

R1
R2

R4
R4

Since x1 is an integer and the optimal criterion is satisfied, so we get the optimal solution which satisfies
the integer solution for x1
Thus, x1 = 0, x2 = 3, the optimal solution is z = 2.

x2
3 x 1 + 2 x2 = 5
x 2= 2

(1/3, 2)

x1
Figure 5: (LP )1

x2
3 x 1 + 2 x2 = 5
x 2= 2

(0, 2)

x 1 + x2 = 2
x1

Figure 6: (LP )2

4 solution:
max z = x1 + 4x2 + 0x3 + 0x4
subject to
2x1
5x1

+
+

4x2
3x2

+ x3
+ x4

=
=

7
15

x1 , x2 , x3 , x4 , 0 and are integers

Tableau 1

CB

XB

x1

x2

x3

x4

0
0
z j cj

x3
7
x4
15
z(XB )=0

2
5
-1

4
3
-4

1
0
0

0
1
0

Tableau 2

cj

CB

XB

x1

x2

x3

x4

0
0
z j cj

7
x3
4
x4
15
z(XB )=0

1
2

1
4

5
-1

1
3
-4

0
0

0
1
0

Tableau 3

7
4

cj

cj

Min.
Ratio
7
4

Min.
Ratio
7
4

1
4

R1

Min.
Ratio

CB

XB

x1

x2

x3

x4

4
0
z j cj

7
x2
4
39
x4
4
z(XB )=7

1
2
7
2

1
0
0

1
4
- 34

0
1
0

R2 3 R1
R3 + 4 R1

node 1

x = 0, x = 7/2

( LP ) 1

z = 7 ( upper bound )

= 12 x1 + x2 + 14 x3

so x2 =

7
4

12 x1 14 x3
1

Figure 7: (LP )1

(LP )2 :
Consider x2 1.
We get 47 21 x1 14 x3 1.
Introducing the Gomorian slack, we have
7
1
1
4 2 x1 4 x3 + x5 = 1.
Tableau 4
CB
4
0
0
z j cj

cj
XB

1
x1

7
x2
4
39
x4
4
x5
- 43
z(XB )=7

Tableau 5
CB
4
0
0
z j cj

1
2
7
2
- 21

1
-2

1
x1

cj

XB
7
x2
4
39
x4
4
3
x5
2
z(XB )=7

Tableau 6
CB
4
0
1
z j cj

1
2
7
2

1
1

1
x1
0
0
1
0

cj
XB
1

x2
9
x4
2
3
x1
2
z(XB ) =

11
2

4
x2
1
0
0
0

0
x3

4
x2
1
0
0
0

0
x3

1
4
- 34
- 14

1
-4

1
4
- 34
1
2

4
x2
1
0
0
0

0
x4
0
1
0
0

0
x5
0
0
1
0

0
x4
0
1
0
0

0
x5
0
0
-2
0

0
x3
0
- 25

0
x4
0
1
0
0

1
2
1
2

2 R3

0
x5
1
7
-2
2

R1
R2

1
2
7
2

R3
R3

R4 R3

(LP )3 :
Consider x2 2.
We get

7
4

21 x1 14 x3 2.

We get 12 x1 14 x3

1
4

because we require x1 , x3 0, so it is infeasible.

x <= 1
2

node 1

x = 0, x = 7/2

( LP ) 1

z = 7 ( upper bound )

x => 2
2

x = 3/2, x = 1

node 2

node 3

z = 11/2

( LP ) 2

( LP ) 3

Figure 8: (LP )2 and (LP )3

infeasible

From (LP )2 in Tableau 6, we have


3
2

= x1 + 12 x3 2x5 .

x1 =

3
2

12 x3 + 2x5 .

(LP )4 :
Consider
x1 1.
We have
1
3
2 2 x3 + 2x5 1.
Introducing the Gomorian slack, we have
3
1
2 2 x3 + 2x5 + x6 = 1.
so
12 x3 + 2x5 + x6 = 21 .
Tableau 7
CB
4
0
1
0
z j cj

x2
9
x4
2
3
x1
2
x6
- 21
z(XB ) = 11
2

Tableau 8
CB
4
0
1
0
z j cj

cj
XB
1

x2
9
x4
2
3
x1
2
x6
1
z(XB ) =

Tableau 9
CB
4
0
1
0
z j cj

cj
XB
1

11
2

cj
XB
x2
1
x4
7
x1
1
x6
1
z(XB ) = 5

1
x1
0
0
1
0
0

4
x2
1
0
0
0
0

0
x3
0
- 25

0
x4
0
1
0
0
0

0
x5
1
7
-2
2
2

0
x6
0
0
0
1
0

1
x1
0
0
1
0
0

4
x2
1
0
0
0
0

0
x3
0
- 25

0
x4
0
1
0
0
0

0
x5
1
7
-2
-4
2

0
x6
0
0
0
-2
0

1
x1
0
0
1
0
0

4
x2
1
0
0
0
0

1
2
- 21
1
2

1
2

1
1
2

0
x3
0
0
0
1
0

0
x4
0
1
0
0
0

0
x5
1
-3
0
-4
4

0
x6
0
-5
1
-2
1

2 R4

R2 +
R3

5
2
1
2

R4
R4

R5

1
2

R4

(LP )5 :
Consider
x1 2
We have
3
1
2 2 x3 + 2x5 2
Introducing the Gomorian slack, we have
1
1
2 x3 2x5 + x6 = 2
Tableau 10
CB
4
0
1
0
z j cj

XB
x2
1
9
x4
2
3
x1
2
x6
- 21
z(XB ) = 11
2

Tableau 11
CB
4
0
1
0
z j cj

cj
XB
1

x2
9
x4
2
3
x1
2
1
x6
4
z(XB ) =

Tableau 12
CB
4
0
1
0
z j cj

cj

11
2

cj
XB

1
x1
0
0
1
0
0

4
x2
1
0
0
0
0

0
x3
0
- 25

0
x4
0
1
0
0
0

0
x5
1
7
-2
-2
2

0
x6
0
0
0
1
0

1
x1
0
0
1
0
0

4
x2
1
0
0
0
0

0
x3
0
- 25

0
x4
0
1
0
0
0

0
x5
1
7
-2
1
2

0
x6
0
0
0
- 21
0

1
x1
0
0
1
0
0

3
x2
4
11
x4
4
x1
2
1
x5
4
z(XB ) = 5

4
x2
1
0
0
0
0

1
2
1
2
1
2

1
2
- 41
1
2

0
x3
1
4
- 34

0
- 14
1

0
x4
0
1
0
0
0

0
x5
0
0
0
1
0

- 12 R4

0
x6
1
2
7
2

-1
- 12
1

R1 R4
R2 7 R4
R3 + 2R4
R5 2 R4
node 1

x = 0, x = 7/2

( LP ) 1

z = 7 ( upper bound )

x <= 1

x => 2

x = 3/2, x = 1

node 2

node 3

( LP ) 2

( LP ) 3

= 11/2
x <= 1
1

x => 2

infeasible

fathomed

x = 1, x = 1

node 4

node 5

x = 2, x = 3/4

z =5

( LP ) 4

( LP ) 5

z =5

Figure 9: (LP )4 and (LP )5


Since x2 = 3/4 is not an integer, (LP )5 is branched further.

From (LP )5 in Tableau 12, we have


= x2 + 14 x3 + 12 x6 .
so x2 = 34 14 x3 12 x6 .
3
4

(LP )6 :
Consider
x2 1.
We get 14 x3 12 x6

1
4

because we require x3 , x6 0 ,so in this situation, it is infeasible.


(LP )7 :
Consider
x2 0.
We get
1
1
3
4 4 x3 2 x6 0
Introducing the Gomorian slack, we have
14 x3 21 x6 + x7 = 34
Tableau 13
CB
4
0
1
0
0
z j cj

3
x2
4
11
x4
4
x1
2
1
x5
4
x7
- 34
z(XB ) = 5

Tableau 14
CB
4
0
1
0
0
z j cj

cj
XB

3
x2
4
11
x4
4
x1
2
1
x5
4
3
x7
2
z(XB ) = 5

Tableau 15
CB
4
0
1
0
0
z j cj

cj
XB

cj
XB
0
- 52
3 12
1

x2
x4
x1
x5
3
x6
2
z(XB ) =

7
2

1
x1
0
0
1
0
0
0

4
x2
1
0
0
0
0
0

0
x3

1
x1
0
0
1
0
0
0

4
x2
1
0
0
0
0
0

0
x3

1
x1
0
0
1
0
0
0

4
x2
1
0
0
0
0
0

0
x3
0
- 25

1
4
- 34

0
- 14
- 14
1

1
4
- 34

0
- 14
1
2

1
2

0
1
2
1
2

0
x4
0
1
0
0
0
0

0
x5
0
0
0
1
0
0

0
x6

0
x4
0
1
0
0
0
0

0
x5
0
0
0
1
0
0

0
x6

-1
- 12
1
1

0
x7
0
0
0
0
-2
0

0
x4
0
1
0
0
0
0

0
x5
0
0
0
1
0
0

0
x6
0
0
0
0
1
0

0
x7
1
7
-2
-1
-2
2

1
2
7
2

-1
- 12
- 12
1

1
2
7
2

0
x7
0
0
0
0
1
0

2 R5

R1 12 R5
R2 72 R5
R3 + R5
R4 + 12 R5
R6 R5

Since all zj cj 0, the solution is optimum is given by x1 = 3 and x2 = 0, max z = 3. (LP )7 yields an
optimum integer solution. Hence, (LP )7 is dropped.

Among the available integer valued solution, the best integer solution is given by (LP )4 . Therefore, the
optimal integer solution is max z = 5, and x1 = 1, x2 = 1.
node 1

x = 0, x = 7/2

( LP ) 1

z = 7 ( upper bound )

x <= 1

x => 2

x = 3/2, x = 1

node 2

node 3

z = 11/2

( LP ) 2

( LP ) 3

infeasible

fathomed

x <= 1

x => 2

x = 1, x = 1

node 4

node 5

x = 2, x = 3/4

z =5

( LP ) 4

( LP ) 5

z =5

x <= 0

fathomed

x => 1
2

x = 3, x = 0

node 7

node 6

z =3

(LP)

(LP)

fathomed

infeasible

fathomed

Figure 10: (LP )4 : max z = 5, and x1 = 1, x2 = 1


Hence, the best available integer solution optimal solution is max z = 5, and x1 = 1, x2 = 1

x2

5 x 1 + 3 x 2 = 15

2 x 1+ 4 x 2 = 7

x1

Figure 11: (LP )1

x2

5 x 1 + 3 x 2 = 15

x 2 => 2

x 2 <= 1

2 x 1+ 4 x 2 = 7
Figure 12: (LP )2 and (LP )3

x1

x2

5 x 1 + 3 x 2 = 15

x 2 => 2

x 2 <= 1

x 1 => 2

x 1 <= 1

2 x 1+ 4 x 2 = 7

x1

Figure 13: (LP )4 and (LP )5

x2

5 x 1 + 3 x 2 = 15

x 2 => 1

x 1 <= 1

x 1 => 2

2 x 1+ 4 x 2 = 7

Figure 14: (LP )6 and (LP )7

x1

You might also like