0% found this document useful (0 votes)
44 views10 pages

Methods To Solve System of Linear Equations-Operation Research

This document covers some methods to solve system of linear equations and finding their optimal solution.

Uploaded by

khizrababar99
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)
44 views10 pages

Methods To Solve System of Linear Equations-Operation Research

This document covers some methods to solve system of linear equations and finding their optimal solution.

Uploaded by

khizrababar99
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/ 10

COURSE: OPERATIONS RESEARCH

Difference between equality and inequality:


Equation Inequality

An equation represents a line. An inequality represents a region.

X=4 X <= 4

Graphical approach to solve system:


Feasible solution:

Any value that satisfy the system of inequalities form the feasible solution.

Infeasible solution:

Any value that does not satisfy any inequality from the system of inequalities form the infeasible
solution.

Extreme points:

Extreme points are the corner points that define your region.

Optimal solution:

Optimal solution is the best solution from your identified feasible solutions that meet your all
requirements or demands.

Question:
Maximize: z = 10x + 9y Objective Function

Subject to: 3x + 3y <= 21 Constraints


4x + 3y <= 24

x, y >= 0

Find the region:


𝑥 𝑦
Constrain1: +7=1
7

𝑥 𝑦
Constrain 2: +8=1
6

Graph:

Our region is the bounded area under


the points A, B, C, and D. B

A D

Corner Points: Calculating Point C:

A = (0,0) Since point C is the intersection of these two lines

B = (0,7) 3𝑥 + 3𝑦 = 21 𝑥=3

C = (3,4) 4𝑥 + 3𝑦 = 24 𝑦=4

D = (6,0) −𝑥 = −3
Feasible Solution:

𝑧𝐴 = 0
𝑧𝐵 = 60
𝑧𝐶 = 66
𝑧𝐷 = 54
Optimal Solution:

Since our objective is to maximize the function then 66 is the maximum value we obtain at point C.

Thus our optimal solution is 66 at point C.

Algebraic Method for Maximization


Maximize: z = 10x + 9y

Subject to: 3x + 3y <= 21

4x + 3y <= 24

x, y >= 0

Convert into standard linear programing problem (LPP): Note:

z = 10x + 9y + 0 S1 + 0 S2 S1 and S2 are slack variables and we


added them to balance the equation, as
3x + 3y + S1 = 21 we have changed the inequalities into
equalities.
4x + 3y + S2 = 24

x, y, S1, S2 >= 0

Concept of Basic and Non-Basic Variables:

 Basic Variables are those variables whose values you’re going to find.

 Non-Basic Variables are those variables whose values are fixed to zero.

No. Basic Non- Solution Objective Status


Variables Basic Function
Variables Values

1. S1 , S2 x,y=0 S1 = 21, S2 = 24 0 Feasible


2. x , S1 y , S2 = 0 x = 6 , S1= 3 60 Feasible
3. x , S2 y , S1 = 0 x = 7 , S2 = -4 - Infeasible
4. y , S1 x , S2 = 0 y = 8 , S1 = -3 - Infeasible
5. y , S2 x , S1 = 0 y = 7 , S2 = 3 54 Feasible
6. x,y S1,S2 = 0 x=3 , y =4 66 Feasible
Optimal Solution 66

Algebraic form of Simplex Method for Maximization


From standard form:

z = 10x + 9y + 0 S1 + 0 S2 z = 10x + 9y

3x + 3y + S1 = 21  S1 = 21 – 3x – 3y ------ (1)

4x + 3y + S2 = 24  S2 = 24 – 4x – 3y ------ (2)

For x = y = 0, we have S1 = 21 and S2 = 24 and thus z = 0.

Since co-efficient of x in objective function is higher, then our entering variable is “x”. Now
follow the procedure to find the leaving variable.

Entering variable = x
x=1 S1 = 18 S2 = 20
x=2 S1 = 15 S2 = 16
… … …
x=6 S1 = 3 S2 = 0
x=7 S1 = 0 S2 = -4
Leaving variable = S2

Now new system of equations will be;

From equation (2); S2 = 24 – 4x – 3y


3 1
x = 6 − 4 𝑦 − 4 𝑆2 ------- (3)

From equation (1); S1 = 21 – 3x – 3y


3 1
= 21 – 3[6 − 4 𝑦 − 4 𝑆2] – 3y
3 3
S1 = 3 − 4 𝑦 + 4 𝑆2 -------- (4)
Then, z = 10x + 9y
3 1
= 10 [6 − 4 𝑦 − 4 𝑆2] + 9y
3 5
z = 60 + 2
𝑦 − 2 𝑆2 --------- (5)

put y = S2 = 0 , then we have x = 6 and S1 = 3. Thus z = 60.

Since the co-efficient of y is higher in the objective function. Then our entering variable is “y”.

Entering variable = y
y=1 x = 21/4 S1 = 9/4
… … …
y=4 x=3 S1 = 0
Leaving variable = S1
Now the new system of equations is;

3 3
From equation (4); S1 = 3 − 𝑦 + 𝑆2
4 4

4
𝑦 = 4 − 3 𝑆1 + 𝑆2 --------- (7)

3 1
From equation (3); x = 6 − 4 𝑦 − 4 𝑆2

3 4 1
= 6 − 4 [ 4 − 3 𝑆1 + 𝑆2 ] − 4 𝑆2

x = 3 + S1 – S2 ---------- (8)

3 5
Then equation (5) becomes; z = 60 + 2
𝑦 − 2 𝑆2

3 4 5
= 60 + 2
[4 − 3 𝑆1 + 𝑆2] − 2 𝑆2

z = 66 – 2S1 – S2 --------- (9)


Put S1 = S2 = 0, then we have x = 3 and y = 4. Thus z = 66.

We cannot proceed further because the variables present in our objective function all are negative.

Thus our optimal solution is z = 66 for x = 3 and y = 4.

Stopping Criteria:

No positive coefficient of variables in objective function or you can say all negative coefficient variables
in the objective function.

Tabular form of Simplex Method for Maximization

Maximize: z = 10x + 9y + 0S1 + 0S2


Subject to: 3x + 3y + S1 = 21
4x + 3y + s2 = 24
x,y, S1 , S2 >= 0

CB XB x y S1 S2 Solution Ratio
0 S1 3 3 1 0 21 7
0 S2 4 3 0 1 24 6
Cj - Zj 10 9 0 0 0

0 S1 0 3/4 1 -3/4 3 4
10 x 1 3/4 0 1/4 6 8
Cj - Zj 0 3/2 0 -5/2 60

Simplex Method for Minimization

QUESTION: Solve the following problem of minimization by using Simplex Algorithm.


Minimize: z= 7x +5y
Subject to: x + y >= 4
5x + 2y >= 10
X + y >= 0
Solution:
Convert it into standardized form,
Minimize: z = 7x + 5y + 0S1 + 0S2 + MA1 + MA2
Subject to: x + y – S1 + A1 = 4
5x + 2y – S2 + A2 = 10
Where A1 and A2 are called as Artificial Variables. They are used to start Simplex algorithm. They
will not affect Objective function value. “M” is very large number that’s why it is also called as
BIG M METHOD. And S1 and S2 are surplus variables.
Since Simplex method is applicable for maximization problems so, we need to convert minimize
problem into a maximize problem in order to apply simplex algorithm. Then,
Maximize: - z = - 7x - 5y - 0S1 - 0S2 - MA1 - MA2
Subject to: x + y – S1 + A1 = 4
5x + 2y – S2 + A2 = 10

CB XB X Y S1 S2 A1 A2 Soln. Ratio
-M A1 1 1 -1 0 1 0 4 4
-M A2 5 2 0 -1 0 1 10 2
Cj - Zj 6M-7 3M-5 -M -M 0 0 -14M

-M A1 0 3/5 -1 1/5 1 -1/5 2 10/3


-7 X 1 2/5 0 -1/5 0 1/5 2 5
Cj - Zj 0 (3M-11)/5 -M (M-7)/5 0 (-6M+7)/5 -2M-14

-5 Y 0 1 -5/3 1/3 5/3 -1/3 10/3


-7 X 1 0 2/3 -1/3 -2/3 1/3 2/3
Cj - Zj 0 0 -11/3 -2/3 (-3M+11)/3 (-3M+2)/3 -64/3
From the table,

X = 2/3 , Y = 10/3

Maximized (-z) = -64/3

Where,

Minimized (z) = 64/3

And hence, we have the solution of z= 64/3 for our problem of minimization.

PRACTISE QUESTIONS
Q1: Maximize: Z= 2X + Y

Subject to: X – Y <= 10

2X <= 40

X, Y >=0

(This is a problem of unbounded solution also there exists no optimal solution in that case.)

Q2: Maximize: Z = 3X + 2Y

Subject to: 2X + Y <=2

3X + 4Y >= 12

X, Y >= 0

(This is a problem of infeasible solution because artificial variables are still present in the solution)

Primal Dual Method for Minimization


Here comes another method for solving problems of minimization.

HINT: Apply this method when you have all constraints with (>=) sign.
QUESTION:
Minimize: g = 20x + 30y + 36z
Subject to: x + 2y + 3z >=48
2x + 2y + 3z >= 70
2x + 3y + 4z >= 96
Solution:

1 2 3 48
2 2 3 70
2 3 4 96
20 30 36 g

Taking transpose and we get,


1 2 2 20
2 2 3 30
3 3 4 36
48 70 96 f

Maximize: f = 48X1 + 70X2 + 96X3

Subject to: X1 + 2X2 + 2X3 <= 20

2X1 + 2X2 + 3X3 <=30

3X1 + 3X2 + 4X3 <=36

48 70 96 0 0 0
Solution Ratio
CB XB X1 X2 X3 S1 S2 S3
0 S1 1 2 2 1 0 0 20 10
0 S2 2 2 3 0 1 0 30 10
0 S3 3 3 4 0 0 1 36 9
C j - Zj 48 70 96 0 0 0 0

0 S1 -1/2 1/2 0 1 0 -1/2 2


0 S2 -1/4 -1/4 0 0 1 -3/4 3
96 X3 ¾ 3/4 1 0 0 1/4 9
C j - Zj -24 -26 0 0 0 -24 864
Here,

Optimal Solution is,

X1 = X2 = 0 , X3 = 9
fmax = 864

whereas, for the original problem, we have optimal solution for,

X1 = X2 = 0 , X3 = 24

gmax = 864

You might also like