You are on page 1of 6

Tutorial 3 - 343 Operations Research

Simplex Algorithm
Exercise 1. A plant manufactures three types of vehicles: automobiles, trucks
and vans, on which the company makes a profit of 4000, 6000, and 3000,
respectively, per vehicle.
The plant has three main departments: parts, assembly and finishing operating 120, 100, and 80 hours, respectively, each two-week period. It takes 50,
40, and 30 hours, respectively, to manufacture the parts for automobiles, trucks
and vans. Assembly takes 40, 30, and 20 hours, respectively, for an automobile, truck and van. Finishing takes 20, 40, and 10 hours, respectively, for an
automobile, truck and van.
How many of each type should the company manufacture in each two-week
period to maximise its profits? Formulate a linear program to answer this question and solve it using the Simplex Algorithm.

Solution
x1
x2
x3

number of trucks manufactured


number of automobiles manufactured
number of vans manufactured
max y = 6x1 + 4x2 + 3x3

subject to:
4x1
3x1
4x1

+ 5x2
+ 4x2
+ 2x2

+ 3x3
+ 2x3
+
x3

12
10

and
x1 0, x2 0, x3 0.
In standard form, we get the following LP problem:
min z = 6x1 4x2 3x3
subject to:
4x1
3x1
4x1

+
+
+

5x2
4x2
2x2

+
+
+

3x3
2x3
x3

x4
+ x5
+ x6

= 12
= 10
= 8

and
x1 0, x2 0, x3 0, x4 0, x5 0, x6 0.
BV
z
x4
x5
x6
z
x4
x5
x1
z
x3
x5
x1

x1
6
4
3
4
0
0
0
1
0
0
0
1

x2
4
5
4
2
1
3

x3
3
3
2
1

5
2
1
2
45
3
2
5
8
1
8

5
4
1
4

3
2

0
1
0
0

x4 x5
0
0
1
0
0
1
0
0
0
0
1
0
0
1
0
0
43
0
1
0
2
85
1
81
0

x6 RHS
0
0
0
12
0
10
1
8
3
2
12
1
4
34
4
1
2
4
43
15
21
2
3
81
2
3
8

3
2

The optimal BFS to the (original max) problem is thus given by:


3
3
(z, x1 , x2 , x3 , x4 , x5 , x6 ) = 15, , 0, 2, 0, , 0
2
2
i.e. the maximal profit is 15,000.
Exercise 2. Consider the following LP problem:
max y = 2x1 + 3x2
subject to:
x1
x1

+
+

x2
2x2

4
1

and
x1 0, x2 0.
Solve this problem using the Simplex Algorithm.

Solution
min z = 2x1 3x2
subject to
x1
x1

+ x2
2x2

+ x3
+ x4

= 4
= 1

and
x1 0, x2 0, x3 0, x4 0.

BV
z
x3
x4
z
x2
x4

x1
2
1
1
1
1
3

x2 x3 x4 RHS
3
0
0
0
1
1
0
4
2
0
1
1
0 3
0
12
1
1
0
4
0
2
1
9

The optimal BS (for the standard min problem) is thus given as:
(z, x1 , x2 , x3 , x4 ) = (12, 0, 4, 0, 9).
Exercise 3. Solve the following LP problem using the simplex algorithm:
max y = 2x1 3x2 + x3
subject to:
3x1
4x1
x1

+ 6x2
+ 2x2

x2

+ x3
+ x3
+ x3

6
4
3

and
x1 0, x2 0, x3 0.
Solution
min z = 2x1 + 3x2 x3
subject to:
3x1
4x1
x1

+
+

6x2
2x2
x2

+ x3
+ x3
+ x3

x4

= 6
= 4
= 3

+ x5
+ x6

and
x1 0, x2 0, x3 0, x4 0, x5 0, x6 0.
BV
z
x4
x5
x6
z
x4
x1

x1
2
3
4
1
0
0
1

x6

z
x4
x1
x3

0
0
1
0

x2
3
6
2
1
4
9
2
1
2
32

3
5
1
2

x3 x4 x5
1
0
0
1
1
0
1
0
1
1
0
0
1
1
0

2
2
1
1 43
4
1
1
0
4
4
3
4

0
0
0
1
3

x6 RHS
0
0
0
6
0
4
1
3
0
2
0
3
0
1

14

0
1
0
0

31
32
1
3
31

23
13
13
4
3

10
3
7
3
1
3
8
3

The optimum BS is thus given by:



(x1 , x2 , x3 , x4 , x5 , x6 ) =


1
8 7
, 0, , , 0, 0 .
3
3 3

Exercise 4. Consider the linear programming problem:


max y = 10x1 57x2 9x3 24x4
subject to
0.5x1
0.5x1
x1

5.5x2
1.5x2

2.5x3
0.5x3

+ 9x4
+
x4

0
0
1

and
x1 0, x2 0, x3 0, x4 0,
1. Write the problem in standard form.
2. Write the simplex tableau for an initial basis composed by all slack variables.
3. Starting from the all-slack basis, the simplex algorithm with standard pivoting rules arrives after 4 iterations to the following intermediate tableau:
BV
z
x3
x4
x7

x1
x2 x3 x4
20
9
2
4
1
0.50 0.50
1
1

x5
10.50
0.50
0.25

x6 x7 RHS
70.50
0
4.50
0
1.25
0
1
1

Continue the simplex algorithm and show that the algorithm cycles.
4. Starting from the same intermediate tableau used at the previous question,
solve the problem using the Simplex algorithm with Blands rule.
5. Is I = {2, 3, 4} a valid index set for this LP?
Solution

1. In standard form, we get the following LP problem:


min z = 10x1 + 57x2 + 9x3 + 24x4

subject to:
0.5x1
0.5x1
x1

5.5x2
1.5x2

2.5x3
0.5x3

+ 9x4
+ x4

x5
+ x6
+ x7

and
x1 0, x2 0, x3 0, x4 0, x5 0, x6 0, x7 0.
4

= 0
= 0
= 1

2.
BV
z
x5
x6
x7

x1
10
0.5
0.5
1

x2
x3
57
9
5.5 2.5
1.5 0.5
0
0

x4 x5 x6
24
0
0
9
1
0
1
0
1
0
0
0

x7
0
0
0
1

RHS
0
0
0
1

3. Solving with the Simplex Algorithm using standard pivoting rules we get:
BV
z
x5
x6
x7
z
x1
x6
x7
z
x1
x2
x7
z
x3
x2
x7
z
x3
x4
x7
z
x5
x4
x7
z
x5
x6
x7

x1
10
0.5
0.5
1
1

x2
57
5.5
1.5
0
53
11
4
11

x3
x4
9 24
2.5
9
0.5
1
0
0
41 204
5
18
2
8
5 18
14.50
98
0.50
4
1
0.50
2
0.50
4
18
1
8
1
2

29
2
1
1
20
9
2
4
1
0.50
0.50
1
22
93
21
4
8
2
0.50 1.50 0.50
1
10
57
9
0.50 5.50 2.50
0.50 1.50 0.50
1

x5
x6 x7 RHS
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
1
20
0
2
0
1
1
0
2
1
1
6.75 13.25
0
0.75
2.75
0
0.25
0.25
0
0.75
2.75
1
1
15
93
0
1.50
5.50
0
0.50
2.50
0
1
1
10.50 70.50
0
0.50
4.50
0
1
0.25
1.25
0
1
1
24
0
1
9
0
1
1
0
1
1
24
0
9
1
0
1
1
0
1
1

and since the last tableau returns to the initial basis of all slacks, the algorithm
is cycling.
3. Solving with the Simplex Algorithm using Blands rule, the tableaus are
identical until we reach the index set I = {5, 4, 7}, where we choose as pivot
column x1 instead of x6 , since it is the column with smallest index such that

q > 0. Thus, we have:


BV
z
x5
x4
x7
z
x5
x1
x7
z
x5
x1
x3

x1
22
4
0.50
1

x2
x3
93
21
8
2
1.50 0.50
27
4
3
3
30
2

x4

1
1

1 44
2
8
1
2
1
2
42
4

1
3

x5

x6
24
9
1

x7

1
20
1 1
2
2
1
18 1
1 5
2
1
2
1

RHS
0
0
0
1
0
0
0
1
1
2
1
1

The optimal BS to the (original max) problem is thus given by:


(y , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) = (1, 1, 0, 1, 0, 2, 0, 0)
since y = z .
4. For the index set I = {2, 3, 4}, we would have a basis matrix

5.5 2.5 9
B = 1.5 0.5 1
0
0
0
which is singular. Since this is a square matrix, the columns associated to the
indexes in I are linearly dependent. Therefore, I is not a valid index set.

You might also like