Linear Programming Problems
Linear Programming Problems
Programming
Problems
Graphical Method
Example - designing a diet
A dietitian wants to design a breakfast menu for
certain hospital patients. The menu is to
include two items A and B. Suppose that
each ounce of A provides 2 units of vitamin C
and 2 units of iron and each ounce of B provides
1 unit of vitamin C and 2 units of iron. Suppose
the cost of A is 4$/ounce and the cost of B is
3$/ounce. If the breakfast menu must provide
at least 8 units of vitamin C and 10 units of iron,
how many ounces of each item should be
provided in order to meet the iron and vitamin C
requirements for the least cost? What will this
breakfast cost?
x = #oz. of A
y = #oz. of B
vit. C: 2x + y ≥
8 iron: 2x + 2y
≥10
x ≥ 0, y ≥ 0
Min z = 4x+3y
2x+y = 8 2x+2y = 10
If x=0,then y=8 If x=0,then y=10/2=5
If y =0 then x=8/2=4 If y =0 then x=10/2=5
Finally (4,8) Finally (5,5)
vit. C: 2x + y ≥
vit. c 8 iron:2x + 2y ≥10
x ≥ 0, y ≥ 0
Cost = C = 4x+3y
vit. C: 2x + y ≥
vit. c 8 iron:2x + 2y ≥10
x ≥ 0, y ≥ 0
Cost = C = 4x+3y
iron
vit. C: 2x + y ≥
vit. c 8 iron:2x + 2y ≥10
x ≥ 0, y ≥ 0
Cost = C = 4x+3y
iron
vit. C: 2x + y ≥
vit. c 8 iron:2x + 2y ≥10
x ≥ 0, y ≥ 0
iron
corner pt. C = 4x + 3y
vit. c (0,8)
(5,0)
(3,2)
iron
vit. C: 2x + y ≥
vit. c 8 iron:2x + 2y ≥10
x ≥ 0, y ≥ 0
2x + y = 8
2x + 2y = 10
Solution: x=3, y=2
C = 4x + 3y = 18$
iron
Example - bicycle factories
A small business makes 3-speed and 10-speed
bicycles at two different factories. Factory A
produces 16 3-speed and 20 10-speed bikes in
one day while factory B produces 12 3-speed
and 20 10-speed bikes daily. It costs
$1000/day to operate factory A and $800/day
to operate factory B. An order for 96
3-speed bikes and 140 10-speed bikes has
just arrived.
How many days should each factory be
operated in order to fill this order at a minimum
cost? What is the minimum cost?
Sub to:
16x + 12y ≥ 96
20x + 20y ≥140
x ≥ 0, y ≥ 0
x = # days factory A is operated
y = # days factory B is operated
3-speed constraint: 16x + 12y ≥ 96
10-speed constraint: 20x + 20y ≥140
x ≥ 0, y ≥ 0
Minimize: C = 1000x + 800y
3-speed
10-speed
x = # days factory A is operated
y = # days factory B is operated
3-speed constraint: 16x + 12y ≥ 96
10-speed constraint: 20x + 20y ≥140
x ≥ 0, y ≥ 0
Minimize: C = 1000x + 800y
3-speed
10-speed
x = # days factory A is operated
y = # days factory B is operated
3-speed constraint: 16x + 12y ≥ 96
10-speed constraint: 20x + 20y ≥140
x ≥ 0, y ≥ 0
Minimize: C = 1000x + 800y
3-speed
10-speed
x = # days factory A is operated
y = # days factory B is operated
3-speed constraint: 16x + 12y ≥ 96
10-speed constraint: 20x + 20y ≥140
x ≥ 0, y ≥ 0
Minimize: C = 1000x + 800y
3-speed
10-speed
x = # days factory A is operated
y = # days factory B is operated
3-speed constraint: 16x + 12y ≥ 96
10-speed constraint: 20x + 20y ≥140
x ≥ 0, y ≥ 0
Minimize: C = 1000x + 800y
cutting: 2x + 2y ≤ 140
shaping: x + 2y ≤ 120
finishing: 3x + y ≤ 150
x≥0,y≥0
Max Z = 10x + 8y
x = # table
y = # bed
cutting: 2x + 2y = 140
shaping: x + 2y = 120
finishing: 3x + y = 150
x≥0,y≥0
P = 10x + 8y
2X+2Y=140
If X=0,
2(0)+2y=140, 2Y=140,
Y=140/2= 70
If Y=0, 2X+0=140
X=140/2= 70
cutting
x = # table
y = # bed
cutting: 2x + 2y = 140
shaping: x + 2y = 120
finishing: 3x + y = 150
x≥0,y≥0
P = 10x + 8y
X+2Y=120, If X=0
0+2Y=120, Y=120/2= 60
IF Y=0, X+0=120, X=120
shaping
cutting
x = # table
y = # bed
cutting: 2x + 2y = 140
shaping: x + 2y = 120
finishing: 3x + y = 150 x
≥0,y≥0
finishing P = 10x + 8y
3X+Y=150, IF X=0
0+Y=150, Y =150
IF Y=0, 3X+0=150
X=150/3= 50
shaping
cutting
x = # table
y = # bed
shaping
cutting
x = # table
y = # bed
shaping
cutting
x = # table
y = # bed