Вы находитесь на странице: 1из 77

Inequalities and Linear

Programming

1
• Graph and solve systems of
linear inequalities in two
variables

• Use graphical methods to find


optimal value of a linear
function subject to constraints

• Use simplex method to


maximise functions subject to
constraints

Inequalities and Linear


Programming
Linear Inequality in Two Variables
Linear inequality can be written in one of the following
forms
𝑎𝑥 + 𝑏𝑦 + 𝑐 < 0 𝑎𝑥 + 𝑏𝑦 + 𝑐 ≤ 0
𝑎𝑥 + 𝑏𝑦 + 𝑐 > 0 𝑎𝑥 + 𝑏𝑦 + 𝑐 ≥ 0
where
𝑎, 𝑏, and 𝑐 are constants
not both 𝑎 and 𝑏 are zero

When graphing,
• a solid line – included in the solution (≤, ≥)
• a dashed line – not included in the solution (<, >)
3
One Linear Inequality in Two Variables
The graph of 𝑦 < 𝑥 consists of all points in which the 𝑦-
coordinate is less than the 𝑥-coordinate

The graph of the region 𝑦 < 𝑥 can be found by graphing


the line 𝑦 = 𝑥

This line separates the 𝑥𝑦-plane


into two half-planes, 𝑦 < 𝑥 and
𝑦 > 𝑥.

We can determine which half-


plane is the solution region by
selecting as a test point any point
not on the line; e.g. (2, 0) 4
Example: Graphing an Inequality in
Two Variables
Graph the inequality 4𝑥 − 2𝑦 ≤ 6

① Rearrange the inequality, so that the appropriate


plane is obvious
4𝑥 − 2𝑦 ≤ 6
2𝑦 ≥ 4𝑥 − 6
𝑦 ≥ 2𝑥 − 3

② Plot the graph – solid or dotted line


𝒙 𝒚
0 −3
3ൗ 0
2 5
Example: Graphing an Inequality in
Two Variables cont’d

③ Determine the region


Pick a test point that is not
on the line, and see if its
coordinates satisfy the
inequality equation.

Hence, the solution region is


the line 𝑦 = 2𝑥 − 3 and the
half-plane to the left of the
line.

6
Try This....
a) Graph the inequalities : 𝑥 + 𝑦 − 3 > 0

a) A food vendor at a rock concert sells hot dogs for


$4 and hamburgers for $5. How many of these
sandwiches must be sold to produce sales of at
least $1,000? Express your answer as a linear
inequality and draw its graph.

7
Systems of Linear Inequalities
If we have two or more inequalities in two variables,
we can find the solutions that satisfy all the
inequalities. We call the inequalities a system of
inequalities, and the solution of the system can be
found by finding the intersection of the solution sets
of all the inequalities.

The solution set of the system of inequalities can be


found by graphing the inequalities on the same set of
axes and noting their point of intersection

8
Example: Graphical Solution of a
System of Inequalities
3𝑥 − 2𝑦 ≥ 4
Graph the solution of the system ቊ
𝑥+𝑦−3>0

① Rearrange the inequality, so that the appropriate


plane is obvious
3𝑥 − 2𝑦 ≥ 4 𝑥+𝑦−3>0
2𝑦 ≤ 3𝑥 − 4 𝑦 > −𝑥 + 3
3
𝑦 ≤ 𝑥−2
2

9
Example: Graphical Solution of a
System of Inequalities cont’d

② Plot the graph


3
𝑦≤ 𝑥 −2 𝑦 > −𝑥 + 3
2
𝒙 𝒚 𝒙 𝒚
0 −2 0 3
4ൗ 0 3 0
3

10
Example: Graphical Solution of a
System of Inequalities cont’d

③ Determine the region

This solution region is the graph solution of this system of


inequalities
The point (2, 1), where the two regions form a “corner”, can
be found by solving the equations 3𝑥 − 2𝑦 = 4 and 𝑥 + 𝑦 + 3
11
simultaneously
Try This....
3𝑥 − 2𝑦 < 6
Graph the solution to the inequalities ቊ
𝑥 − 3𝑦 > 9

12
Example: Systems of Linear
Inequalities
CDF Appliances expects orders for at least 64,000 of the
coffee makers and at least 40,000 of the cappuccino
machines.

At each plant, the number of assembly hours available for


these two appliances is constrained by each plant’s capacity
and the need to fill the orders.

Write the system of inequalities that describes these assembly


plant constraints, and graph the solution region for the
system.
13
Example: Systems of Linear
Inequalities cont’d

Let 𝑥 = number of assembly hours at Atlanta


𝑦 = number of assembly hours at Fort Worth

Both 𝑥 and 𝑦 must be nonnegative, give the following


constraints
160𝑥 + 800𝑦 ≥ 64,000
200𝑥 + 200𝑦 ≥ 40,000
𝑥, 𝑦 ≥ 0

The solution is restricted to Quadrant I and the axes that


bound Quadrant I
14
Example: Systems of Linear
Inequalities cont’d

160𝑥 + 800𝑦 ≥ 64,000 200𝑥 + 200𝑦 ≥ 40,000


800𝑦 ≥ −160𝑥 + 64,000 200𝑦 ≥ −200𝑥 + 40,000
1
𝑦 ≥ − 𝑥 + 80 𝑦 ≥ −𝑥 + 200
5
𝒙 𝒚 𝒙 𝒚
0 80 0 200
400 0 200 0

15
Example: Systems of Linear
Inequalities cont’d

The corner (150, 50) is found by solving simultaneously


160𝑥 + 800𝑦 = 64,000 𝑥 + 5𝑦 = 400 (1)
ቊ is equivalent to ቊ
200𝑥 + 200𝑦 = 40,000 𝑥 + 𝑦 = 200 (2)

Finding eq. (1) minus eq. (2) gives one equation in one
variable and allows us to complete the solution
4𝑦 = 200
𝑦 = 50
𝑥 = 150

Any point in the shaded region represents a possible number


of assembly hours at each plant that would fill the orders.
16
Try This....
A farm co-op has 6,000 acres available to plant with
corn and soybeans. Each acre of corn requires 9
gallon of fertilizer and 3/4 hour of labor to harvest.
Each acre of soybeans requires 3 gallons of fertilizer
and 1 hour of labor to harvest. The co-op has
available at most 40,500 gallons of fertilizer and at
most 5,250 hours of labor for harvesting. The number
of acres of each crop is limited by the available
resources: land, fertilizer, and labor for harvesting.
Write the system of inequalities that describes the
constraints and graph the solution region for the
system.
17
Linear Programming – Graphical Methods
Linear programming is used to find the optimal value of a
linear function subject to constraints.
e.g. A manufacturer may want to maximise a profit, subject to
production restrictions imposed by limitations on the use of
machinery and labour.
If the limitations on the variables (called constraints) can be
expressed as linear inequalities and the function that is to be
maximised or minimised (called the objective function) is a
linear function, then the problem is called a linear
programming problem.
Hence, any point in the region determined by the constraints
is called a feasible solution, and the region itself is called the
feasible region. 18
Feasible Regions and Solutions
The feasible region on the
left is an example of a
closed and bounded
region because it is
entirely enclosed by, and
includes, the lines
associated with the
constraints.

19
Solving Linear Programming
Graphically

20
Solving Linear Programming
Graphically

21
Solving Linear Programming
Graphically
① When the feasible region for a linear programming problem
is closed and bounded, the objective function has a
maximum and a minimum value

② When the feasible region is not closed and bounded, the


objective function may have a maximum only, or a minimum
only, or no solution

③ If a linear programming problem has a solution, then the


optimal (maximum or minimum) value of an objective
function occurs at a corner of the feasible region
determined by the constraints.

④ If the objective function has its optimal value at two


corners, then it also has that optimal value at any point on
the line (boundary) connecting those two corners. 22
Example: Maximising Profit
A farm co-op has 6000 acres available on which to plant corn
and soybeans. The following table summarises each crop’s
requirements for fertiliser/herbicide, harvesting labour hours,
and the available amounts of these resources.

a) If the co-op’s profits per acre are $240 per corn and $160
for soybeans, how many acres of each crop should the co-
op plant to maximise profit? What is the maximum profit?
b) If the market conditions change so that the co-op’s profits
per acre change to $300 for corn and $100 for soybeans,
how should the co-op adjust its planting to maximise
profit? What is the maximum profit? 23
Example: Maximising Profits cont’d

a) ① Write down the objective function and constraint


inequalities
Let 𝑥 = number of acres of corn
𝑦 = number of acres of soybeans

Combining the constraints with the profit equation


gives the linear programming problem:
Maximise 𝑃 = 240𝑥 + 160𝑦
subject to 𝑥 + 𝑦 ≤ 6000 Land
9𝑥 + 3𝑦 ≤ 40,500 Fertiliser/herbicide
3
𝑥 + 𝑦 ≤ 5250 Harvesting time
4
𝑥, 𝑦 ≥ 0
24
Example: Maximising Profits cont’d

a) ② Graph the solution of the constraint system


𝑥 + 𝑦 ≤ 6000 9𝑥 + 3𝑦 ≤ 40,500
𝑦 ≤ −𝑥 + 6000 3𝑦 ≤ −9𝑥 + 40500

𝒙 𝒚
𝑦 ≤ −3𝑥 + 13,500
0 6000 𝒙 𝒚
6000 0 0 13500
4500 0

3
𝑥 + 𝑦 ≤ 5250
4 𝒙 𝒚
3
𝑦 ≤ − 𝑥 + 5250 0 5250
4
7000 0

25
Example: Maximising Profits cont’d

a) ② Graph the solution of the constraint system


𝒙 𝒚 𝒙 𝒚 𝒙 𝒚
0 6000 0 13500 0 5250
6000 0 4500 0 7000 0

The solution of
the system of
constraint
inequalities forms
the feasible region

26
Example: Maximising Profits cont’d

a) ③ Find the corners of the feasible region

Point 𝐴 = 0, 0

B Point 𝐵 = 𝑦-intersect of the line


3
C 𝑥 + 𝑦 = 5250
4
D = (0, 5250)

Point 𝐸 = 𝑥-intersect of the line


A E 9𝑥 + 3𝑦 = 40500
= (4500, 0)

27
Example: Maximising Profits cont’d

a) ③ Find the corners of the feasible region


Point 𝐶 = intersection of line
𝑥 + 𝑦 = 6000 and
3
𝑥 + 𝑦 = 5250
B 4

C 𝑥 + 𝑦 = 6000 (1)
D ൝3
𝑥 + 𝑦 = 5250 (2)
4
3
−𝑥 + 6000 = − 𝑥 + 5250
4
A E 1
𝑥 = 750
4
𝑥 = 3000; 𝑦 = 3000

∴ Point 𝐶 = (3000, 3000) 28


Example: Maximising Profits cont’d

a) ③ Find the corners of the feasible region

Point D = intersection of line


𝑥 + 𝑦 = 6000 and
B 9𝑥 + 3𝑦 = 40500
C 𝑥 + 𝑦 = 6000 (1)
D ቊ
9𝑥 + 3𝑦 = 40500 (2)
−𝑥 + 6000 = −3𝑥 + 13500
E 2𝑥 = 7500
A
𝑥 = 3750; 𝑦 = 2250

∴ Point 𝐷 = (3750, 2250)

29
Example: Maximising Profits cont’d

a) ④ Evaluate objective function at each corner of the


feasible region

Thus, when the co-op plants 3750 acres of corn and


2250 acres of soybeans, it achieves maximum profit
of $1,260,000

30
Example: Maximising Profits cont’d

b) In this case, the co-op’s profit function is given by


Profit, 𝑃∗ = 300𝑥 + 100𝑦

The feasible region is the same, so we use the corners to


complete the solution

31
Example: Maximising Profits cont’d

b) In this case, the maximum profit of $1,350,000 occurs at


either the point (4500, 0) or the point (3750, 2250). This
means that the profit function 𝑃∗ will be maximised not
only at these two corner points, but also at any point on
the segment joining them.

e.g. the point (4000, 1500) is on this segment the the


profit at this point is also $1,350,000:
𝑃∗ = 300 4000 + 100 1500 = 1,350,000 32
Try This....
A company produces 2 types of can openers: manual
and electric. Each requires the use of 3 machines: A, B
and C. Each manual can opener requires the use of
machine A for 2 hrs, machine B for 1 hr, and machine C
for 1 hr. An electric can opener requires 1 hr on A, 2 hrs
on B and 1 hr on C. Suppose the maximum number of
hours available per month for the use of machines A, B
and C are 180, 160 and 100 respectively. The profit on
manual can opener is $4, and on an electric can opener
is $6. if the company can sell all the can openers, how
many of each type should it make in order to maximise
the monthly profit?

33
Example: Minimisation
Find the maximum and minimum values (if they exist) of 𝐶 =
𝑥 + 𝑦 subject to the constraints
3𝑥 + 2𝑦 ≥ 12
𝑥 + 3𝑦 ≥ 11
𝑥, 𝑦 ≥ 0

① Write down the objective function and constraint


inequalities
C=𝑥+𝑦
subject to 3𝑥 + 2𝑦 ≥ 12
𝑥 + 3𝑦 ≥ 11
𝑥, 𝑦 ≥ 0
34
Example: Minimisation cont’d

② Graph the solution of the constraint system


3𝑥 + 2𝑦 ≥ 12 𝑥 + 3𝑦 ≥ 11
2𝑦 ≥ −3𝑥 + 12 3𝑦 ≥ −𝑥 + 11
3 1 11
𝑦 ≥− 𝑥+6 𝑦≥− 𝑥+
2 3 3
𝒙 𝒚 𝒙 𝒚
0 6 0 11ൗ
3
4 0 11 0

35
Example: Minimisation cont’d

② Graph the solution of the constraint system


Note that the feasible region is not closed and
bounded, so we must check whether optimal values
exist.
This is done by graphing 𝐶 = 𝑥 + 𝑦 for selected values
of 𝐶 and noting the trend.
The graph shows the
solution region with graphs
of 𝐶 = 𝑥 + 𝑦 for 𝐶 = 3, 𝐶 =
A 5, and 𝐶 = 8.
B Note that the objective
function has a minimum but
C no maximum.
36
Example: Minimisation cont’d

③ Find the corners of the feasible region


Point 𝐴 = 𝑦-intersect of the line 3𝑥 + 2𝑦 = 12
= (0, 6)

Point 𝐶 = 𝑥-intersect of the line 𝑥 + 3𝑦 = 11


= (11, 0)

Point 𝐵 = intersection of the line 3𝑥 + 2𝑦 = 12 and 𝑥 + 3𝑦 = 11


3 1 11
− 𝑥+6=− 𝑥+
2 3 3
7 7 A
𝑥=
6 3
B
𝑥 = 2; 𝑦 = 3
∴ Point 𝐵 = (2, 3) C
37
Example: Minimisation cont’d

④ Evaluate objective function at each corner of the feasible


region
Corner 𝑪=𝒙+𝒚
(0, 6) 𝐶 =0+6=6
(2, 3) 𝐶 =2+3=5
(11, 0) 𝐶 = 11 + 0 = 11

Thus, we conclude that


Minimum 𝐶 = 5, at (2, 3)
Maximum 𝐶 does not exist, as 𝐶 can be made
arbitrarily large in the feasible region
38
Try This....
Two chemical plants, one at Kulim and one at Butterworth,
produce 3 types of fertilizers, low phosphorous (LP),
medium phosphorous (MP) and high phosphorous (HP). At
each plant, the fertilizer is produced in a single production
run, so the 3 types are produced in fixed proportions. The
Kulim plant produces 1 ton of LP, 2 tons of MP and 3 tons
of HP, and it charges $600 for what is produced in 1
operation, whereas Butterworth plant produces 1 ton of LP,
5 tons of MP and 1 ton of HP, and it charges $1,000 for
what it produces in 1 operation. If a customer needs a 100
tons of LP, 260 tons of MP and 180 tons of HP, how many
production runs should be ordered from each plant to
minimize costs?
39
The Simplex Method
• Useful if there are more than 2 variables

• Systematic way of moving from one feasible corner


of the convex region to another in such a way that
the value of the objective function increases until
an optimal value is reached or it is discovered that
no solution exists

40
The Simplex Method
Standard maximisation problems, satisfy the
following conditions:
1. The objective function is to be maximised
2. All variables are nonnegative
3. The constraints are of the form
𝑎1 𝑥1 + 𝑎2 𝑥2 + ⋯ + 𝑎𝑛 𝑥𝑛 ≤ 𝑏
where 𝑏 > 0

These conditions may seem to restrict types of problems


unduly, but in applied situations where the objective function
is to be maximised, the constraints often satisfy conditions 2
and 3.
41
The Simplex Method: Tasks and
Procedures
The simplex method involves a series of decisions and
operations using matrices. It involves three major tasks

Simplex Method Tasks


A. Setting up the matrix for the simplex method
B. Determining necessary operations and
implementing those operations to reach a solution
C. Reading the solution from the simplex matrix

The procedure that combines these three tasks to


maximise a function is given in the following table.
42
The Simplex Method: Tasks and
Procedures

43
The Simplex Method: Tasks and
Procedures

44
The Simplex Method: Tasks and
Procedures

45
Example: Simplex Method
A farm co-op has 6000 acres available on which to plant corn
and soybeans. The following table summarises each crop’s
requirements for fertiliser/herbicide, harvesting labour hours,
and the available amounts of these resources.

If the co-op’s profits per acre are $240 per corn and $160 for
soybeans, how many acres of each crop should the co-op
plant to maximise profit? What is the maximum profit?

46
Example: Simplex Method cont’d

① Use different slack variable to write each constraint of


inequality
Let 𝑥 = number of acres of corn
𝑦 = number of acres of soybeans

Combining the constraints with the profit equation gives the


linear programming problem:
Maximise 𝑃 = 240𝑥 + 160𝑦
subject to 𝑥 + 𝑦 ≤ 6000 Land
9𝑥 + 3𝑦 ≤ 40,500 Fertiliser/herbicide
3
𝑥 + 𝑦 ≤ 5250 Harvesting time
4

As variables must be nonnegative in the simplex method, we


no longer need to state 𝑥, 𝑦 ≥ 0 47
Example: Simplex Method cont’d

The simplex method uses matrix methods on systems of


equations, so we convert each constraint inequality to an
equation by using a new variable, called a slack variable

Think of each slack variable as representing the amount of the


constraint left unused. In the land constraint, 𝑥 + 𝑦
represents the total number of acres planted, and this
number cannot exceed the 6000 acres available

Thus, if we let 𝑠1 represent the unused (unplanted) acres of


land, then 𝑠1 ≥ 0 and
𝑥 + 𝑦 ≤ 6000 becomes 𝑥 + 𝑦 + 𝑠1 = 6000

48
Example: Simplex Method cont’d

Similarly, if 𝑠2 represents the unused gallons of


fertiliser/herbicide, then 𝑠2 ≥ 0 and
9𝑥 + 3𝑦 ≤ 40,5000 becomes 9𝑥 + 3𝑦 + 𝑠2 = 40,500

And if 𝑠3 represents the unused hours of labour, then 𝑠3 ≥ 0


and
3 3
𝑥 + 𝑦 ≤ 5250 becomes 𝑥 + 𝑦 + 𝑠3 = 5250
4 4

Notice in each constraint that the expressions in 𝑥 and 𝑦


represent the amount of that resource that is used and that
the slack variable represents the amount not used.

49
Example: Simplex Method cont’d

Rewrite the objective function


𝑃 = 240𝑥 + 160𝑦 as −240𝑥 − 160𝑦 + 𝑃 = 0

And then the following system of equations describes this


problem

We seek to maximise 𝑃 in the last equation subject to the


constraints in the first three equations
50
Example: Simplex Method cont’d

② Set up the simplex matrix. It contains the system of


constraint equations with the objective function in the last
row with all the variables on the left and coefficient 1 for 𝑃

We can place this system of equations in a matrix called a


simplex matrix or a simplex tableau. Note that the objective
function is in the last (bottom) row of this matrix with all
variables on the left side and that the rows above the function
row correspond to the constraints.

51
Example: Simplex Method cont’d

Note that if 𝑥 = 0 and 𝑦 = 0, then all 6,000 acres of land are


unused 𝑠1 = 6000 , all 40,500 gallons of fertiliser/herbicide
are unused 𝑠2 = 40,500 , all 5,250 labour hours are unused
𝑠3 = 5,250 , and profit is 𝑃 = 0. From rows 1, 2, 3, and 4 of
matrix 𝐴, we can read these values of 𝑠1 , 𝑠2 , 𝑠3 , and 𝑃,
respectively.

The last row still corresponds to the objective function 𝑃 =


240𝑥 + 160𝑦. If we seek to improve (that is, increase the
value of) 𝑃 by changing the value of only one of the variables,
then because the coefficient of 𝑥 is larger, the rate of increase
is greatest by increasing 𝑥.

52
Example: Simplex Method cont’d

③ Find the pivot entry – a) pivot column: the most –ve


number in the last row; b) pivot entry: +ve coefficient that
gives the smallest non-negative quotient

a) We can find the variable that will improve the objective


function most rapidly by looking for the most negative
value in the last row (the objective function row) of the
simplex matrix. The column that contains this value is
called the pivot column.
b) The positive coefficients in the pivot column of the
simplex matrix are divided with the constants in the
augment. The smallest quotient identifies the pivot row.
The pivot entry is the entry in both the pivot column and
the pivot row.

53
Example: Simplex Method cont’d

The simplex matrix 𝐴 is shown below with the 𝑥-column (with the most
negative value) indicated as the pivot column.

Note that when the positive coefficients in the pivot column (𝑥-column)
are divided by the constants in the augment, the smallest quotient is
4,500 (R2). This smallest quotient identifies the pivot row.
The pivot entry (or pivot) is the entry in both the pivot column and pivot
row, in this case the value 9 (circled) in R2, C1 of matrix 𝐴.

54
Example: Simplex Method cont’d

④ Pivoting – using row operations with the row containing


the pivot entry a ‘1’ and all other entries in the pivot
column a ‘0’

1
𝑅 →𝑅2
Note that this 9 2

transformation was
based on holding 𝑦 = 0
and increasing 𝑥 as
much as possible so
that the resulting point
would be possible

55
Example: Simplex Method cont’d

Notice that the columns of 𝐵 that correspond to the variables 𝑥, 𝑠1 ,


and 𝑠3 and to the objective function 𝑃 are all different, but each
contains a single entry of ‘1’ and the other entries are ‘0’.

Variables with columns of this type (but not the objective function)
are called basic variables. The columns for variables 𝑦 and 𝑠2 do
not have this special form and these columns correspond to
nonbasic variables.
56
Example: Simplex Method cont’d

⑤ Decide what to do next – refer to the last row: a) –ve


indicator – return to ③; b) +ve/0 – optimum value
obtained; c) in a complete solution, the variables that
have +ve entries in the last row are nonbasic variables

Observing the last row, the most negative number occurs in


the 𝑦-column. This means that the 𝑦-column is the new pivot
column.
Return to ③
57
Example: Simplex Method cont’d

③ Find the pivot entry


The positive coefficients in the pivot column (𝑦-column) are
divided by the constants in the augment, the smallest
quotient is 2,250 (R1). This smallest quotient identifies the
pivot row.

The pivot entry (or pivot) is the entry in both the pivot
2
column and pivot row, in this case the value (circled) in R1,
3
C2 of matrix 𝐵.

58
Example: Simplex Method cont’d

④ Pivoting
3
𝑅 →𝑅1
2 1

In this new simplex matrix 𝐶, the basic variables (corresponding to the


columns with a single entry of ‘1’) are 𝑥, 𝑦, and 𝑠3 , and the nonbasic
variables are 𝑠1 and 𝑠2 , so they equal zero.
As all entries in the last row are nonnegative, we have found the optimal
value of the objective function, and it occurs when 𝑠1 = 0, and 𝑠2 = 0. 59
Example: Simplex Method cont’d

⑥ Read the values of the basic variables and the objective


function from the rows of the matrix
Using this, rows 1, 2, 3, and 4 of
matrix 𝐶 give the values for 𝑦, 𝑥, 𝑠3
and 𝑃 respectively.
𝑦 = 2,250
𝑥 = 3,750
𝑠3 = 187.5
𝑃 = 1,260,000
𝑠1 = 0; 𝑠2 = 0

This means that the co-op should plant 3750 acres of corn (𝑥) and
2250 acres of soybeans (𝑦) for a maximum profit of $1,260,000. And
this planting scheme results in 0 unused acres of land (𝑠1 ), 0 gallons
of fertiliser/herbicide (𝑠2 ), and 187.5 unused hours of labor (𝑠3 ) 60
Example: Simplex Method Tasks
Complete Tasks 𝐴, 𝐵, and 𝐶 to find the maximum value of 𝑓 =
4𝑥 + 3𝑦 subject to
𝑥 + 2𝑦 ≤ 8
2𝑥 + 𝑦 ≤ 10

Task 𝐴: Setting up the matrix for the simplex method


Introducing the slack variables
gives the system of equations

Writing this in a matrix with


the objective function in the
2
last row

61
Example: Simplex Method Tasks cont’d
Task 𝐵: Determine necessary operations and implementing
those operations to reach a solution

The most –ve entry in the last row is −4, so the pivot
column is in C1. The smallest quotient is 5, so R2 is the
pivot row. Thus, the pivot entry is R2, C1 (circled in 𝐴)

Next, use row operations with R2 to make the pivot entry


equal ‘1’ and all other entries in C1 equal ‘0’
62
Example: Simplex Method Tasks cont’d
1
𝑅 →𝑅2
2 2 1 1
1 2 2 5

3
−𝑅2 +𝑅1 →𝑅1
4𝑅2 +𝑅3 →𝑅3 2

This gives the simplex matrix 𝐵, which has nonbasic variables


𝑦 = 0 and 𝑠2 = 0 and corresponds to the basic feasible solution
𝑦 = 0, 𝑠2 = 0 and 𝑥 = 5, 𝑠1 = 3, 𝑓 = 20

The last row contains a negative entry, so the solution is not


optimal and we locate another pivot column to continue
63
Example: Simplex Method Tasks cont’d

The pivot column is in C2, and the smallest quotient is in R1. The
new pivot entry is circled, and it is in R1, C1. Then, using row
operations, to make the pivot entry ‘1’, and the all other entries in
the pivot column, C2, to ‘0’.
2
𝑅 →𝑅1 2 1 2 1
3 1 1 3

3 2 1 1 3

3 2
− 𝑅1 +𝑅2 →𝑅2
2 1 2
𝑅1 +𝑅3 →𝑅3 0 −
3 3
4
2 5
0 3 3
22

64
Example: Simplex Method Tasks cont’d
2 1
1 3

3 2
1 2
0 −
3 3
4
2 5
0 3 3
22

As there are no negative indicators in the last row, the


solution is complete.

Task 𝐶 : Reading the solution from the simplex matrix


𝑠1 and 𝑠2 are nonbasic variables, so they equal zero.
Thus, 𝑓 is maximised at 22 when 𝑦 = 2, 𝑥 = 4, 𝑠1 = 0,
and 𝑠2 = 0.

65
Simplex Method: Multiple Solutions
A linear programming problem can have multiple solutions
when the optimal value for the objective function occurs at
two adjacent corners of the feasible region. Consider the
following:

Maximise 𝑓 = 2𝑥 + 𝑦
1
subject to 𝑥 + 𝑦 ≤ 16
2
𝑥 + 𝑦 ≤ 24
𝑥, 𝑦 ≥ 0

66
Simplex Method: Multiple Solutions
cont’d

Task 𝐴: Setting up the matrix for the simplex method

Task 𝐵: Determine necessary operations and implementing


those operations to reach a solution
Most –ve value in the last row
is −2, so the 𝑥-column is the
pivot column. The smallest
quotient is 16, which in in R1.
So the pivot entry is in R1, C1.

67
Simplex Method: Multiple Solutions
cont’d

Task 𝐵: Determine necessary operations and implementing


those operations to reach a solution

1 −𝑅1 +𝑅2 →𝑅2


2𝑅1 +𝑅3 →𝑅3

The simplex matrix has no negative indicators, so the


optimal value of 𝑓 has been found.

Task 𝐶 : Reading the solution from the simplex matrix


𝑓 = 32 when 𝑥 = 16, 𝑦 = 0
Note that the nonbasic variables (𝑦) has a zero indicator
68
Simplex Method: Multiple Solutions
cont’d

When the simplex matrix for the optimal value of 𝑓 has a


nonbasic variable with a zero indicator in its column, there
may be multiple solutions giving the same optimal value for 𝑓.
We can discover whether another solution exists by using the
column that nonbasic variable as the pivot column.

When this occurs, we can use the column with the zero
indicator as our pivot column and often obtain a new
solution that has the same value for the objective function.

In this final tableau, if we used the 𝑦-column as the pivot


column, then we could find the second solution (at 𝒙 =
𝟖, 𝒚 = 𝟏𝟔) that gives the same optimal value of 𝒇.

69
Simplex Method: No Solution
It is also possible for a linear programming problem
to have an unbounded solution (and thus, no
maximum value for 𝑓)

Example:
Maximise 𝑓 = 2𝑥1 + 𝑥2 + 3𝑥3
subject to 𝑥1 − 3𝑥2 + 𝑥3 ≤ 3
𝑥1 − 6𝑥2 + 2𝑥3 ≤ 6

70
Simplex Method: No Solution cont’d

Task 𝐴: Setting up the matrix for the simplex method

1
2
−3

Task 𝐵: Determine necessary operations and implementing


those operations to reach a solution
Most –ve column is 𝑥3 , so that is our pivot column.
Smallest quotient is 3, and both coefficients give this
quotient, so either coefficient can be used as the pivot
entry. Using element in R1, we can make 𝑥3 basic.
71
Simplex Method: No Solution cont’d

3 ÷ −3 = −1
−2𝑅1 +𝑅2 →𝑅2
3𝑅1 +𝑅3 →𝑅3 0÷0=0

The most –ve value in the last row is 𝑥2 , −10, so that is the
pivot column. But there are no +ve coefficients – so what does
this means??
72
Simplex Method: No Solution cont’d

3 ÷ −3 = −1
−2𝑅1 +𝑅2 →𝑅2
3𝑅1 +𝑅3 →𝑅3 0÷0=0

If, after the pivot column has been found, there are no
positive coefficients in that column, no maximum
solution exists.

Even if we could pivot using the 𝑥2 column, the variables


𝑥1 and 𝑠1 would remain equal to 0. As 𝑥2 increases, 𝑥3
also increases and the value of 𝑓 also increases. That is,
there is no maximum value for 𝑓.
73
Try This....
a) Maximise 𝑍 = 5𝑥1 + 4𝑥2 subject to
𝑥1 + 𝑥2 ≤ 20
2𝑥1 + 𝑥2 ≤ 35
−3𝑥1 + 𝑥2 ≤ 12
𝑥1 , 𝑥2 ≥ 0

3
b) Maximize 𝑍 = 3𝑥1 + 4𝑥2 + 𝑥3 subject to
2
−𝑥1 − 2𝑥2 ≥ −10
2𝑥1 + 2𝑥2 + 𝑥3 ≤ 10
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
74
Shadow Prices
Finally, do note that one of the most powerful aspects of
the simplex method is that it not only solves the given
problem but also tells how to adapt the given solution if
the situation changes.

In particular, from the simplex matrix (final tableau), the


solution to the problem can be read, and there is
information about the amount of change in the objective
function if 1 additional unit of a resource becomes
available, and how this additional resource changes the
optimal solution values. This change is called the shadow
price of the resource.

75
Inequalities and Linear Programming
• Graph and solve
systems of linear
inequalities in two
variables

• Use graphical methods


to find optimal value of
a linear function subject
to constraints
• Use simplex method to
maximise functions
subject to constraints
77

Вам также может понравиться