0% found this document useful (0 votes)
140 views24 pages

Decision Maths Assingment - Arivukkarasan (MT5)

The document is a student assignment submission for a linear programming course. It includes the student's details and information about the assignment such as the type (project report) and due date. The body of the document provides descriptions and algorithms for various linear programming methods including: 1) Simplex method - A technique for solving linear programs by moving to adjacent vertices of the feasible region. 2) Graphical method - Solving linear programs by finding the optimal point where the objective function intersects the feasible region on a graph. 3) Two-phase simplex method - An extension of simplex method to handle both <= and >= constraint types. 4) Big-M method - A variation of two

Uploaded by

知識王
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views24 pages

Decision Maths Assingment - Arivukkarasan (MT5)

The document is a student assignment submission for a linear programming course. It includes the student's details and information about the assignment such as the type (project report) and due date. The body of the document provides descriptions and algorithms for various linear programming methods including: 1) Simplex method - A technique for solving linear programs by moving to adjacent vertices of the feasible region. 2) Graphical method - Solving linear programs by finding the optimal point where the objective function intersects the feasible region on a graph. 3) Two-phase simplex method - An extension of simplex method to handle both <= and >= constraint types. 4) Big-M method - A variation of two

Uploaded by

知識王
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

INSTITUT PENDIDIKAN GURU KAMPUS PULAU PINANG

TUGASAN KERJA KURSUS

TAHUN AKADEMIK: ____2020_____

Program & Ambilan: PISMP AMBILAN JUN 2018

Semester/Tahun SEMESTER 1 / TAHUN 3


ARIVUKKARASAN A/L
Nama Pelajar:
SIVAKUMARAN
Angka Giliran: 2018272340093

Nombor Kad Pengenalan: 990806-02-5721

Kumpulan/Unit: MATEMATIK 5
MTES 3113
Kod dan Nama Kursus: MATEMATIK KEPUTUSAN

TUGASAN 3:
Jenis Tugasan:
LAPORAN PROJEK
Nama Pensyarah: DR. DANIEL LEONG

Tarikh Hantar: 16 OCTOBER 2020


Tandatangan Pelajar:

Pengakuan penerimaan Tarikh:

maklumbalas daripada pensyarah: Tandatangan Pensyarah:

Tarikh:

1
1.0 Introduction

Typically, linear programming is very well-known mathematical branch which is used


mostly in solving linear problems as well as our daily problems. One of the main functions of
this linear programming is to determine the amount of profits (maximize) or the lowest cost
needed (minimize) for a specific objective. The process of this linear programming is known
as optimization, where we are required to find the optimum value for either maximum(highest)
or minimum(lowest). Variables, objectives and constrain are the three key ingredients for this
process.

2.0 Simplex Method

The simplex method is an approach which uses slack variables, tableaus, and
pivot variables to solve linear programming models by hand to find the optimum
solution for an optimization problem (Jameson, Sherran, Pledger, & Smith, 2017). In order
to reach an optimum solution, this approach starts from one vertex and moves on to
other vertices in a sequence, increasing the objective function and one variable at a
time. This method allows one to determine if a particular vertex, on the edge of the
feasible region, is optimal or not. It also decides, which adjacent vertex should move
to in order to increase or decrease the value of the objective function based on the
requirement whether to find the optimized maximum or minimum value. Basically,
simplex method can only be used top solve linear programming problems in which all
the constraints, with an exception of non-negativity conditions in a form of 𝑎𝑎1 𝑥𝑥1 +
𝑎𝑎2 𝑥𝑥2….. 𝑎𝑎𝑛𝑛 𝑥𝑥𝑛𝑛 ≤ 𝐾𝐾. (Jameson, Sherran, Pledger, & Smith, 2017)

2.1 Algorithm

Step 1: Draw the tableau with basic variable column on left, one column for each
variable including slack variable, and a value column and one row for
each constraint and the bottom row for the objective function.
Step 2: Create a tableau. Enter the coefficients of the variables in the appropriate
column and row.
Step 3: Look along the objective row for the most negative entry and indicates it
as pivot column.
Step 4: Calculate the 𝜃𝜃 values for each of the constraint rows, where 𝜃𝜃 =
(𝑡𝑡ℎ𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐) ÷ (𝑡𝑡ℎ𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐).
Step 5: Select the row with the smallest positive 𝜃𝜃 value to become the pivot row

2
Step 6: The element in the pivot row and pivot column is the pivot.
Step 7: Divide the row found in Step 5 by the pivot, and change the basic variable
at the start of the row to the variable at the top of the pivot column. This
is now the pivot row.
Step 8: Use the pivot row to eliminate the pivot’s variable from the other rows.
This means that the pivot column now contains one 1 and zeros.
Step 9: Repeat Step 3 to 8 until here are no more negative numbers in the
objective row.
Step 10: The tableau is now optimal and the non-zero values can be read off using
the basic variable column and the value column.
Step 11: Check the values of the basic variables which satisfy the original objective
function and check that each constraint is satisfied.
(Jameson, Sherran, Pledger, & Smith, 2017)

Table 1.0: Algorithm for simplex method

Using a simplex tableau to solve a maximising linear programming problem, where the
constraints are given as equalities (Jameson, Sherran, Pledger, & Smith, 2017).hence,
the steps of solving a minimize linear programming problem is the same as the one
given in the table 1.0 :

• First, find a new objective function which would the negative of the original
function.
• Then, after maximization of the new objective function, find the negative value
for the objective function which would be the value for the minimize objective
function.
• For example, if a minimise objective function is P = 7x + 4y, the find the
negative of this function which would be the maximise objective function M = -
4y - 7x . After finding the value for M simply find the P, in this case which would
be P = -M.
3.0 Graphical Method

Graphical method of linear programming, determines the highest or lowest point


of intersection between the objective function lines and the feasible region on a graph
to solve linear programming problems.

3
3.1 Algorithm

Step 1: Generate the mathematical model of the given linear programming


problem.
Step 2: Replace inequality sign with equation sign for each constraint. Find the
two points of each line and draw it on graph. Determine the area of
feasible solution by looking the inequality sign of each constraint. For
example, area of feasible solution for ≤ constraint is on left side of the
line while for ≥ constraint is on right side of the line. By convention,
leave the feasible region unshaded while shade all other regions of the
graph.
Step 3: There are two method to find the optimal solution.
1. Objective line method (ruler method)
• Find two points of objective line and draw it on graph by
choosing any number of 𝑃𝑃.
• Draw the objective line.
• For a maximum point, look for the last point covered by an
objective line as it leaves the feasible region.
• For a minimum point, look for the first point covered by an
objective line as it enters the feasible region.
• The ruler must keep parallel to an objective line by placing the
set square at the base of the ruler.

2. Vertex testing method


• Find the coordinates of each vertex of the feasible region.
• Evaluate the objective function at each of these points.
• Select the vertex that gives the optimal value of the objective
function.
If the points of intersection are not obvious integer values, use
simultaneous equations to determine their coordinates.
(Jameson, Sherran, Pledger, & Smith, 2017)

Table 2.0: Algorithm for Graphical method

4.0 Two- phase Simplex Method

Two phased Simplex method is just like Simplex method but, instead of just ≤
constraint; it can do for both ≤ and ≥ constraints (Jones, 2006). Two-phased Simplex method
inserts slack variables for ≤ constraints surplus and artificial variable for ≥ constraints for it
to solve the problems. This is because the ≤ constraints in problems doesn’t have an obvious
basic feasible solution due to the placement of origin is not in the feasible region. So, the
constraints are subtracted by surplus variables and added with artificial variable to change
and solve the problem. (Jameson, Sherran, Pledger, & Smith, 2017)

4
4.1 Algorithm

Step 1: Add slack variable for ≤ constraints while surplus and artificial variables
for ≥ constraints to form as equations.
Step 2: Define new objective function called as temporary objective function, 𝐼𝐼 to
minimise the sum of all the artificial variables.
Step 3: Use simplex method to solve this problem.
Step 4: If the minimum sum of the artificial values is 0 then the solution found is a
basic feasible solution of the original problem, which is then the starting
point for the second stage. Use simplex method again to solve this
problem.
Step 5: If the minimum sum of the artificial variables is not 0 then the original
problem has no feasible solution.
(Jameson, Sherran, Pledger, & Smith, 2017)

Table 3.0: Algorithm for Two-phased Simplex method

5.0 Big-M Method

The Big-M method involves minimising of the sum of artificial variables same as the
Two-phased Simplex method but slightly different. The “M” as in Big-M, represents the
an arbitrary large number. Since M is large and positive, maximizing this modified
objective function will now automatically push 𝑎𝑎𝑛𝑛 to zero, which means it can
essentially maximise the P and minimise the 𝑎𝑎𝑛𝑛 with one application of the algorithm.
(Jameson, Sherran, Pledger, & Smith, 2017)

5.1 Algorithm

Step 1: Introduce a slack variable for each constraint of the form ≤


Step 2: Introduce a surplus variable and an artificial variable for each constraint of
the form ≥
Step 3: For each artificial variable, subtract𝑀𝑀(𝑎𝑎1 + 𝑎𝑎2 + 𝑎𝑎3 … ) from the objective
function, where 𝑀𝑀 is an arbitrarily large number.
Step 4: Eliminate the artificial variables from the objective function so that the
variables remaining in the objective function are non-basic variables.

5
Step 5: Formulate an initial tableau and apply the simplex method in the normal
way.
(Jameson, Sherran, Pledger, & Smith, 2017

Table 4.0: Algorithm for Big-M method

6.0 Problem 1

6.1 Solution 1: Graphical Method (Attachment 1)

Jam Brand Pineapple (kg) Sugar(kg) Profit (Rm)


Darling 0.4 0.8 10
Honey 0.6 0.6 12
Availability 480 810 Maximise profit
Table 5.0: Ingredient and Profit as well as Availability for both Darling and Honey jam
brand.

Let Darling be d and Honey be h. and the objective of this problem is the maximised
profit, which is 𝑃𝑃 = 10𝑑𝑑 + 12ℎ.

Constraints;

• For Pineapple, 0.4𝑑𝑑 + 0.6ℎ ≤ 480 which can be simplified by dividing the whole
function by 0.2. Hence, we get;
𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 ≤ 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐
• For Sugar, 0.8𝑑𝑑 + 0.6ℎ ≤ 810 which also can be simplified by dividing the whole
function by 0.2. Hence, we get;
𝟒𝟒𝒅𝒅 + 𝟑𝟑𝒉𝒉 ≤ 𝟒𝟒𝟒𝟒𝟒𝟒𝟎𝟎
• The non-negativity which can resembled by 𝒅𝒅, 𝒉𝒉 ≥ 𝟎𝟎

As summary,

The maximised profit, 𝑃𝑃 = 10𝑑𝑑 + 12ℎ is subjected to;

𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 ≤ 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐

𝟒𝟒𝒅𝒅 + 𝟑𝟑𝒉𝒉 ≤ 𝟒𝟒𝟒𝟒𝟒𝟒𝟎𝟎

𝒅𝒅, 𝒉𝒉 ≥ 𝟎𝟎

(Jameson, Sherran, Pledger, & Smith, 2017)

6
The ruler method as mentioned in table 2.0, was used in this graphical
method in order to determine the optimal solution. From the graph and line, the
maximum profit value will only occur at the final points on the objective line as it gets
the closest from leaving the feasible region. For this graph the maximum profit value
can be found at the interception of lines 𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 = 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐 and 𝟒𝟒𝟒𝟒 + 𝟑𝟑𝟑𝟑 = 𝟒𝟒𝟒𝟒𝟒𝟒𝟎𝟎. Upon
solving these two equations simultaneously will gives a value for both d and h which
are 825 and 250 respectively. From those values we can find the maximum profit
possible by inserting those values in the equation 𝑷𝑷 = 𝟏𝟏𝟏𝟏𝟏𝟏 + 𝟏𝟏𝟏𝟏𝟏𝟏. After that, we can
conclude that the manufacturer should make 825kg of Darling branded pineapple
jam and 250kg of Honey branded pineapple jam to get the maximum possible profit
of RM 11250.

6.2 Solution 2: Simplex-Method (Attachment 2)

Introduce the slack variables m and n, to form equation such as;

𝟐𝟐𝒅𝒅 + 𝟑𝟑𝒉𝒉 + 𝒎𝒎 = 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐

𝟒𝟒𝒅𝒅 + 𝟑𝟑𝒉𝒉 + 𝒏𝒏 = 𝟒𝟒𝟒𝟒𝟒𝟒𝟒𝟒

Hence, changing the maximise profit equation from 𝑷𝑷 = 𝟏𝟏𝟏𝟏𝟏𝟏 + 𝟏𝟏𝟏𝟏𝟏𝟏 to 𝑷𝑷 − 𝟏𝟏𝟏𝟏𝒅𝒅 −
𝟏𝟏𝟏𝟏𝒉𝒉 = 𝟎𝟎.

After forming the initial tableau. From the tableau analyse along the objective row
for the most negative. The solution already reached an optimum solution since there
are no negative numbers (Ethan, 2020). Hence, look at the basic variable column
and the value column can see that 𝑃𝑃 = 11250, ℎ = 250, 𝑑𝑑 = 825 and all other
variables and slack variables are zero. Thus, the full solution is 𝑃𝑃 = 11250, ℎ =
250, 𝑑𝑑 = 825 where else 𝑚𝑚 = 𝑛𝑛 = 0. So, we can conclude that the manufacturer
reaches the maximum profit of RM 11250 when he produces 825kg of Darling
branded pineapple jam and 250kg of Honey branded pineapple jam.

7
7.0 Problem 2

7.1 Solution 1: Two-phase Simplex Method (Attachment 3)

From the problem we can form the equations such as;


𝟑𝟑𝟑𝟑 + 𝟒𝟒𝟒𝟒 + 𝒔𝒔𝟏𝟏 = 𝟔𝟔
𝒙𝒙 + 𝟑𝟑𝟑𝟑 − 𝒔𝒔𝟐𝟐 + 𝒂𝒂𝟏𝟏 = 𝟐𝟐

𝑷𝑷 − 𝟏𝟏𝟏𝟏𝟏𝟏 − 𝟏𝟏𝟏𝟏𝟏𝟏 = 𝟎𝟎

𝑰𝑰 − 𝒙𝒙 − 𝟑𝟑𝟑𝟑 + 𝒔𝒔𝟐𝟐 = −𝟐𝟐

Same as the simplex method after forming the tableau the values along the
objective row were analysed (Ethan, 2020). There are no negative values in the
temporary objective row (bottom row), so the tableau is optimal as 𝐼𝐼 = 0 and the
minimum sum of artificial variable becomes zero (Jameson, Sherran, Pledger, & Smith,
2017); in order for the basic feasible solution has been found for the original problem.
2 10
𝑦𝑦 = 3 , 𝑠𝑠1 = 3
and 𝑥𝑥 = 𝑠𝑠2 = 0, will be the basic feasible solution for the secondary

stage. At the end, the optimal solution has been found when there are no negative
values in the objective row.so we can conclude that, the maximum value of 𝑃𝑃 is 7.5.
This occurs when 𝑠𝑠2 = 2.5, 𝑦𝑦 = 1.5 where else the slack variables are 𝑥𝑥 = 𝑠𝑠1 = 0.

7.2 Solution 2: Big-M Method (Attachment 4)

Equations are formed such as:


𝟑𝟑𝟑𝟑 + 𝟒𝟒𝟒𝟒 + 𝒔𝒔𝟏𝟏 = 𝟔𝟔
𝒙𝒙 + 𝟑𝟑𝟑𝟑 − 𝒔𝒔𝟐𝟐 + 𝒂𝒂𝟏𝟏 = 𝟐𝟐
Hence, the maximum value for this method will be;
𝑷𝑷 − (𝟏𝟏 + 𝑴𝑴)𝒙𝒙 − (𝟓𝟓 + 𝟑𝟑𝟑𝟑)𝒚𝒚 + 𝒔𝒔𝟐𝟐 𝑴𝑴 = −𝟐𝟐𝟐𝟐
The optimum value was found for this problem due to no negative value found in the
objective row.so we can conclude such as, the maximum value of 𝑃𝑃 is 7.5. This occurs
when 𝑠𝑠2 = 2.5, 𝑦𝑦 = 1.5 where else 𝑥𝑥 = 𝑠𝑠1 = 0.

8.0 Conclusion

Same optimum solutions were found for each problem 1 and 2; even though different
methods were used to solve those problems.

References

8
Ethan. (2020, May 10). MathsTool. Didapatkan dari Linear programming examples:
https://www.mathstools.com/section/main/Two-
phase_Method_Example#.X5blzIgzbIU

Jameson, S., Sherran, P., Pledger, K., & Smith, H. (2017). Edexcel AS and A leven further
mathematics: Decision Mathematics 1. London: Pearson Education Limited.

Jones, J. (2006, June 19). People.Richland.Edu. Didapatkan dari Linear Programming:


Simplex Method: https://people.richland.edu/james/ictcm/2006/simplex.html

9
Attachments

Attachment 1

Problem 1 (Graphical Method)

Jam Brand Pineapple (kg) Sugar(kg) Profit (Rm)


Darling 0.4 0.8 10
Honey 0.6 0.6 12
Availability 480 810 Maximise profit
Table 5.0: Ingredient and Profit as well as Availability for both Darling and Honey jam
brand.

Let Darling be d and Honey be h. and the objective of this problem is the maximised
profit, which is 𝑃𝑃 = 10𝑑𝑑 + 12ℎ.

Constraints;

• For Pineapple, 0.4𝑑𝑑 + 0.6ℎ ≤ 480 which can be simplified by dividing the whole
function by 0.2. Hence, we get;
𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 ≤ 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐
• For Sugar, 0.8𝑑𝑑 + 0.6ℎ ≤ 810 which also can be simplified by dividing the whole
function by 0.2. Hence, we get;
𝟒𝟒𝟒𝟒 + 𝟑𝟑𝟑𝟑 ≤ 𝟒𝟒𝟒𝟒𝟒𝟒𝟎𝟎
• The non-negativity which can resembled by 𝒅𝒅, 𝒉𝒉 ≥ 𝟎𝟎

As summary,

The maximised profit, 𝑃𝑃 = 10𝑑𝑑 + 12ℎ is subjected to;

𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 ≤ 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐

𝟒𝟒𝒅𝒅 + 𝟑𝟑𝒉𝒉 ≤ 𝟒𝟒𝟒𝟒𝟒𝟒𝟎𝟎

𝒅𝒅, 𝒉𝒉 ≥ 𝟎𝟎

10
Assume 𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 ≤ 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐 be the equation 𝟐𝟐𝟐𝟐 + 𝟑𝟑𝒉𝒉 = 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐. The line for this equation
lies on the point of (0,800) and (1200,0).

When h-intercept, d= 0 When d-intercept, h= 0


2(0) + 3ℎ = 2400 2𝑑𝑑 + 3(0) = 2400
3ℎ = 2400 2𝑑𝑑 = 2400
ℎ = 800 𝑑𝑑 = 1200
Hence the h-intercept will be on point Hence the d-intercept will be on point
(0,800) (1200,0)

Again, assume that 𝟒𝟒𝒅𝒅 + 𝟑𝟑𝒉𝒉 ≤ 𝟒𝟒𝟒𝟒𝟒𝟒𝟒𝟒 be the equation 𝟒𝟒𝒅𝒅 + 𝟑𝟑𝒉𝒉 = 𝟒𝟒𝟒𝟒𝟒𝟒𝟒𝟒. The line for
this equation lies on the point of (30,1310) and (990,30).

When d= 30, When h= 30


4(30) + 3ℎ = 4050 4𝑑𝑑 + 3(30) = 4050
3ℎ = 4050 − 120 4𝑑𝑑 = 4050 − 90
3ℎ = 3930 4𝑑𝑑 = 3960
ℎ = 1310 𝑑𝑑 = 945
(30,1310) Point = (990,30)

The objective line has equation 𝟏𝟏𝟏𝟏𝟏𝟏 + 𝟏𝟏𝟏𝟏𝟏𝟏 = 𝟑𝟑𝟎𝟎𝟎𝟎𝟎𝟎 and passes through (0,250) and
(300,0).

When h-intercept, d= 0 When d-intercept, h= 0


10(0) + 12ℎ = 3000 10𝑑𝑑 + 12(0) = 3000
12ℎ = 3000 10𝑑𝑑 = 3000
ℎ = 250 𝑑𝑑 = 300
Point = (0,250) Point = (300,0)

Solving equations simultaneously:

𝟐𝟐𝟐𝟐 + 𝟑𝟑𝟑𝟑 = 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐 − (1)

𝟒𝟒𝟒𝟒 + 𝟑𝟑𝟑𝟑 = 𝟒𝟒𝟒𝟒𝟒𝟒𝟒𝟒 − (2)

11
Multiply equation (1) with 2 to get equation (3)

𝟒𝟒𝟒𝟒 + 𝟔𝟔𝟔𝟔 = 𝟒𝟒𝟒𝟒𝟒𝟒𝟒𝟒 − (3)

Equation (3) subtracts with equation (2)

4𝑑𝑑 + 6ℎ − (4𝑑𝑑 + 3ℎ) = 4800 − 4050

4𝑑𝑑 − 4𝑑𝑑 + 6ℎ − 3ℎ = 750

3ℎ = 750

ℎ = 250

Substitute ℎ = 250 into equation (1)

2𝑑𝑑 + 3(250) = 2400

2𝑑𝑑 + 750 = 2400

2𝑑𝑑 = 2400 − 750

2𝑑𝑑 = 1650

𝑑𝑑 = 825

Now substitute d= 825 and h= 250 in the maximise profit equation to get the maximised
profit 𝑃𝑃 = 10(825) + 12(250) = 11250.

12
Attachment 2

Problem 1 (Simplex Method)

Introducing slack variables 𝑟𝑟 and 𝑠𝑠, to form equations such as:

2𝑑𝑑 + 3ℎ + 𝑚𝑚 = 2400

4𝑑𝑑 + 3ℎ + 𝑛𝑛 = 4050

𝑃𝑃 − 10𝑑𝑑 − 12ℎ = 0

i. The initial tableau:


Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value
variable
𝒎𝒎 2 3 1 0 2400
𝒏𝒏 4 3 0 1 4050
𝑷𝑷 -10 -12 0 0 0

ii. Analyse the objective row of the initial tableau for the most negative number. This
gives the pivot column as the 𝑦𝑦 column. For each of the other rows, calculate the
𝜃𝜃 values where
iii. 𝜃𝜃 = (𝑡𝑡ℎ𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐)(𝑡𝑡ℎ𝑒𝑒 𝑡𝑡𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐).
(Jameson, Sherran, Pledger, & Smith, 2017)
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value 𝜽𝜽 values
variable
𝒎𝒎 2 3 1 0 2400 2400 ÷ 3 = 800
𝒏𝒏 4 3 0 1 4050 4050 ÷ 3
= 1350
𝑷𝑷 -10 -12 0 0 0

13
iv. Then, determine the row containing the smallest positive value of 𝜃𝜃. Then, the pivot
will become obvious as it sits at the point of interception.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value 𝜽𝜽 values
variable
𝒎𝒎 2 3 1 0 2400 2400 ÷ 3 = 800
𝒏𝒏 4 3 0 1 4050 4050 ÷ 3
= 1350
𝑷𝑷 -10 -12 0 0 0

v. Next step, divide all elements in first row by the pivot to create the pivot row.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value Row
operations
variable
𝒎𝒎 2 1 1 0 800 𝑅𝑅1 ÷ 3
3 3
𝒏𝒏 4 3 0 1 4050
𝑷𝑷 -10 -12 0 0 0

vi. Then, use the pivot row to eliminate 𝑦𝑦 from each of the other rows.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value Row
operations
variable
𝒎𝒎 2 1 1 0 800
3 3
𝒏𝒏 2 0 -1 1 1650 𝑅𝑅2 − 3𝑅𝑅1
𝑷𝑷 -2 0 4 0 9600 𝑅𝑅3 + 12𝑅𝑅1

vii. Now repeat the process again from ii to iv. Find the smallest negative value in the
objective rows.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value
variable
𝒎𝒎 2 1 1 0 800
3 3
𝒏𝒏 2 0 -1 1 1650
𝑷𝑷 -2 0 4 0 9600

14
(Jones, 2006)

viii. Calculate the new 𝜃𝜃 values. Then the row with the smallest 𝜃𝜃 value become next
pivot row.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value 𝜽𝜽 values
variable
𝒎𝒎 2 1 1 0 800 2
800 ÷ = 1200
3 3 3
𝒏𝒏 2 0 -1 1 1650 1650 ÷ 2 = 825
𝑷𝑷 -2 0 4 0 9600

ix. Divide the second row by the pivot to create the pivot row.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value Row
operations
variable
𝒎𝒎 2 1 1 0 800
3 3
𝒏𝒏 1 0 1 1 825 𝑅𝑅2 ÷ 2

2 2
𝑷𝑷 -2 0 4 0 9600

x. Use the pivot row to eliminate 𝑥𝑥 from each of the other rows.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value Row
operations
variable
𝒎𝒎 0 1 2 1 250 2
− 𝑅𝑅1 − 𝑅𝑅2
3 3 3
𝒏𝒏 1 0 1 1 825

2 2
𝑷𝑷 0 0 3 1 11250 𝑅𝑅3 + 2𝑅𝑅2

15
xi. Analyse along the objective row for the most negative. Optimal solution reached
because there are no more negative number in the objective rows. Look at the
basic variable column and the value column can see that 𝑃𝑃 = 11250, 𝑦𝑦 = 250, 𝑥𝑥 =
825 and all other variables and slack variables are zero.
Basic 𝒅𝒅 𝒉𝒉 𝒎𝒎 𝒏𝒏 Value
variable
𝒎𝒎 0 1 2 1 250

3 3
𝒏𝒏 1 0 1 1 825

2 2
𝑷𝑷 0 0 3 1 11250

So, we can conclude that the manufacturer reaches the maximum profit of RM 11250
when he produces 825kg of Darling branded pineapple jam and 250kg of Honey
branded pineapple jam.

16
Attachment 3

Problem 2 (Two-phase Simplex Method)

Maximise 𝑃𝑃 = 𝑥𝑥 + 5𝑦𝑦
Subject to
𝟑𝟑𝟑𝟑 + 𝟒𝟒𝟒𝟒 ≤ 𝟔𝟔
𝒙𝒙 + 𝟑𝟑𝟑𝟑 ≥ 𝟐𝟐
𝒙𝒙, 𝒚𝒚 ≥ 𝟎𝟎

i. Introduce slack variable for ≤ inequality while surplus(-) and artificial for ≥
inequality(+). Converting the inequalities into equations.
𝟑𝟑𝟑𝟑 + 𝟒𝟒𝟒𝟒 + 𝒔𝒔𝟏𝟏 = 𝟔𝟔
𝒙𝒙 + 𝟑𝟑𝟑𝟑 − 𝒔𝒔𝟐𝟐 + 𝒂𝒂𝟏𝟏 = 𝟐𝟐

ii. Let 𝑰𝑰 = −𝒂𝒂𝟏𝟏 as 𝐼𝐼 as the temporary objective function. (Jameson, Sherran, Pledger,
& Smith, 2017)
𝒂𝒂𝟏𝟏 = 𝟐𝟐 − 𝒙𝒙 − 𝟑𝟑𝟑𝟑 + 𝒔𝒔𝟐𝟐
𝑰𝑰 = −(𝟐𝟐 − 𝒙𝒙 − 𝟑𝟑𝟑𝟑 + 𝒔𝒔𝟐𝟐 )
𝑰𝑰 = −𝟐𝟐 + 𝒙𝒙 + 𝟑𝟑𝟑𝟑 − 𝒔𝒔𝟐𝟐 )
𝑰𝑰 − 𝒙𝒙 − 𝟑𝟑𝟑𝟑 + 𝒔𝒔𝟐𝟐 = −𝟐𝟐

iii. The initial tableau is


Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value
variable
𝒔𝒔𝟏𝟏 3 4 1 0 0 6
𝒂𝒂𝟏𝟏 1 3 0 -1 1 2
𝑷𝑷 -1 -5 0 0 0 0
𝑰𝑰 -1 -3 0 1 0 -2

17
Stage 1
iv. Just like the simplex method, analyse the temporary objective row of the tableau
for the most negative number. This gives the pivot column as the 𝑦𝑦 column. For
each of the other rows, calculate the 𝜃𝜃 values.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value 𝜽𝜽 value
variable
𝒔𝒔𝟏𝟏 3 4 1 0 0 6 3
6÷4 =
2
𝒂𝒂𝟏𝟏 1 3 0 -1 1 2 2
2÷3 =
3
𝑷𝑷 -1 -5 0 0 0 0
𝑰𝑰 -1 -3 0 1 0 -2

v. Then, select the row containing the smallest positive 𝜃𝜃 value. In this case is second
row. Then divide all the elements in second row by the pivot and become a pivot
row.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value Row operations
variable
𝒔𝒔𝟏𝟏 3 4 1 0 0 6
𝒚𝒚 1 1 0 1 1 2 𝑅𝑅2 ÷ 3

3 3 3 3
𝑷𝑷 -1 -5 0 0 0 0
𝑰𝑰 -1 -3 0 1 0 -2

vi. Use the pivot row to eliminate 𝑦𝑦 from each of the other rows.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value Row operations
variable
𝒔𝒔𝟏𝟏 5 0 1 4 4 10 𝑅𝑅1 − 4𝑅𝑅2

3 3 3 3
𝒚𝒚 1 1 0 1 1 2

3 3 3 3
𝑷𝑷 2 0 0 5 5 10 𝑅𝑅3 + 5𝑅𝑅2

3 3 3 3
𝑰𝑰 0 0 0 0 1 0 𝑅𝑅4 + 3𝑅𝑅2

18
vii. Since there are no negative values in the temporary objective row so this tableau
is optimal. 𝐼𝐼 = 0; so, the basic feasible solution has been found for the original
2 10
problem. The basic feasible solution for the second stage is 𝑦𝑦 = 3 , 𝑠𝑠1 = 3
and 𝑥𝑥 =

𝑠𝑠2 = 0.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value
variable
𝒔𝒔𝟏𝟏 5 0 1 4 4 10

3 3 3 3
𝒚𝒚 1 1 0 1 1 2

3 3 3 3
𝑷𝑷 2 0 0 5 5 10

3 3 3 3
𝑰𝑰 0 0 0 0 1 0

Stage 2
viii. Repeat the same process again just like simplex method but this time by removing
𝐼𝐼 row and artificial variable columns. Look for the most negative number from
bottom row. Then, calculate the 𝜃𝜃 values.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 Value 𝜽𝜽 value
variable
𝒔𝒔𝟏𝟏 5 0 1 4 10 10 4 15
÷ =
3 3 3 3 3 8
𝒚𝒚 1 1 0 1 2 2 1
− ÷ �− � = −2
3 3 3 3 3
𝑷𝑷 2 0 0 5 10

3 3 3

19
ix. Find the smallest positive 𝜃𝜃 value. Divide all the elements by the pivot to become
pivot row.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 Value Row operations
variable
𝒔𝒔𝟐𝟐 5 0 3 1 5 4
𝑅𝑅1 ÷
4 4 2 3
𝒚𝒚 1 1 0 1 2

3 3 3
𝑷𝑷 2 0 0 5 10

3 3 3

x. Use the pivot row to eliminate 𝑠𝑠2 from each of the other rows.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 Value Row operations
variable
𝒔𝒔𝟐𝟐 5 0 3 1 5
4 4 2
𝒚𝒚 3 1 1 0 3 1
𝑅𝑅2 + 𝑅𝑅1
4 4 2 3
𝑷𝑷 11 0 5 0 15 5
𝑅𝑅3 + 𝑅𝑅1
4 4 2 3

xi. There are no negative values in the objective row, so the optimal solution has
found.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 Value
variable
𝒔𝒔𝟐𝟐 5 0 3 1 5
4 4 2
𝒚𝒚 3 1 1 0 3
4 4 2
𝑷𝑷 11 0 5 0 15
4 4 2

From here on we can conclude that the maximum value of 𝑃𝑃 is 7.5. This occurs when
𝑠𝑠2 = 2.5, 𝑦𝑦 = 1.5 where else 𝑥𝑥 = 𝑠𝑠1 = 0.

20
Attachment 4
Problem 2 (Big-M Method)
Maximise value 𝑷𝑷 = 𝒙𝒙 + 𝟓𝟓𝟓𝟓
Subject to;
𝟑𝟑𝟑𝟑 + 𝟒𝟒𝟒𝟒 ≤ 𝟔𝟔
𝒙𝒙 + 𝟑𝟑𝟑𝟑 ≥ 𝟐𝟐
Where the non-negativity is 𝒙𝒙, 𝒚𝒚 ≥ 𝟎𝟎

a. Introduce slack variable for ≤ inequality while surplus(-) and artificial for ≥
inequality(+). Converting the inequalities into equations such as;
𝟑𝟑𝟑𝟑 + 𝟒𝟒𝟒𝟒 + 𝐬𝐬𝟏𝟏 = 𝟔𝟔
𝐱𝐱 + 𝟑𝟑𝟑𝟑 − 𝐬𝐬𝟐𝟐 + 𝐚𝐚𝟏𝟏 = 𝟐𝟐

b. Modify the objective function by subtracting the term 𝑀𝑀𝑀𝑀1 . (Jameson, Sherran,
Pledger, & Smith, 2017)
𝑷𝑷 = 𝒙𝒙 + 𝟓𝟓𝟓𝟓 − 𝑴𝑴𝑴𝑴𝟏𝟏 (𝟏𝟏)
𝒂𝒂𝟏𝟏 = 𝟐𝟐 − 𝒙𝒙 − 𝟑𝟑𝟑𝟑 + 𝒔𝒔𝟐𝟐 (𝟐𝟐)

Substitute equation (2) into (1)


𝑃𝑃 = 𝑥𝑥 + 5𝑦𝑦 − 𝑀𝑀(2 − 𝑥𝑥 − 3𝑦𝑦 + 𝑠𝑠2 )
𝑃𝑃 − (1 + 𝑀𝑀)𝑥𝑥 − (5 + 3𝑀𝑀)𝑦𝑦 + 𝑠𝑠2 𝑀𝑀 = −2𝑀𝑀

c. Form the initial tableau is:


Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value
variable
𝒔𝒔𝟏𝟏 3 4 1 0 0 6
𝒂𝒂𝟏𝟏 1 3 0 -1 1 2
𝑷𝑷 −(1 + 𝑀𝑀) −(5 + 3𝑀𝑀) 0 𝑀𝑀 0 −2𝑀𝑀

21
d. Select the most negative number in objective row and the column as pivot
column. Then calculate the 𝜃𝜃 values.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value 𝜽𝜽 value
variable
𝒔𝒔𝟏𝟏 3 4 1 0 0 6 3
6÷4=
2
𝒂𝒂𝟏𝟏 1 3 0 -1 1 2 2
2÷3=
3
𝑷𝑷 −(1 + 𝑀𝑀) −(5 + 3𝑀𝑀) 0 𝑀𝑀 0 −2𝑀𝑀

e. Select the smallest positive 𝜃𝜃 value. Divide all the elements in the second row by
the pivot to become the pivot row.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value Row operation
variable
𝒔𝒔𝟏𝟏 3 4 1 0 0 6
𝒚𝒚 1 1 0 1 1 2 𝑅𝑅2 ÷ 3

3 3 3 3
𝑷𝑷 −(1 −(5 0 𝑀𝑀 0 −2𝑀𝑀
+ 𝑀𝑀) + 3𝑀𝑀)

f. Use the pivot row to eliminate 𝑦𝑦 from each of the other rows.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value Row operation
variable
𝒔𝒔𝟏𝟏 5 0 1 4 4 10 𝑅𝑅1 − 4𝑅𝑅2

3 3 3 3
𝒚𝒚 1 1 0 1 1 2

3 3 3 3
𝑷𝑷 2 0 0 5 5 10 𝑅𝑅3 + (5 + 3𝑀𝑀)𝑅𝑅2
− + 𝑀𝑀
3 3 3 3

22
5
g. The negative number in the objective row which is − 3.now 𝑠𝑠2 column become the

next pivot column. Calculate the 𝜃𝜃 values.


Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value 𝜽𝜽 value
variable
𝒔𝒔𝟏𝟏 5 0 1 4 4 10 10 4 5
− ÷ =
3 3 3 3 3 3 2
𝒚𝒚 1 1 0 1 1 2 2 1
− ÷ �− � = −2
3 3 3 3 3 3
𝑷𝑷 2 0 0 5 5 10
− + 𝑀𝑀
3 3 3 3

h. Select the smallest positive 𝜃𝜃 value. Divide all the elements in first row by the
pivot to become pivot row.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value Row operation
variable
𝒔𝒔𝟐𝟐 5 0 3 1 -1 5 4
𝑅𝑅1 ÷
4 4 2 3
𝒚𝒚 1 1 0 1 1 2

3 3 3 3
𝑷𝑷 2 0 0 5 5 10
− + 𝑀𝑀
3 3 3 3

i. Use the pivot row to eliminate 𝑠𝑠2 from each of the other rows.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value Row operation
variable
𝒔𝒔𝟐𝟐 5 0 3 1 -1 5
4 4 2
𝒚𝒚 3 1 1 0 0 3 1
𝑅𝑅2 + 𝑅𝑅1
4 4 2 3
𝑷𝑷 11 0 5 0 𝑀𝑀 15 5
𝑅𝑅3 + 𝑅𝑅1
4 4 2 3

23
xii. There are no negative values in the objective row, so the optimal solution has
been found.
Basic 𝒙𝒙 𝒚𝒚 𝒔𝒔𝟏𝟏 𝒔𝒔𝟐𝟐 𝒂𝒂𝟏𝟏 Value
variable
𝒔𝒔𝟐𝟐 5 0 3 1 -1 5
4 4 2
𝒚𝒚 3 1 1 0 0 3
4 4 2
𝑷𝑷 11 0 5 0 𝑀𝑀 15
4 4 2

As a conclusion, the maximum value of 𝑃𝑃 is 7.5. This occurs when 𝑠𝑠2 = 2.5, 𝑦𝑦 = 1.5
where else 𝑥𝑥 = 𝑠𝑠1 = 0

24

You might also like