0% found this document useful (0 votes)
50 views

Linear Programming: Dr.N.Sabu Department of Mathematics Indian Institute of Space Science and Technology

The document discusses the optimization technique of linear programming. It provides two examples of linear programming problems - one involving minimizing transportation costs for distributing products between cities, and another involving maximizing profits from manufacturing two furniture models. Linear programming problems are formulated as minimizing a linear cost function subject to linear inequality constraints, and can be solved using optimization solvers.

Uploaded by

AnantDashpute
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)
50 views

Linear Programming: Dr.N.Sabu Department of Mathematics Indian Institute of Space Science and Technology

The document discusses the optimization technique of linear programming. It provides two examples of linear programming problems - one involving minimizing transportation costs for distributing products between cities, and another involving maximizing profits from manufacturing two furniture models. Linear programming problems are formulated as minimizing a linear cost function subject to linear inequality constraints, and can be solved using optimization solvers.

Uploaded by

AnantDashpute
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/ 48

Linear Programming

Dr.N.Sabu
Department of Mathematics
Indian Institute of Space Science and Technology

September 11, 2020


References

E.K.P.Chang and S.H.Zak, An introduction to Optimization


D.G.Luenberger and Y.Ye, Linear and Nonlinear programming
References

E.K.P.Chang and S.H.Zak, An introduction to Optimization


D.G.Luenberger and Y.Ye, Linear and Nonlinear programming
Evaluation:

Two quizes: 15x2=30 Marks


Three assignments: 10 Marks
Programming assignments: 10 Marks
End sem: 50 Marks
A manufacturing company has plants in cities A, B and C.
Company produces and distributes products in various cities.
On a particular day the company has 30 units of products in
A, 40 units in B and 30 in C. The company plans to shift 20
units to D, 20 to E, 25 to F and 35 to G following order from
dealers. The transportation cost per unit of each product
between cities is given below.
A manufacturing company has plants in cities A, B and C.
Company produces and distributes products in various cities.
On a particular day the company has 30 units of products in
A, 40 units in B and 30 in C. The company plans to shift 20
units to D, 20 to E, 25 to F and 35 to G following order from
dealers. The transportation cost per unit of each product
between cities is given below.
D E F G Supply

10 8 30
A 7 14

B 11 12 6 40
7

5 8 15 9 30
C
Demand 20 25 35 100
20

Formulate the problem to minimize the transportation cost.


Let A, B C denotes origin 1, 2, 3 and D, E, F, G denotes
destination 1, 2, 3, 4 resp.
Let A, B C denotes origin 1, 2, 3 and D, E, F, G denotes
destination 1, 2, 3, 4 resp.
Let xij denote the quantities to be transported from origin
i(=1, 2, 3) to destination j(1, 2, 3, 4). Then the problem
reduces to minimizing the transportation cost
Let A, B C denotes origin 1, 2, 3 and D, E, F, G denotes
destination 1, 2, 3, 4 resp.
Let xij denote the quantities to be transported from origin
i(=1, 2, 3) to destination j(1, 2, 3, 4). Then the problem
reduces to minimizing the transportation cost
z = 7x11 + 10x12 + 14x13 + 8x14 + 7x21 + 11x22 + 12x23 +
6x24 + 5x31 + 8x32 + 15x33 + 9x34
Let A, B C denotes origin 1, 2, 3 and D, E, F, G denotes
destination 1, 2, 3, 4 resp.
Let xij denote the quantities to be transported from origin
i(=1, 2, 3) to destination j(1, 2, 3, 4). Then the problem
reduces to minimizing the transportation cost
z = 7x11 + 10x12 + 14x13 + 8x14 + 7x21 + 11x22 + 12x23 +
6x24 + 5x31 + 8x32 + 15x33 + 9x34

x11 + x12 + x13 + x14 = 30


x21 + x22 + x23 + x24 = 40
x31 + x32 + x33 + x34 = 30
x11 + x21 + x31 = 20
x12 + x22 + x32 = 20
x13 + x23 + x33 = 25
x14 + x24 + x34 = 35
This can be written as
 
x11

 x12 


 x13 


 x14 


 x21 

 x22
 
7 10 14 8 7 11 12 6 5 8 15 9 
 
x23

 
x24
 
 

x31

 
 
 x32 
 
 x33 
x34
 
x11

 x12 

 x13  
1 1 1 1 0 0 0 0 0 0 0 0 30
   
 x14 
 0 0 0 0 1 1 1 1 0 0 0 0    40 
  x21   
0 0 0 0 0 0 0 0 1 1 1 1  30
   
 x22
   
1 0 0 0 1 0 0 0 1 0 0 0  = 20
   
  x23 
0 1 0 0 0 1 0 0 0 1 0 0  20
   
 x24
   
0 0 1 0 0 0 1 0 0 0 1 0  25
   

x31

0 0 0 1 0 0 0 1 0 0 0 1 35
 
 
 x32 
 
 x33 
x34

M in : C t X; sub : AX = b, Xi ≥ 0
A furniture maker has 6 units of wood and 28 hours of free
time in a week. Two models have been sold in past so that he
wishes to restrict himself to these two. According to his
estimate model 1 requires 2 units of wood and 7 hours of time
while model 2 requires 1 unit of wood and 8 hours of time.
Prot from the model 1 and 2 are Rs:120 and Rs:80
resp.Formulate the problem to maximize the prot.
A furniture maker has 6 units of wood and 28 hours of free
time in a week. Two models have been sold in past so that he
wishes to restrict himself to these two. According to his
estimate model 1 requires 2 units of wood and 7 hours of time
while model 2 requires 1 unit of wood and 8 hours of time.
Prot from the model 1 and 2 are Rs:120 and Rs:80
resp.Formulate the problem to maximize the prot.
Let x1 and x2 denote the number of model 1 and 2 resp.
A furniture maker has 6 units of wood and 28 hours of free
time in a week. Two models have been sold in past so that he
wishes to restrict himself to these two. According to his
estimate model 1 requires 2 units of wood and 7 hours of time
while model 2 requires 1 unit of wood and 8 hours of time.
Prot from the model 1 and 2 are Rs:120 and Rs:80
resp.Formulate the problem to maximize the prot.
Let x1 and x2 denote the number of model 1 and 2 resp.
Then the problem is: Maz: z = 120x1 + 80x2
Sub: 2x1 + x2 ≤ 6, 7x1 + 8x2 ≤ 28, xi ≥ 0
A furniture maker has 6 units of wood and 28 hours of free
time in a week. Two models have been sold in past so that he
wishes to restrict himself to these two. According to his
estimate model 1 requires 2 units of wood and 7 hours of time
while model 2 requires 1 unit of wood and 8 hours of time.
Prot from the model 1 and 2 are Rs:120 and Rs:80
resp.Formulate the problem to maximize the prot.
Let x1 and x2 denote the number of model 1 and 2 resp.
Then the problem is: Maz: z = 120x1 + 80x2
Sub: 2x1 + x2 ≤ 6, 7x1 + 8x2 ≤ 28, xi ≥ 0
This is of the form
Min: C t X; sub : AX ≤ b, X i ≥ 0   
120 2 1 6
where C = , A= , b=
80 7 8 28
In a hospital meals are served to patients twice a day. Each
gram of rst meal contains 10 units of protein and 20 units of
vitamins whereas each gram of second meal contains 15 units
of protein and 15 units of vitamins. In a day's meal a patient
should get 50 units of vitamin and 60 units of protein.
Determine the amount of meals to minimize the cost when
meal 1 cost RS:0.025 per gram and meal 2 cost Rs: 0.02 per
gram.
In a hospital meals are served to patients twice a day. Each
gram of rst meal contains 10 units of protein and 20 units of
vitamins whereas each gram of second meal contains 15 units
of protein and 15 units of vitamins. In a day's meal a patient
should get 50 units of vitamin and 60 units of protein.
Determine the amount of meals to minimize the cost when
meal 1 cost RS:0.025 per gram and meal 2 cost Rs: 0.02 per
gram.
Let x1 and x2 denote the number of grams of meal 1 and 2
resp.
In a hospital meals are served to patients twice a day. Each
gram of rst meal contains 10 units of protein and 20 units of
vitamins whereas each gram of second meal contains 15 units
of protein and 15 units of vitamins. In a day's meal a patient
should get 50 units of vitamin and 60 units of protein.
Determine the amount of meals to minimize the cost when
meal 1 cost RS:0.025 per gram and meal 2 cost Rs: 0.02 per
gram.
Let x1 and x2 denote the number of grams of meal 1 and 2
resp.
Then the problem is: Min: z = 0.025x1 + 0.02x2
Sub: 10x1 + 15x2 ≥ 60, 20x1 + 15x2 ≥ 50, xi ≥ 0
In a hospital meals are served to patients twice a day. Each
gram of rst meal contains 10 units of protein and 20 units of
vitamins whereas each gram of second meal contains 15 units
of protein and 15 units of vitamins. In a day's meal a patient
should get 50 units of vitamin and 60 units of protein.
Determine the amount of meals to minimize the cost when
meal 1 cost RS:0.025 per gram and meal 2 cost Rs: 0.02 per
gram.
Let x1 and x2 denote the number of grams of meal 1 and 2
resp.
Then the problem is: Min: z = 0.025x1 + 0.02x2
Sub: 10x1 + 15x2 ≥ 60, 20x1 + 15x2 ≥ 50, xi ≥ 0
This is of the form
Min: C t X; sub : AX ≥ b, Xi ≥ 0
Standard form of LPP:
Standard form of LPP:
Consider the problem
Min: z = C t X = c1 x1 + c2 x2 + ... + cn xn
Sub: AX ≤ b
i.e, a11 x1 + ... + a1n xn ≤ b1
...............................
...............................
am1 x1 + ... + amn xn ≤ bm
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 = b1
...............................
...............................
am1 x1 + ... + amn xn + ym = bm
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 = b1
...............................
...............................
am1 x1 + ... + amn xn + ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 = b1
...............................
...............................
am1 x1 + ... + amn xn + ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 + 0.y2 + ..... + 0.ym = b1
...............................
...............................
am1 x1 + ... + amn xn + 0.y1 + 0.y2 + .... + ym = bm
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 = b1
...............................
...............................
am1 x1 + ... + amn xn + ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 + 0.y2 + ..... + 0.ym = b1
...............................
...............................
am1 x1 + ... + amn xn + 0.y1 + 0.y2 + .... + ym = bm
Thus the problem becomes:
Min: (C t , 0)(X, Y ),
Sub: (A, Im )(X, Y ) = b, Xi , Yi ≥ 0
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 = b1
...............................
...............................
am1 x1 + ... + amn xn + ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn + y1 + 0.y2 + ..... + 0.ym = b1
...............................
...............................
am1 x1 + ... + amn xn + 0.y1 + 0.y2 + .... + ym = bm
Thus the problem becomes:
Min: (C t , 0)(X, Y ),
Sub: (A, Im )(X, Y ) = b, Xi , Yi ≥ 0
This is called the standard form of LPP. The variables yi0 s are
called slack variables.
Standard form of LPP:
Standard form of LPP:
Consider the problem
Min: z = C t X = c1 x1 + c2 x2 + ... + cn xn
Sub: AX ≥ b
i.e, a11 x1 + ... + a1n xn ≤ b1
...............................
...............................
am1 x1 + ... + amn xn ≤ bm
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 = b1
...............................
...............................
am1 x1 + ... + amn xn − ym = bm
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 = b1
...............................
...............................
am1 x1 + ... + amn xn − ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 = b1
...............................
...............................
am1 x1 + ... + amn xn − ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 − 0.y2 − ..... − 0.ym = b1
...............................
...............................
am1 x1 + ... + amn xn − 0.y1 − 0.y2 − .... − ym = bm
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 = b1
...............................
...............................
am1 x1 + ... + amn xn − ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 − 0.y2 − ..... − 0.ym = b1
...............................
...............................
am1 x1 + ... + amn xn − 0.y1 − 0.y2 − .... − ym = bm
Thus the problem becomes:
Min: (C t , 0)(X, Y ),
Sub: (A, −Im )(X, Y ) = b, Xi , Yi ≥ 0
This is equivalent to
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 = b1
...............................
...............................
am1 x1 + ... + amn xn − ym = bm
This can be written as
Min: c1 x1 + ... + cn xn + 0.y1 + 0.y2 + ... + 0.ym
Sub: a11 x1 + ... + a1n xn − y1 − 0.y2 − ..... − 0.ym = b1
...............................
...............................
am1 x1 + ... + amn xn − 0.y1 − 0.y2 − .... − ym = bm
Thus the problem becomes:
Min: (C t , 0)(X, Y ),
Sub: (A, −Im )(X, Y ) = b, Xi , Yi ≥ 0
This is called the standard form of LPP. The variables yi0 s are
called surplus variables.
Write the following problem in standard form
Max: x2 − x1 , sub : 3x1 = x2 − 5, −2 ≤ x2 ≤ 2
Write the following problem in standard form
Max: x2 − x1 , sub : 3x1 = x2 − 5, −2 ≤ x2 ≤ 2
Solution: Min: x1 − x2
Sub: 3x1 − x2 = −5 ⇒ x2 − 3x1 = 5
−2 ≤ x2 ≤ 2 ⇒ x2 ≤ 2 and − x2 ≤ 2
⇒ x2 + x3 = 2, and − x2 + x4 = 2
Write the following problem in standard form
Max: x2 − x1 , sub : 3x1 = x2 − 5, −2 ≤ x2 ≤ 2
Solution: Min: x1 − x2
Sub: 3x1 − x2 = −5 ⇒ x2 − 3x1 = 5
−2 ≤ x2 ≤ 2 ⇒ x2 ≤ 2 and − x2 ≤ 2
⇒ x2 + x3 = 2, and − x2 + x4 = 2
Note that any real number can be written as the dierence of
two positive numbers.
Hence we take x2 = u − v, u, v > 0
Write the following problem in standard form
Max: x2 − x1 , sub : 3x1 = x2 − 5, −2 ≤ x2 ≤ 2
Solution: Min: x1 − x2
Sub: 3x1 − x2 = −5 ⇒ x2 − 3x1 = 5
−2 ≤ x2 ≤ 2 ⇒ x2 ≤ 2 and − x2 ≤ 2
⇒ x2 + x3 = 2, and − x2 + x4 = 2
Note that any real number can be written as the dierence of
two positive numbers.
Hence we take x2 = u − v, u, v > 0
Since −2 ≤ x2 ≤ 2 and 3x1 = x2 − 5, it follows that x1 ≤ 0
Let w = −x1 ≥ 0
Write the following problem in standard form
Max: x2 − x1 , sub : 3x1 = x2 − 5, −2 ≤ x2 ≤ 2
Solution: Min: x1 − x2
Sub: 3x1 − x2 = −5 ⇒ x2 − 3x1 = 5
−2 ≤ x2 ≤ 2 ⇒ x2 ≤ 2 and − x2 ≤ 2
⇒ x2 + x3 = 2, and − x2 + x4 = 2
Note that any real number can be written as the dierence of
two positive numbers.
Hence we take x2 = u − v, u, v > 0
Since −2 ≤ x2 ≤ 2 and 3x1 = x2 − 5, it follows that x1 ≤ 0
Let w = −x1 ≥ 0
Then the problem becomes
Min −w − (u − v);
Sub : 3w + u − v = 5, u − v + x3 = 2, u − v + x4 =
2, w, u, v, x3 , x4 ≥ 0
Solve the problem graphically:
Max: z = x1 + x2
Sub: 2x1 + 3x2 ≤ 6, x1 − x2 ≤ 1, x1 , x2 ≥ 0
Solve the problem graphically:
Max: z = x1 + x2
Sub: 2x1 + 3x2 ≤ 6, x1 − x2 ≤ 1, x1 , x2 ≥ 0
(0, 2)

(9/5, 4/5)

(0, 0)
(1, 0)
Solve the problem graphically:
Max: z = x1 + x2
Sub: 2x1 + 3x2 ≤ 6, x1 − x2 ≤ 1, x1 , x2 ≥ 0
(0, 2)

(9/5, 4/5)

(0, 0)
(1, 0)
The vertices of the polygonal regions are (0, 0), (1, 0), (9/5,
4/5) and (0, 2).
z(0, 0) = 0, z(1, 0) = 1, z(0, 2) = 2, z(9/5, 4/5) = 2.6.
Hence Max vale=2 is attained at (9/5, 4/5)
Solve the problem graphically:
Max: z = 2x1 + 5x2
Sub: x1 + x2 ≤ 11, 2x1 + 5x2 ≤ 40, x1 ≥ 0, x2 ≥ 4
Solve the problem graphically:
Max: z = 2x1 + 5x2
Sub: x1 + x2 ≤ 11, 2x1 + 5x2 ≤ 40, x1 ≥ 0, x2 ≥ 4

(0, 8)
(5, 6)

(0, 4)
(7,4)

(0, 0)
Solve the problem graphically:
Max: z = 2x1 + 5x2
Sub: x1 + x2 ≤ 11, 2x1 + 5x2 ≤ 40, x1 ≥ 0, x2 ≥ 4

(0, 8)
(5, 6)

(0, 4)
(7,4)

(0, 0)

The vertices of the polygonal regions are (0, 4), (7, 4), (5, 6)
and (0, 8).
z(0, 4) = 20, z(7, 4) = 34, z(5, 6) = 40, z(0, 8) = 40.
Hence Max vale=40 is attained at two points (5, 6) and (0, 8)
Solve the problem graphically:
Max: z = 2x1 + 5x2
Sub: x1 + x2 ≤ 11, 2x1 + 5x2 ≤ 40, x1 ≥ 0, x2 ≥ 4

(0, 8)
(5, 6)

(0, 4)
(7,4)

(0, 0)

The vertices of the polygonal regions are (0, 4), (7, 4), (5, 6)
and (0, 8).
z(0, 4) = 20, z(7, 4) = 34, z(5, 6) = 40, z(0, 8) = 40.
Hence Max vale=40 is attained at two points (5, 6) and (0, 8)
Any point in the line segment joining (5, 6) and (0, 8) is of
the form λ(5, 6) + (1 − λ)(0, 8) = (5λ, 8 − 2λ).
Solve the problem graphically:
Max: z = 2x1 + 5x2
Sub: x1 + x2 ≤ 11, 2x1 + 5x2 ≤ 40, x1 ≥ 0, x2 ≥ 4

(0, 8)
(5, 6)

(0, 4)
(7,4)

(0, 0)

The vertices of the polygonal regions are (0, 4), (7, 4), (5, 6)
and (0, 8).
z(0, 4) = 20, z(7, 4) = 34, z(5, 6) = 40, z(0, 8) = 40.
Hence Max vale=40 is attained at two points (5, 6) and (0, 8)
Any point in the line segment joining (5, 6) and (0, 8) is of
the form λ(5, 6) + (1 − λ)(0, 8) = (5λ, 8 − 2λ).
Show that z(5λ, 8 − 2λ) = 40

You might also like