The Simplex Method

## **Problem**

You know how to make two items out of cloths: aprons and bookbags. Aprons require 2 hours of cutting time and 4 hours of sewing time. Bookbags require 3 hours of cutting time and 3 hours of sewing time. You sell the aprons for $18 and the bookbags for $20. How many of each item should you make if you spend 12 hours cutting and 18 hours sewing?

**Part 1:** Solve using the dictionary method.

**Part 2:** Solve using the tableau method.

## **Solution**

### **Part 1: Dictionary method**

Let

a

{\displaystyle a}

 represent aprons and

b

{\displaystyle b}

 represent bookbags.

The linear programming problem we wish to solve is to maximize the revenue (objective function)

18
a
20
b

{\displaystyle 18a+20b}

 subject to the cutting time constraint

2
a
3
b
≤
12

{\displaystyle 2a+3b\leq 12}

 and the sewing time constraint

4
a
3
b
≤
18

{\displaystyle 4a+3b\leq 18}

.

M
a
x

18
a
20
b

2
a
3
b
≤
12

4
a
3
b
≤
18

a
,
b
≥
0

{\displaystyle {\begin{aligned}Max\quad 18a+20b\\2a+3b\leq 12\\4a+3b\leq 18\\a,b\geq 0\end{aligned}}}

**Step 1: Constructing a dictionary**

Introduce the slack variables for the number of constraints and construct a dictionary.

**Dictionary 1**

Z

=
0
18
a
20
b

s

1

=
12
−
2
a
−
3
b

s

2

=
18
−
4
a
−
3
b

{\displaystyle {\begin{aligned}Z&=0+18a+20b\\s\_{1}&=12-2a-3b\\s\_{2}&=18-4a-3b\end{aligned}}}

Note that throughout the entire process

a
,
b
,

s

1

,

s

2

≥
0

{\displaystyle a,b,s\_{1},s\_{2}\geq 0}

.

The basic solution is determined by setting the variables in the objective function equal to zero and reading the constant terms for each variable in the dictionary.

**Basic solution**

(
a
,
b
,

s

1

,

s

2

# )
(
0
,
0
,
12
,
18
)

{\displaystyle (a,b,s\_{1},s\_{2})=(0,0,12,18)}

**Objective value**

# Z
0

{\displaystyle Z=0}

**Step 2: Pivoting process**

1) Selecting the entering variable.

The variable

b

{\displaystyle b}

 is the entering variable since its coefficient, 20, is the largest non-negative coefficient in the objective function.

2) Find the tightest constraint by comparing which ratio is lowest.

For

s
1

{\displaystyle s\_1}

:

12

/

# 3
4

{\displaystyle 12/3 = 4}

For

s
2

{\displaystyle s\_2}

:

18

/

# 3
6

{\displaystyle 18/3=6}

The ratio for

s
1

{\displaystyle s\_1}

 is smaller than the ratio for

s
2

{\displaystyle s\_2}

, thus

s
1

{\displaystyle s\_1}

 is the leaving variable.

3) Calculate via swapping and substitution.

Z

=
0
18
a
20
(
4
−
(
2

/

3
)
a
−
(
1

/

3
)
b
)

b

=
4
−
(
2

/

3
)
a
−
(
1

/

3
)
b

s

2

=
18
−
4
a
−
3
(
4
−
(
2

/

3
)
a
−
(
1

/

3
)
b
)

{\displaystyle {\begin{aligned}Z&=0+18a+20(4-(2/3)a-(1/3)b)\\b&=4-(2/3)a-(1/3)b\\s\_{2}&=18-4a-3(4-(2/3)a-(1/3)b)\end{aligned}}}

**Dictionary 2**

Z

=
80
(
14

/

3
)
a
−
(
20

/

3
)

s

1

b

=
4
−
(
2

/

3
)
a
−
(
1

/

3
)
b

s

2

=
6
−
2
a

s

1

{\displaystyle {\begin{aligned}Z&=80+(14/3)a-(20/3)s\_{1}\\b&=4-(2/3)a-(1/3)b\\s\_{2}&=6-2a+s\_{1}\end{aligned}}}

**Basic solution**

(
a
,
b
,

s

1

,

s

2

# )
(
0
,
4
,
0
,
6
)

{\displaystyle (a,b,s\_{1},s\_{2})=(0,4,0,6)}

**Objective value**

# Z
80

{\displaystyle Z=80}

The coefficient of variable

a

{\displaystyle a}

 is positive, so there is a more optimal solution.

1) The variable

a

{\displaystyle a}

 is the entering variable.

2) The variable

s
2

{\displaystyle s\_2}

 is the leaving variable.

For

b

{\displaystyle b}

:

4

/

(
2

/

3
# )
6

{\displaystyle 4/(2/3)=6}

For

s
2

{\displaystyle s\_2}

:

6

/

# 2
3

{\displaystyle 6/2=3}

Z

=
80
(
14

/

3
)
(
3
−
(
1

/

2
)

s

2

(
1

/

2
)

s

1

)
−
(
20

/

3
)

s

1

b

=
4
−
(
2

/

3
)
(
3
−
(
1

/

2
)

s

2

(
1

/

2
)

s

1

)
−
(
1

/

3
)
b

a

=
3
−
(
1

/

2
)

s

2

(
1

/

2
)

s

1

{\displaystyle {\begin{aligned}Z&=80+(14/3)(3-(1/2)s\_{2}+(1/2)s\_{1})-(20/3)s\_{1}\\b&=4-(2/3)(3-(1/2)s\_{2}+(1/2)s\_{1})-(1/3)b\\a&=3-(1/2)s\_{2}+(1/2)s\_{1}\end{aligned}}}

**Dictionary 3**

Z

=
94
−
(
13

/

3
)

s

1

−
(
7

/

3
)

s

2

b

=
2
−
(
2

/

3
)

s

1

(
1

/

3
)

s

2

a

=
3
(
1

/

2
)

s

1

−
(
1

/

2
)

s

2

{\displaystyle {\begin{aligned}Z&=94-(13/3)s\_{1}-(7/3)s\_{2}\\b&=2-(2/3)s\_{1}+(1/3)s\_{2}\\a&=3+(1/2)s\_{1}-(1/2)s\_{2}\end{aligned}}}

Notice the coefficients in the objective function are negative; hence, the pivoting process ends here because the objective function cannot be increased any further.

**Basic solution**

(
a
,
b
,

s

1

,

s

2

# )
(
3
,
2
,
0
,
0
)

{\displaystyle (a,b,s\_{1},s\_{2})=(3,2,0,0)}

**Objective value**

# Z
94

{\displaystyle Z=94}

Therefore you should make 3 aprons and 2 bookbags. The maximum revenue is $94.

### **Part 2: Tableau Method**

**Tableau 1**

Select the column with the most negative entry in row 3. This is column 2 **(y enters)**.

Divide the rightmost entry with their respective entries in column 2.

12

/

# 3
4

{\displaystyle 12/3 = 4}

18

/

# 3
6

{\displaystyle 18/3=6}

Select the row with the lower quotient in column 2. This is row 1 **(s1 leaves)**.

Row reduce to make the other entries of column 2 zero.

R

2

−

R

1

{\displaystyle R\_{2}-R\_{1}}

R

3

(
20

/

3
)

R

1

{\displaystyle R\_{3}+(20/3)R\_{1}}

**Tableau 2**

Select the column with the most negative entry in row 3. This is column 1 **(x enters)**.

Divide the rightmost entry with their respective entries in column 1.

12

/

# 2
6

{\displaystyle 12/2=6}

6

/

# 2
3

{\displaystyle 6/2=3}

Select the row with the lower quotient in column 1. This is row 2 **(s2 leaves)**.

Row reduce to make the other entries of column 1 zero.

R

1

−

R

2

{\displaystyle R\_{1}-R\_{2}}

R

3

(
7

/

3
)

R

2

{\displaystyle R\_{3}+(7/3)R\_{2}}

**Tableau 3**

No more negative entries in row 3! Done!

**Solution**

(
x
,
y
# )
(
6

/

2
,
6

/

3
# )
(
3
,
2
)

{\displaystyle (x,y)=(6/2,6/3)=(3,2)}

# Z
94

/

# 1
94

{\displaystyle Z=94/1=94}