0% found this document useful (0 votes)
5 views19 pages

L04 Linear Problem

The document discusses Linear Problems (LP) and presents a general system of equations, including pivotal and non-pivotal variables. It illustrates the process of solving a linear problem with examples and highlights the concept of basic solutions. Additionally, it emphasizes the complexity of finding solutions for various combinations of variables and equations.

Uploaded by

surajitdas06
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)
5 views19 pages

L04 Linear Problem

The document discusses Linear Problems (LP) and presents a general system of equations, including pivotal and non-pivotal variables. It illustrates the process of solving a linear problem with examples and highlights the concept of basic solutions. Additionally, it emphasizes the complexity of finding solutions for various combinations of variables and equations.

Uploaded by

surajitdas06
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/ 19

Linear Problem (LP)

g
a rin
rjy ee
at ha in
ah tac eng
uw at il
G h iv
IT r B r C

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
Prof. Dr. Rajib Kumar Bhattacharjya
of ion
Pr zat

PT
i
im
O
pt Professor
Department of Civil Engineering
IIT Guwahati
Email: [email protected]

14 July 2021 1
Linear Problem (LP) General system of equations

𝑎11 𝑥1 + 𝑎12 𝑥2 + 𝑎13 𝑥3 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1


𝑎21 𝑥1 + 𝑎22 𝑥2 + 𝑎23 𝑥3 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2

g
Pivotal variables

a rin
rjy ee
𝑎31 𝑥1 + 𝑎32 𝑥2 + 𝑎33 𝑥3 + ⋯ + 𝑎3𝑛 𝑥𝑛 = 𝑏3

at ha in
ah tac eng
⋮ ⋮ ⋮ Non pivotal variables

uw at il
G h iv
IT r B r C

i
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥1 + 𝑎𝑚3 𝑥1 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚

, I ma fo
Constants

EL Ku ds
o
N ajib eth
And 𝑛 > 𝑚

.R m
of ion
Pr zat

PT
′ ′
1𝑥1 + 0𝑥2 + ⋯ + 0𝑥𝑚 + 𝑎1𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1′
i
im
pt
O
′ ′
0𝑥1 + 1𝑥2 + ⋯ + 0𝑥𝑚 + 𝑎2𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2′
′ ′
0𝑥1 + 0𝑥2 + ⋯ + 0𝑥𝑚 + 𝑎3𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎3𝑛 𝑥𝑛 = 𝑏3′
⋮ ⋮ ⋮
′ ′ 𝑥 ′
0𝑥1 + 0𝑥2 + ⋯ + 1𝑥𝑚 + 𝑎𝑚𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎𝑚𝑛 𝑛 = 𝑏𝑚
Rajib Bhattacharjya, IITG
Linear Problem (LP) General system of equations
′ ′
1𝑥1 + 0𝑥2 + ⋯ + 0𝑥𝑚 + 𝑎1𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1′
′ ′
0𝑥1 + 1𝑥2 + ⋯ + 0𝑥𝑚 + 𝑎2𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2′
′ ′
0𝑥1 + 0𝑥2 + ⋯ + 0𝑥𝑚 + 𝑎3𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎3𝑛 𝑥𝑛 = 𝑏3′

g
a rin
rjy ee
⋮ ⋮ ⋮

at ha in
ah tac eng
′ ′ 𝑥 ′
0𝑥1 + 0𝑥2 + ⋯ + 1𝑥𝑚 + 𝑎𝑚𝑚+1 𝑥𝑚+1 + ⋯ + 𝑎𝑚𝑛 = 𝑏𝑚

uw at il
𝑛

G h iv
IT r B r C

i
, I ma fo
EL Ku ds
One solution can be deduced from the system of equations are

o
N ajib eth
.R m
of ion
𝑥𝑖 = 𝑏𝑖′ For 𝑖 = 1,2,3, … , 𝑚

Pr zat

PT
i
im
pt
𝑥𝑖 = 0 For 𝑖 = 𝑚 + 1, 𝑚 + 2, 𝑚 + 3, … , 𝑛
O

This solution is called basis solution


Basic variable 𝑥𝑖 𝑖 = 1,2,3, … , 𝑚
Non basic variable 𝑥𝑖
Rajib Bhattacharjya, IITG
𝑖 = 𝑚 + 1, 𝑚 + 2, 𝑚 + 3, … , 𝑛
Linear Problem (LP) General system of equations
Now let’s solve a problem
2𝑥1 + 3𝑥2 − 2𝑥3 − 7𝑥4 = 1 𝑅00

g
a rin
𝑥1 + 𝑥2 + 𝑥3 + 3𝑥4 = 6 𝑅10

rjy ee
at ha in
ah tac eng
𝑥1 − 𝑥2 + 𝑥3 + 5𝑥4 = 4 𝑅20

uw at il
G h iv
IT r B r C

i
, I ma fo
EL Ku ds
3 7 1 1

o
N ajib eth
𝑥1 + 𝑥2 − 𝑥3 − 𝑥4 = 𝑅01 = 𝑅00

.R m
2 2 2 2

of ion
Pr zat

PT
i
1 13 11 im
pt
O

0 − 𝑥2 + 2𝑥3 + 𝑥4 = 𝑅11 = 𝑅10 − 𝑅01


2 2 2
5 17 7
0 − 𝑥2 + 2𝑥3 + 𝑥4 = 𝑅21 = 𝑅20 − 𝑅01
2 2 2
Rajib Bhattacharjya, IITG
Linear Problem (LP) General system of equations

3
𝑥1 + 0 + 5𝑥3 + 16𝑥4 = 17 𝑅02 = 𝑅12 − 𝑅12
2

g
a rin
rjy ee
at ha in
0 + 𝑥2 − 4𝑥3 − 13𝑥4 = −11 𝑅12 = −2𝑅11

ah tac eng
uw at il
G h iv
5

IT r B r C

i
𝑅22 = 𝑅12 + 𝑅12

, I ma fo
0 + 0 − 8𝑥3 −24𝑥4 = −24

EL Ku ds
2

o
N ajib eth
.R m
of ion
Pr zat

PT
𝑥1 + 0 + 0 + 𝑥4 = 2 𝑅03 = 𝑅02 − 5𝑅23
i
im
pt
O

0 + 𝑥2 + 0 − 𝑥4 = 1 𝑅13 = 𝑅12 +4𝑅23


1
0 + 0 + 𝑥3 + 3𝑥4 = 3 𝑅23 = − 𝑅22
8
Rajib Bhattacharjya, IITG
Linear Problem (LP) General system of equations

Solution of the problem is

g
a rin
rjy ee
𝑥1 = 2 − 𝑥4

at ha in
ah tac eng
uw at il
G h iv
IT r B r C
𝑥2 = 1 + 𝑥4

i
, I ma fo
EL Ku ds
o
N ajib eth
𝑥3 = 3 − 3𝑥4

.R m
of ion
Pr zat

PT
i
im
The solution obtain by setting independent variable equal to zero is
pt
O

called basic solution.

𝑥1 = 2 𝑥2 = 1 𝑥3 = 3
Rajib Bhattacharjya, IITG
Linear Problem (LP) General system of equations

2𝑥1 + 3𝑥2 − 2𝑥3 − 7𝑥4 = 1 2𝑥1 + 3𝑥2 − 2𝑥3 − 7𝑥4 = 1


𝑥1 + 𝑥2 + 𝑥3 + 3𝑥4 = 6 𝑥1 + 𝑥2 + 𝑥3 + 3𝑥4 = 6

g
a rin
𝑥1 − 𝑥2 + 𝑥3 + 5𝑥4 = 4 𝑥1 − 𝑥2 + 𝑥3 + 5𝑥4 = 4

rjy ee
at ha in
ah tac eng
uw at il
G h iv
𝑥1 = 2, 𝑥2 = 1, 𝑥3 = 3, 𝑥4 = 0 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 0, 𝑥4 = 1

IT r B r C

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
of ion
Pr zat

PT
2𝑥1 + 3𝑥2 − 2𝑥3 − 7𝑥4 = 1 2𝑥1 + 3𝑥2 − 2𝑥3 − 7𝑥4 = 1
i
im
pt
O
𝑥1 + 𝑥2 + 𝑥3 + 3𝑥4 = 6 𝑥1 + 𝑥2 + 𝑥3 + 3𝑥4 = 6
𝑥1 − 𝑥2 + 𝑥3 + 5𝑥4 = 4 𝑥1 − 𝑥2 + 𝑥3 + 5𝑥4 = 4

𝑥1 = 3, 𝑥2 = 0, 𝑥3 = 6, 𝑥4 = −1 𝑥1 = 0, 𝑥2 = 3, 𝑥3 = −3, 𝑥4 = 2
Rajib Bhattacharjya, IITG
Linear Problem (LP) General system of equations
𝑛 𝑛!
How many combinations? =
𝑚 𝑛 − 𝑚 ! 𝑚!

g
The problem we have just solved has 4 combinations

a rin
rjy ee
at ha in
ah tac eng
Now consider a problem of 10 variables and 8 equations, we will

uw at il
G h iv
IT r B r C
have 45 different combinations

i
, I ma fo
EL Ku ds
o
N ajib eth
If a problem of 15 variables and 10 equations, we will have 3003

.R m
of ion
different combinations

Pr zat

PT
i
im
pt
As such, it is not possible to find solutions for all the combinations
O

Moreover, many combinations, we may get infeasible solutions


As such we need some set of rules to switch from one feasible
solution another feasible solution
Rajib Bhattacharjya, IITG
Linear Problem (LP)

Now before discussing any method, let’s try to solve a problem


Minimize −𝑥1 − 2𝑥2 − 𝑥3

g
a rin
Subject to

rjy ee
at ha in
ah tac eng
2𝑥1 + 𝑥2 − 𝑥3 ≤ 2 2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 =2

uw at il
G h iv
IT r B r C

i
, I ma fo
2𝑥1 − 𝑥2 + 5𝑥3 ≤ 6 2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 =6

EL Ku ds
o
N ajib eth
.R m
4𝑥1 + 𝑥2 + 𝑥3 ≤ 6 4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 =6

of ion
Pr zat

PT
𝑥𝑖 ≥ 0 𝑖 = 1,2,3
i
im
pt
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0
O

The initial basic solution is 𝑥4 = 2 𝑥5 = 6 𝑥6 = 6 Basic variable


𝑥1 = 𝑥2 = 𝑥3 = 0 Non basic variable
Rajib Bhattacharjya, IITG 𝑓=0
Linear Problem (LP)
Now look at the objective function
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0

g
Is it an optimal solution?

a rin
rjy ee
at ha in
ah tac eng
Can we improve the objective function value by making one non basic

uw at il
G h iv
IT r B r C

i
variable as basic?

, I ma fo
EL Ku ds
o
N ajib eth
For this problem, all the coefficients of the objective function is

.R m
of ion
negative, as such making one of them as basic variable, we can

Pr zat

PT
i
im
improve (reduce) the objective value.
pt
O

However, making 𝑥2 as basic variable we will have maximum advantage


So, select the variable with minimum negative coefficient

Rajib Bhattacharjya, IITG


Linear Problem (LP)

In our problem, 𝑥2 is the new entering variable (basic variable)


Now, next question is which one will be pivoting element

g
a rin
rjy ee
at ha in
2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 = 2 2𝑥1 + 𝑥2 − 𝑥3 + 𝑥4 =2

ah tac eng
uw at il
G h iv
IT r B r C
2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 =6 4𝑥1 + 0𝑥2 + 4𝑥3 + 𝑥4 + 𝑥5 =8

i
, I ma fo
EL Ku ds
o
4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 = 6 2𝑥1 + 0𝑥2 + 2𝑥3 −𝑥4 + 𝑥6 =4

N ajib eth
.R m
of ion
Pr zat

PT
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0 3𝑥1 + 0𝑥2 − 3𝑥3 + 𝑥4 −𝑓 = 4
i
im
pt
O

The initial basic solution is 𝑥2 = 2 𝑥5 = 8 𝑥6 = 4 Basic variable


𝑥1 = 𝑥3 = 𝑥4 = 0 Non basic variable
Rajib Bhattacharjya, IITG
𝑓 = −4
Linear Problem (LP)

2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 = 2 4𝑥1 + 0𝑥2 + 4𝑥3 + 𝑥4 +𝑥5 =8

g
a rin
2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 = 6 −2𝑥1 + 𝑥2 − 5𝑥3 − 𝑥5 = −6

rjy ee
at ha in
ah tac eng
4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 = 6 6𝑥1 + 0𝑥2 + 6𝑥3 +𝑥5 + 𝑥6 = 12

uw at il
G h iv
IT r B r C

i
, I ma fo
EL Ku ds
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0 −5𝑥1 + 0𝑥2 − 11𝑥3 − 2𝑥5 − 𝑓 = −12

o
N ajib eth
.R m
of ion
Pr zat

PT
i
im
pt
O

The initial basic solution is 𝑥2 = −6 𝑥4 = 8 𝑥6 = 12 Basic variable


𝑥1 = 𝑥3 = 𝑥5 = 0 Non basic variable
Rajib Bhattacharjya, IITG
𝑓 = −12
Linear Problem (LP)

2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 = 2 −2𝑥1 + 0𝑥2 − 2𝑥3 + 𝑥4 −𝑥6 = −4

g
a rin
2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 =6 6𝑥1 + 0𝑥2 + 6𝑥3 + 𝑥5 + 𝑥6 = 12

rjy ee
at ha in
ah tac eng
4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 =6 4𝑥1 + 𝑥2 + 𝑥3 + 𝑥6 = 6

uw at il
G h iv
IT r B r C

i
, I ma fo
EL Ku ds
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0 7𝑥1 + 0𝑥2 + 𝑥3 + 2𝑥6 − 𝑓 = 12

o
N ajib eth
.R m
of ion
Pr zat

PT
i
im
pt
O

The initial basic solution is 𝑥2 = 6 𝑥4 = −4 𝑥5 = 12 Basic variable


𝑥1 = 𝑥3 = 𝑥6 = 0 Non basic variable
Rajib Bhattacharjya, IITG
𝑓 = +12
Linear Problem (LP)

2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 =2
2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 =6

g
a rin
4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 =6

rjy ee
at ha in
ah tac eng
Infeasible Infeasible

uw at il
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0

G h iv
solution solution

IT r B r C

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
𝑥2 = 2 𝑥5 = 8 𝑥6 = 4 𝑥2 = −6 𝑥4 = 8 𝑥6 = 12 𝑥2 = 6 𝑥4 = −4 𝑥5 = 12

of ion
Pr zat

PT
i
im 𝑥1 = 𝑥3 = 𝑥6 = 0
pt
𝑥1 = 𝑥3 = 𝑥4 = 0 𝑥1 = 𝑥3 = 𝑥5 = 0
O

𝑓 = −4 𝑓 = −12 𝑓 = +12

Now what is the rule, how to select the pivoting element?


Rajib Bhattacharjya, IITG
Linear Problem (LP)
What is the maximum value of 𝑥2 without making the solution negative?

2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 =2 𝑥2 = 2/1

g
a rin
rjy ee
at ha in
2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 =6

ah tac eng
uw at il
G h iv
IT r B r C
4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 =6 𝑥2 = 6/1

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
of ion
Select the minimum one to avoid infeasible solution

Pr zat

PT
i
im
pt
Thus the general rule is
O

𝑏𝑖
1. Calculate the ratio (For 𝑎𝑖𝑠 ≥ 0)
𝑎𝑖𝑠
∗ 𝑚𝑖𝑛𝑖𝑚𝑢𝑚 𝑏𝑖
2. Pivoting element is 𝑥𝑠 =
Rajib Bhattacharjya, IITG
𝑎𝑖𝑠 ≥ 0 𝑎𝑖𝑠
Linear Problem (LP)

2𝑥1 + 𝑥2 − 𝑥3 +𝑥4 =2
2𝑥1 − 𝑥2 + 5𝑥3 + 𝑥5 =6

g
a rin
rjy ee
4𝑥1 + 𝑥2 + 𝑥3 +𝑥6 =6

at ha in
ah tac eng
uw at il
−𝑥1 − 2𝑥2 − 𝑥3 −𝑓 = 0

G h iv
IT r B r C

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
of ion
Basic Variable

Pr zat

PT
f bi bi/aij
i
Variable x1 x2 x3 im
x4 x5 x6
pt
O

x4 2 1 -1 1 0 0 0 2 2
x5 2 -1 5 0 1 0 0 6
x6 4 1 1 0 0 1 0 6 6
f -1 -2 -1 0 0 0 -1 0
Rajib Bhattacharjya, IITG
Linear Problem (LP)
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 2 1 -1 1 0 0 0 2

g
a rin
x5 4 0 4 1 1 0 0 8 2

rjy ee
at ha in
ah tac eng
x6 2 0 2 -1 0 1 0 4 2

uw at il
G h iv
f 3 0 -3 2 0 0 -1 4

IT r B r C

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
Basic Variable

of ion
f bi bi/aij

Pr zat
Variable x1 x2 x3 x4 x5 x6

PT
i
x2 3 1 0 im1.25 0.25 0 0 4
pt
O

x3 1 0 1 0.25 0.25 0 0 2
x6 0 0 0 -1.5 -0.5 1 0 0
f 6 0 0 2.75 0.75 0 -1 10

Rajib Bhattacharjya, IITG


All 𝑐𝑗 are positive, so no improvement is possible
Linear Problem (LP)
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 2 1 -1 1 0 0 0 2

g
a rin
x5 4 0 4 1 1 0 0 8 2

rjy ee
at ha in
ah tac eng
x6 2 0 2 -1 0 1 0 4 2

uw at il
G h iv
f 3 0 -3 2 0 0 -1 4

IT r B r C

i
, I ma fo
EL Ku ds
o
N ajib eth
.R m
of ion
Basic Variable
f bi bi/aij

Pr zat

PT
Variable x1 x2 x3 x4 x5 x6
i
im
pt
O
x2 3 1 0 0.5 0 0.5 0 4
x5 0 0 0 3 1 -2 0 0
x3 1 0 1 -0.5 0 0.5 0 2
f 6 0 0 0.5 0 1.5 -1 10
Rajib Bhattacharjya, IITG Obtain the same solution
Rajib Bhattacharjya, IITG
Linear Problem (LP)

O
pt
im
i
Pr zat
of ion
.R m
N ajib eth
PT o
EL Ku ds
, I ma fo
IT r B r C
G h iv
uw at il
ah tac eng
at ha in
i rjy ee
a rin
g

You might also like