SlideShare a Scribd company logo
Faculty of Economics and Business Administration
Lebanese University
Chapter 1: Linear Programming
(Graphical Method)
Dr. Kamel ATTAR
attar.kamel@gmail.com
Lecture #2 F Thursday 4/MAR/2021 F
2Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
1 Linear Programming
Definition
Feasible Region and Optimal Solution
2 The Graphical Solution of Two-Variable L.P Problems
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
3 Examples
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
4 Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
3Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Definition
Feasible Region and Optimal Solution
H Linear programming H
Definition
A linear programming problem (LP) is an optimization problem for which we do the
following:
À We attempt to maximize (or minimize) a linear function of the decision variables.
The function that is to be maximized or minimized is called the objective function.
A function f(x1, x2, · · · , xn) is a linear function ⇐⇒ ∃c1, c2, · · · , cn , s.t.
f(x1, x2, · · · , xn) = c1x1 + c2x2 + · · · + cnxn
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
4Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Definition
Feasible Region and Optimal Solution
H Linear programming H
Definition
A linear programming problem (LP) is an optimization problem for which we do the
following:
À We attempt to maximize (or minimize) a linear function of the decision variables.
The function that is to be maximized or minimized is called the objective function.
A function f(x1, x2, · · · , xn) is a linear function ⇐⇒ ∃c1, c2, · · · , cn , s.t.
f(x1, x2, · · · , xn) = c1x1 + c2x2 + · · · + cnxn
Á The values of the decision variables must satisfy a set of constraints. Each
constraint must be a linear equation or linear inequality.
c1x1 + c2x2 + · · · + cnxn ≤ b is a linear inequality
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
5Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Definition
Feasible Region and Optimal Solution
H Linear programming H
Definition
A linear programming problem (LP) is an optimization problem for which we do the
following:
À We attempt to maximize (or minimize) a linear function of the decision variables.
The function that is to be maximized or minimized is called the objective function.
A function f(x1, x2, · · · , xn) is a linear function ⇐⇒ ∃c1, c2, · · · , cn , s.t.
f(x1, x2, · · · , xn) = c1x1 + c2x2 + · · · + cnxn
Á The values of the decision variables must satisfy a set of constraints. Each
constraint must be a linear equation or linear inequality.
c1x1 + c2x2 + · · · + cnxn ≤ b is a linear inequality
 A sign restriction is associated with each variable. For any variable xi , the sign
restriction specifies that xi must be either nonnegative xi ≥ 0 or unrestricted in
sign.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
6Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Definition
Feasible Region and Optimal Solution
Feasible Region and Optimal Solution
Definition (Feasible region)
The feasible region for an LP is the set of all points that satisfies all the LP’s constraints
and sign restrictions.
Example
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
7Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Definition
Feasible Region and Optimal Solution
Feasible Region and Optimal Solution
Definition (Feasible region)
The feasible region for an LP is the set of all points that satisfies all the LP’s constraints
and sign restrictions.
Example
The point (x1 = 40, x2 = 20) is in the feasible region of the
following LP’s constraints
On the other hand, the point (x1 = 15, x2 = 70) is not in the
feasible region,







2x1 + x2 ≤ 100
x1 + x2 ≤ 80
x1 ≤ 40
x1, x2 ≥ 0
Definition (Optimal Solution)
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
8Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Definition
Feasible Region and Optimal Solution
Feasible Region and Optimal Solution
Definition (Feasible region)
The feasible region for an LP is the set of all points that satisfies all the LP’s constraints
and sign restrictions.
Example
The point (x1 = 40, x2 = 20) is in the feasible region of the
following LP’s constraints
On the other hand, the point (x1 = 15, x2 = 70) is not in the
feasible region,







2x1 + x2 ≤ 100
x1 + x2 ≤ 80
x1 ≤ 40
x1, x2 ≥ 0
Definition (Optimal Solution)
For a maximization problem, an optimal solution to an LP is a point in the feasible
region with the largest objective function value. Similarly, for a minimization problem, an
optimal solution is a point in the feasible region with the smallest objective function value.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
9Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
H The Graphical Solution of Two-Variable L.P Problems H
The characteristics of Graphical method
À Generally the method is used to solve the problem, when it involves two
decision variables.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
10Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
H The Graphical Solution of Two-Variable L.P Problems H
The characteristics of Graphical method
À Generally the method is used to solve the problem, when it involves two
decision variables.
Á For three or more decision variables, the graph deals with planes and
requires high imagination to identify the solution area.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
11Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
H The Graphical Solution of Two-Variable L.P Problems H
The characteristics of Graphical method
À Generally the method is used to solve the problem, when it involves two
decision variables.
Á For three or more decision variables, the graph deals with planes and
requires high imagination to identify the solution area.
 Always, the solution to the problem lies in first quadrant.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
12Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
H The Graphical Solution of Two-Variable L.P Problems H
The characteristics of Graphical method
À Generally the method is used to solve the problem, when it involves two
decision variables.
Á For three or more decision variables, the graph deals with planes and
requires high imagination to identify the solution area.
 Always, the solution to the problem lies in first quadrant.
à This method provides a basis for understanding the other methods of
solution.
We always label x1 and x2 and the coordinate axes the x1 and x2 axes.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
13Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
Finding the Feasible Solution
Example
Max : z = x1 + 4x2
Under the constraints:







x1 + x2 ≤ 8
x1 + 3x2 ≤ 18
2x1 + x2 ≤ 14
x1 , x2 ≥ 0
Solution
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
14Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
Finding the Feasible Solution
Example
Max : z = x1 + 4x2
Under the constraints:







x1 + x2 ≤ 8
x1 + 3x2 ≤ 18
2x1 + x2 ≤ 14
x1 , x2 ≥ 0
Solution
The feasible region will be the set of points in the first quadrant that satisfies the
first three inequalities.
x1 + x2 = 8
x1 0 8
x2 8 0
x1 + 3x2 = 18
x1 0 18
x2 6 0
2x1 + x2 = 14
x1 0 7
x2 14 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
15Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution

x1 + x2 = 8
x1 + 3x2 = 18
B(x1 = 3, x2 = 5)

2x1 + x2 = 14
x1 + x2 = 8
C(x1 = 6, x2 = 2)

2x1 + x2 = 14
x2 = 0
D(x1 = 7, x2 = 0)

x1 + 3x2 = 18
x1 = 0
A(x1 = 0, x2 = 6)
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
16Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The characteristics of Graphical method
Finding the Feasible Solution
Finding the Optimal Solution
Finding the Optimal Solution
We need to find the extremity points of the feasible solution. Here, the extremity
points are O(0, 0), A(0, 6) and D(7, 0) for the last two points B and C, we see
that B is the intersection between x1 + 3x2 = 18 and x1 + x2 = 8, and C is the
intersection between 2x1 + x2 = 14 and x1 + x2 = 8, by comparison we find
B = (3, 5) and C = (6, 2).
Now the optimal solution must be one of these extremity points, so we
substitute each point in the objective function. In a max problem the largest
value corresponds to the optimal value (in a min problem, the smalest value).
We obtain, for:
O(0, 0) ; z = 0 + 4(0) = 0 5
A(0, 6) ; z = 0 + 4(6) = 24 3
B(3, 5) ; z = 3 + 4(5) = 23 5
C(6, 2) ; z = 6 + 4(2) = 14 5
D(7, 0) ; z = 7 + 4(0) = 7 5
Thus point A has the greatest value so it’s the optimal solution with max value z = 24.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
17Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
H Examples H
The Graphical Solution of Maximization Problems
Example (À)
A company produces two types of products, A and B. The products A and B passes
through three types of work before they are in their final state.
Machines nb. of hrs needed nb. of hrs needed Cost in $ per hr.
by product A by product B
Machine 1 2 1 10
Machine 2 1 4.5 12
Machine 3 4 3 14
The company can afford 200 hrs for machine 1 and 540 hrs for machine 2 and 480 hrs
for machine 3.
What are the quantities produced of types A and B that maximize the profit of the
company if the price of type A is 138$ and the price of type B is 136$.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
18Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Solution
Cost A : 2 × 10 + 12 × 1 + 4 × 14 = 88$
Cost B : 1 × 10 + 12 × 4.5 + 3 × 14 = 106$
x1 : nb. of units produced of type A
x2 : nb. of units produced of type B
Max z : (138 − 88)x1 + (136 − 106)x2 = 50x1 + 30x2
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
19Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Solution
Cost A : 2 × 10 + 12 × 1 + 4 × 14 = 88$
Cost B : 1 × 10 + 12 × 4.5 + 3 × 14 = 106$
x1 : nb. of units produced of type A
x2 : nb. of units produced of type B
Max z : (138 − 88)x1 + (136 − 106)x2 = 50x1 + 30x2
Therefore
max z = 50x1 + 30x2







2x1 + x2 ≤ 200
x1 + 4.5x2 ≤ 540
4x1 + 3x2 ≤ 480
x1, x2 ≥ 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
20Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Solution
Cost A : 2 × 10 + 12 × 1 + 4 × 14 = 88$
Cost B : 1 × 10 + 12 × 4.5 + 3 × 14 = 106$
x1 : nb. of units produced of type A
x2 : nb. of units produced of type B
Max z : (138 − 88)x1 + (136 − 106)x2 = 50x1 + 30x2
Therefore
max z = 50x1 + 30x2







2x1 + x2 ≤ 200
x1 + 4.5x2 ≤ 540
4x1 + 3x2 ≤ 480
x1, x2 ≥ 0
Now let’s draw the linear equations:
2x1 + x2 = 200
x1 0 100
x2 200 0
x1 + 4.5x2 = 540
x1 0 90
x2 120 100
4x1 + 3x2 = 480
x1 0 120
x2 160 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
21Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems

x1 + 4.5x2 = 540
4x1 + 3x2 = 480
B(x1 = 36, x2 = 112)

2x1 + x2 = 200
4x1 + 3x2 = 480
A(x1 = 60, x2 = 80)

x1 + 4.5x2 = 540
x1 = 0
C(x1 = 0, x2 = 120)

4x1 + 3x2 = 480
x2 = 0
D(x1 = 100, x2 = 0)
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
22Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
The coordinates of the corners are:
C = (0, 120), O = (0, 0), D = (100, 0), B = (36, 112) and A = (60, 80) .
Substituting these values in objective function. We obtain, for:
O(0, 0) ; z = 50(0) + 30(0) = 0 5
A(60, 80) ; z = 50(60) + 30(80) = 5400 3
B(36, 112) ; z = 50(36) + 30(112) = 5160 5
C(0, 120 ; z = 50(0) + 30(120) = 3600 5
D(100, 0) ; z = 50(100) + 30(0) = 5000 5
The Max profit occures at the point A, so we obtain a Max profit of 5400$ when
we produce 60 items of product A and 80 items of product B.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
23Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
The Graphical Solution of Minimization Problems
Example (Á)
A company Produces 2 types of chocolate (light chocolate  dark chocolate).
• For light chocolate; we need 5g of sugar, 4g of cacao and 0.5g of butter.
• For dark chocolate; we need 10g of sugar and 3g of cacao.
The company must use at least 90g of sugar, 48g of cacao and 1.5g of butter.
If the cost of one unit of light chocolate is 2$ and the cost of one unit of dark chocolate is 3$. Find
the combination of products that gives the minimal cost.
Solution
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
24Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
The Graphical Solution of Minimization Problems
Example (Á)
A company Produces 2 types of chocolate (light chocolate  dark chocolate).
• For light chocolate; we need 5g of sugar, 4g of cacao and 0.5g of butter.
• For dark chocolate; we need 10g of sugar and 3g of cacao.
The company must use at least 90g of sugar, 48g of cacao and 1.5g of butter.
If the cost of one unit of light chocolate is 2$ and the cost of one unit of dark chocolate is 3$. Find
the combination of products that gives the minimal cost.
Solution
The details given in the problem is given in the table below:
Ingredients Products Quantities in g
Type 1 (light) Type 2 (dark)
Sugar 5 10 90
Cacao 4 3 48
Butter 0.5 0 1.5
Profit per unit in $ 2 3
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
25Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
The L.P. model is:
Min : z = 2x1 + 3x2
Under the constraints:



5x1 + 10x2 ≥ 90
4x1 + 3x2 ≥ 48
0.5x1 ≥ 1.5
x1, x2 ≥ 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
26Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Here we find the coordinates of corners and substitute the values in the
objective function. In minimization problem, we select the coordinates giving
minimum value. The coordinates of the corners are:
A = (3, 12), B = (8.4, 4.5) and C = (18, 0) .
Substituting these values in objective function. We obtain, for:
A(3, 12) ; z = 2(3) + 3(12) = 42 5
B(8.4, 4.5) ; z = 2(8.4) + 3(4.5) = 30.3 3
C(18, 0) ; z = 2(18) + 3(0) = 36 5
Hence the optimal solution for the problem is company has to manufacture 18
units of product of type 1 and 9 units of product of type 2.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
27Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Example (Â)
Dorian Auto manufactures luxury cars and trucks. The company believes that
its most likely customers are high-income women and men. To reach these
groups, Dorian Auto has embarked on an ambitious TV advertising campaign
and has decided to purchase 1-minute commercial spots on two types of
programs: comedy shows and football games.
• Each comedy commercial is seen by 7 million high-income women and 2
million high-income men.
• Each football commercial is seen by 2 million high-income women and 12
million high-income men.
A 1-minute comedy ad costs 50, 000$, and a 1-minute football ad costs
100, 000$. Dorian would like the commercials to be seen by at least 28 million
high-income women and 24 million high-income men. Use linear programming
to determine how Dorian Auto can meet its advertising requirements at
minimum cost.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
28Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Solution
Dorian must decide how many comedy and football ads should be purchased,
so the decision variables are
x1 number of 1-minute comedy ads purchased
x2 number of 1-minute football ads purchased
Then Dorian wants to minimize total advertising cost (in thousands of dollars).
Total advertising cost=cost of comedy ads+cost of football ads=50x1 + 100x2.
Thus, Dorian’s objective function is
Min z = 50x1 + 100x2 .
Dorian faces the following constraints:
• Constraint 1 Commercials must reach at least 28 million high-income
women.
• Constraint 2 Commercials must reach at least 24 million high-income men.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
29Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
To express Constraints 1 and 2 in terms of x1 and x2, let HIW stand for
high-income women viewers and HIM stand for high-income men viewers (in
millions).
Ingredients Products of 1min Number of customers
comedy ads football ads
HIW 7 2 28
HIM 2 12 24
Cost per 1minute in $ 50, 000 100, 000
So the Dorian LP is given by:
Min : z = 50x1 + 100x2
Under the constraints: 






7x1 + 2x2 ≥ 28
2x1 + 12x2 ≥ 24
x1 ≥ 0
x2 ≥ 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
30Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
31Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
The Graphical Solution of Maximization Problems
The Graphical Solution of Minimization Problems
The coordinates of the corners are:
A = (0, 14), B = (18/5, 7/5) and C = (12, 0) .
Substituting these values in objective function. We obtain, for:
A(0, 14) ; z = 50(0) + 100(14) = 1400 5
B(7/5, 18/5) ; z = 50(3.6) + 100(1.4) = 320 3
C(12, 0) ; z = 50(12) + 100(0) = 600 5
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
32Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
H Special Cases H
Alternative or Multiple Optimal Solutions
In this section, we encounter three types of LPs that do not have unique optimal solutions.
1. Some LPs have an infinite number of optimal solutions (alternative or multiple optimal
solutions).
2. Some LPs have no feasible solutions (infeasible LPs).
3. Some LPs are unbounded: There are points in the feasible region with arbitrarily large (in a
max problem) z-values.
Example
An auto company manufactures cars and trucks. Each vehicle must be processed in the paint shop
and body assembly shop. If the paint shop were only painting trucks, then 40 per day could be
painted. If the paint shop were only painting cars, then 60 per day could be painted. If the body
shop were only producing cars, then it could process 50 per day. If the body shop were only
producing trucks, then it could process 50 per day. Each truck contributes 300$ to profit, and each
car contributes 200$ to profit. Use linear programming to determine a daily production schedule
that will maximize the company’s profits.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
33Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Solution
The company must decide how many cars and trucks should be produced daily.
This leads us to define the following decision variables:
x1 is the number of trucks produced daily
x2 is number of cars produced daily
The company’s daily profit (in hundreds of dollars) is 3x1 + 2x2, so the
company’s objective function may be written as
Maxz = 3x1 + 2x2
The company’s two constraints are the following:
• Constraint 1 The fraction of the day during which the paint shop is busy is
less than or equal to 1.
• Constraint 2 The fraction of the day during which the body shop is busy is
less than or equal to 1.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
34Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Thus, Constraint 1 may be expressed by
1
40
x1 +
1
60
x2 ≤ 1 (Paint shop constraint)
Constraint 2 may be expressed by
1
50
x1 +
1
50
x2 ≤ 1 (Body shop constraint)
Because x1 ≥ 0 and x2 ≥ 0 must hold, the relevant LP is
Max : z = 3x1 + 2x2
Under the constraints:







1
40
x1 + 1
60
x2 ≤ 1
1
50
x1 + 1
50
x2 ≤ 1
x1 ≥ 0
x2 ≥ 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
35Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
36Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
The coordinates of the corners are:A = (0, 50), B = (20, 30) and
C = (40, 0). Substituting these values in objective function. We obtain, for:
A(0, 50) ; z = 3(0) + 2(50) = 100 5
B(20, 30) ; z = 3(20) + 2(30) = 120 3
C(40, 0) ; z = 3(40) + 2(0) = 120 3
From our current example, it seems reasonable (and can be shown to be true)
that if two points (B and C here) are optimal, then any point on the line
segment joining these two points will also be optimal.
If an alternative optimum occurs, then the decision maker can use a secondary
criterion to choose between optimal solutions. The auto company’s managers
might prefer point C because it would simplify their business (and still allow
them to maximize profits) by allowing them to produce only one type of product
(trucks).
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
37Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Infeasible solutions or No solutions
Example
Suppose that auto dealers require that the auto company in the previous
example produce at least 30 trucks and 20 cars. Find the optimal solution to
the new LP.
Solution
After adding the constraints x1 ≥ 30 and x2 ≥ 20 to the LP of the previous
example, we obtain the following LP:
Max : z = 3x1 + 2x2
Under the constraints: 






1
40
x1 + 1
60
x2 ≤ 1
1
50
x1 + 1
50
x2 ≤ 1
x1 ≥ 30
x2 ≥ 20
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
38Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
From the figure it is clear that no
point satisfies all the constraints.
This means that the problem has
an empty feasible region and is
an infeasible LP.
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
39Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Unbounded problem
Example
Graphically solve the following LP:
Max : z = 2x1 − x2
Under the constraints: 


x1 − x2 ≤ 1
2x1 + x2 ≥ 6
x1, x2 ≥ 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
40Ú42
Linear Programming
The Graphical Solution of Two-Variable L.P Problems
Examples
Special Cases
Alternative or Multiple Optimal Solutions
Infeasible solutions or No solutions
Unbounded problem
Solution
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
41Ú42
Exercise
À Graphically solve the following LP:
Max : z = 3x1 + x2
Under the constraints: 






2x1 + x2 ≤ 6
x1 + 3x2 ≤ 9
x1 + x2 ≤ 4
x1, x2 ≥ 0
Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
Thank you! Questions?

More Related Content

PPTX
Linear Programming
PPTX
Simplex method concept,
PPTX
Linear programming - Model formulation, Graphical Method
PPTX
Contribution of indian Mathematician : Aryabhata.
PPT
Training Needs Analysis
PPTX
Maths in daily life
Linear Programming
Simplex method concept,
Linear programming - Model formulation, Graphical Method
Contribution of indian Mathematician : Aryabhata.
Training Needs Analysis
Maths in daily life

What's hot (20)

PPTX
Big-M Method Presentation
PPT
Simplex Method
PPTX
Sensitivity analysis linear programming copy
PPSX
Linear programing
PPTX
graphical method
PPT
simplex method
DOCX
Vogel’s Approximation Method (VAM)
PPT
Graphical Method
PPTX
Special Cases in Simplex Method
PDF
Linear Programming Problems : Dr. Purnima Pandit
PDF
Big m method
PPT
Simplex Method
PDF
Duality in Linear Programming Problem
PPTX
Big m method
PPTX
PRIMAL & DUAL PROBLEMS
PDF
Unit.3. duality and sensetivity analisis
PDF
Unit.2. linear programming
PPSX
Graphical method
PPTX
Canonical form and Standard form of LPP
PPTX
Concept of Duality
Big-M Method Presentation
Simplex Method
Sensitivity analysis linear programming copy
Linear programing
graphical method
simplex method
Vogel’s Approximation Method (VAM)
Graphical Method
Special Cases in Simplex Method
Linear Programming Problems : Dr. Purnima Pandit
Big m method
Simplex Method
Duality in Linear Programming Problem
Big m method
PRIMAL & DUAL PROBLEMS
Unit.3. duality and sensetivity analisis
Unit.2. linear programming
Graphical method
Canonical form and Standard form of LPP
Concept of Duality
Ad

Similar to Linear Programming (graphical method) (20)

PDF
LPP, Duality and Game Theory
PPTX
Convex optmization in communications
PDF
optmizationtechniques.pdf
PDF
4optmizationtechniques-150308051251-conversion-gate01.pdf
PPTX
Optmization techniques
PPTX
Lecture5-7_12946_Linear Programming The Graphical Method.pptx
PPTX
least squares approach in finite element method
PDF
Boyd 4.6, 4.7
PDF
LP linear programming (summary) (5s)
PPTX
Simplex method material for operation .pptx
PPTX
Linear Programming
PPT
Ms(lpgraphicalsoln.)[1]
PPTX
NON LINEAR PROGRAMMING
PPTX
ENGN3301_Quadratic_Programming_2024.pptx
PDF
Optimum Engineering Design - Day 4 - Clasical methods of optimization
PDF
Numerical analysis dual, primal, revised simplex
PPTX
Global optimization
PPTX
CHAPTER 6 System Techniques in water resuorce ppt yadesa.pptx
PDF
A New Algorithm for Solving Fully Fuzzy Bi-Level Quadratic Programming Problems
PPTX
linearprogramingproblemlpp-180729145239.pptx
LPP, Duality and Game Theory
Convex optmization in communications
optmizationtechniques.pdf
4optmizationtechniques-150308051251-conversion-gate01.pdf
Optmization techniques
Lecture5-7_12946_Linear Programming The Graphical Method.pptx
least squares approach in finite element method
Boyd 4.6, 4.7
LP linear programming (summary) (5s)
Simplex method material for operation .pptx
Linear Programming
Ms(lpgraphicalsoln.)[1]
NON LINEAR PROGRAMMING
ENGN3301_Quadratic_Programming_2024.pptx
Optimum Engineering Design - Day 4 - Clasical methods of optimization
Numerical analysis dual, primal, revised simplex
Global optimization
CHAPTER 6 System Techniques in water resuorce ppt yadesa.pptx
A New Algorithm for Solving Fully Fuzzy Bi-Level Quadratic Programming Problems
linearprogramingproblemlpp-180729145239.pptx
Ad

More from Kamel Attar (12)

PDF
Solved exercises line integral
PDF
Network analysis
PDF
Simplex method (minimization)
PDF
Simplex method (maximization)
PDF
Introduction to operations research
PDF
Function of several variables
PDF
Solved exercises double integration
PDF
Solved exercises simple integration
PDF
Simple integral
PDF
Operation research-Network analysis (Critical Path Method)
PDF
Transportation problem
PDF
Operations research(Sensitivity analysis)
Solved exercises line integral
Network analysis
Simplex method (minimization)
Simplex method (maximization)
Introduction to operations research
Function of several variables
Solved exercises double integration
Solved exercises simple integration
Simple integral
Operation research-Network analysis (Critical Path Method)
Transportation problem
Operations research(Sensitivity analysis)

Recently uploaded (20)

PDF
caregiving tools.pdf...........................
PDF
Corporate Finance Fundamentals - Course Presentation.pdf
PPT
E commerce busin and some important issues
PPTX
Unilever_Financial_Analysis_Presentation.pptx
PDF
THE EFFECT OF FOREIGN AID ON ECONOMIC GROWTH IN ETHIOPIA
PPTX
OAT_ORI_Fed Independence_August 2025.pptx
PDF
ECONOMICS AND ENTREPRENEURS LESSONSS AND
PPTX
kyc aml guideline a detailed pt onthat.pptx
PDF
Chapter 9 IFRS Ed-Ed4_2020 Intermediate Accounting
PDF
Mathematical Economics 23lec03slides.pdf
PDF
discourse-2025-02-building-a-trillion-dollar-dream.pdf
PDF
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
PPTX
Session 14-16. Capital Structure Theories.pptx
PPTX
Session 3. Time Value of Money.pptx_finance
PPTX
introuction to banking- Types of Payment Methods
PDF
Predicting Customer Bankruptcy Using Machine Learning Algorithm research pape...
PPTX
The discussion on the Economic in transportation .pptx
PDF
6a Transition Through Old Age in a Dynamic Retirement Distribution Model JFP ...
PDF
HCWM AND HAI FOR BHCM STUDENTS(1).Pdf and ptts
PPTX
4.5.1 Financial Governance_Appropriation & Finance.pptx
caregiving tools.pdf...........................
Corporate Finance Fundamentals - Course Presentation.pdf
E commerce busin and some important issues
Unilever_Financial_Analysis_Presentation.pptx
THE EFFECT OF FOREIGN AID ON ECONOMIC GROWTH IN ETHIOPIA
OAT_ORI_Fed Independence_August 2025.pptx
ECONOMICS AND ENTREPRENEURS LESSONSS AND
kyc aml guideline a detailed pt onthat.pptx
Chapter 9 IFRS Ed-Ed4_2020 Intermediate Accounting
Mathematical Economics 23lec03slides.pdf
discourse-2025-02-building-a-trillion-dollar-dream.pdf
Dialnet-DynamicHedgingOfPricesOfNaturalGasInMexico-8788871.pdf
Session 14-16. Capital Structure Theories.pptx
Session 3. Time Value of Money.pptx_finance
introuction to banking- Types of Payment Methods
Predicting Customer Bankruptcy Using Machine Learning Algorithm research pape...
The discussion on the Economic in transportation .pptx
6a Transition Through Old Age in a Dynamic Retirement Distribution Model JFP ...
HCWM AND HAI FOR BHCM STUDENTS(1).Pdf and ptts
4.5.1 Financial Governance_Appropriation & Finance.pptx

Linear Programming (graphical method)

  • 1. Faculty of Economics and Business Administration Lebanese University Chapter 1: Linear Programming (Graphical Method) Dr. Kamel ATTAR [email protected] Lecture #2 F Thursday 4/MAR/2021 F
  • 2. 2Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases 1 Linear Programming Definition Feasible Region and Optimal Solution 2 The Graphical Solution of Two-Variable L.P Problems The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution 3 Examples The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems 4 Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 3. 3Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Definition Feasible Region and Optimal Solution H Linear programming H Definition A linear programming problem (LP) is an optimization problem for which we do the following: À We attempt to maximize (or minimize) a linear function of the decision variables. The function that is to be maximized or minimized is called the objective function. A function f(x1, x2, · · · , xn) is a linear function ⇐⇒ ∃c1, c2, · · · , cn , s.t. f(x1, x2, · · · , xn) = c1x1 + c2x2 + · · · + cnxn Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 4. 4Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Definition Feasible Region and Optimal Solution H Linear programming H Definition A linear programming problem (LP) is an optimization problem for which we do the following: À We attempt to maximize (or minimize) a linear function of the decision variables. The function that is to be maximized or minimized is called the objective function. A function f(x1, x2, · · · , xn) is a linear function ⇐⇒ ∃c1, c2, · · · , cn , s.t. f(x1, x2, · · · , xn) = c1x1 + c2x2 + · · · + cnxn Á The values of the decision variables must satisfy a set of constraints. Each constraint must be a linear equation or linear inequality. c1x1 + c2x2 + · · · + cnxn ≤ b is a linear inequality Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 5. 5Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Definition Feasible Region and Optimal Solution H Linear programming H Definition A linear programming problem (LP) is an optimization problem for which we do the following: À We attempt to maximize (or minimize) a linear function of the decision variables. The function that is to be maximized or minimized is called the objective function. A function f(x1, x2, · · · , xn) is a linear function ⇐⇒ ∃c1, c2, · · · , cn , s.t. f(x1, x2, · · · , xn) = c1x1 + c2x2 + · · · + cnxn Á The values of the decision variables must satisfy a set of constraints. Each constraint must be a linear equation or linear inequality. c1x1 + c2x2 + · · · + cnxn ≤ b is a linear inequality  A sign restriction is associated with each variable. For any variable xi , the sign restriction specifies that xi must be either nonnegative xi ≥ 0 or unrestricted in sign. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 6. 6Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Definition Feasible Region and Optimal Solution Feasible Region and Optimal Solution Definition (Feasible region) The feasible region for an LP is the set of all points that satisfies all the LP’s constraints and sign restrictions. Example Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 7. 7Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Definition Feasible Region and Optimal Solution Feasible Region and Optimal Solution Definition (Feasible region) The feasible region for an LP is the set of all points that satisfies all the LP’s constraints and sign restrictions. Example The point (x1 = 40, x2 = 20) is in the feasible region of the following LP’s constraints On the other hand, the point (x1 = 15, x2 = 70) is not in the feasible region,        2x1 + x2 ≤ 100 x1 + x2 ≤ 80 x1 ≤ 40 x1, x2 ≥ 0 Definition (Optimal Solution) Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 8. 8Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Definition Feasible Region and Optimal Solution Feasible Region and Optimal Solution Definition (Feasible region) The feasible region for an LP is the set of all points that satisfies all the LP’s constraints and sign restrictions. Example The point (x1 = 40, x2 = 20) is in the feasible region of the following LP’s constraints On the other hand, the point (x1 = 15, x2 = 70) is not in the feasible region,        2x1 + x2 ≤ 100 x1 + x2 ≤ 80 x1 ≤ 40 x1, x2 ≥ 0 Definition (Optimal Solution) For a maximization problem, an optimal solution to an LP is a point in the feasible region with the largest objective function value. Similarly, for a minimization problem, an optimal solution is a point in the feasible region with the smallest objective function value. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 9. 9Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution H The Graphical Solution of Two-Variable L.P Problems H The characteristics of Graphical method À Generally the method is used to solve the problem, when it involves two decision variables. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 10. 10Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution H The Graphical Solution of Two-Variable L.P Problems H The characteristics of Graphical method À Generally the method is used to solve the problem, when it involves two decision variables. Á For three or more decision variables, the graph deals with planes and requires high imagination to identify the solution area. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 11. 11Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution H The Graphical Solution of Two-Variable L.P Problems H The characteristics of Graphical method À Generally the method is used to solve the problem, when it involves two decision variables. Á For three or more decision variables, the graph deals with planes and requires high imagination to identify the solution area. Â Always, the solution to the problem lies in first quadrant. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 12. 12Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution H The Graphical Solution of Two-Variable L.P Problems H The characteristics of Graphical method À Generally the method is used to solve the problem, when it involves two decision variables. Á For three or more decision variables, the graph deals with planes and requires high imagination to identify the solution area. Â Always, the solution to the problem lies in first quadrant. Ã This method provides a basis for understanding the other methods of solution. We always label x1 and x2 and the coordinate axes the x1 and x2 axes. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 13. 13Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution Finding the Feasible Solution Example Max : z = x1 + 4x2 Under the constraints:        x1 + x2 ≤ 8 x1 + 3x2 ≤ 18 2x1 + x2 ≤ 14 x1 , x2 ≥ 0 Solution Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 14. 14Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution Finding the Feasible Solution Example Max : z = x1 + 4x2 Under the constraints:        x1 + x2 ≤ 8 x1 + 3x2 ≤ 18 2x1 + x2 ≤ 14 x1 , x2 ≥ 0 Solution The feasible region will be the set of points in the first quadrant that satisfies the first three inequalities. x1 + x2 = 8 x1 0 8 x2 8 0 x1 + 3x2 = 18 x1 0 18 x2 6 0 2x1 + x2 = 14 x1 0 7 x2 14 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 15. 15Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution x1 + x2 = 8 x1 + 3x2 = 18 B(x1 = 3, x2 = 5) 2x1 + x2 = 14 x1 + x2 = 8 C(x1 = 6, x2 = 2) 2x1 + x2 = 14 x2 = 0 D(x1 = 7, x2 = 0) x1 + 3x2 = 18 x1 = 0 A(x1 = 0, x2 = 6) Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 16. 16Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The characteristics of Graphical method Finding the Feasible Solution Finding the Optimal Solution Finding the Optimal Solution We need to find the extremity points of the feasible solution. Here, the extremity points are O(0, 0), A(0, 6) and D(7, 0) for the last two points B and C, we see that B is the intersection between x1 + 3x2 = 18 and x1 + x2 = 8, and C is the intersection between 2x1 + x2 = 14 and x1 + x2 = 8, by comparison we find B = (3, 5) and C = (6, 2). Now the optimal solution must be one of these extremity points, so we substitute each point in the objective function. In a max problem the largest value corresponds to the optimal value (in a min problem, the smalest value). We obtain, for: O(0, 0) ; z = 0 + 4(0) = 0 5 A(0, 6) ; z = 0 + 4(6) = 24 3 B(3, 5) ; z = 3 + 4(5) = 23 5 C(6, 2) ; z = 6 + 4(2) = 14 5 D(7, 0) ; z = 7 + 4(0) = 7 5 Thus point A has the greatest value so it’s the optimal solution with max value z = 24. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 17. 17Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems H Examples H The Graphical Solution of Maximization Problems Example (À) A company produces two types of products, A and B. The products A and B passes through three types of work before they are in their final state. Machines nb. of hrs needed nb. of hrs needed Cost in $ per hr. by product A by product B Machine 1 2 1 10 Machine 2 1 4.5 12 Machine 3 4 3 14 The company can afford 200 hrs for machine 1 and 540 hrs for machine 2 and 480 hrs for machine 3. What are the quantities produced of types A and B that maximize the profit of the company if the price of type A is 138$ and the price of type B is 136$. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 18. 18Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Solution Cost A : 2 × 10 + 12 × 1 + 4 × 14 = 88$ Cost B : 1 × 10 + 12 × 4.5 + 3 × 14 = 106$ x1 : nb. of units produced of type A x2 : nb. of units produced of type B Max z : (138 − 88)x1 + (136 − 106)x2 = 50x1 + 30x2 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 19. 19Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Solution Cost A : 2 × 10 + 12 × 1 + 4 × 14 = 88$ Cost B : 1 × 10 + 12 × 4.5 + 3 × 14 = 106$ x1 : nb. of units produced of type A x2 : nb. of units produced of type B Max z : (138 − 88)x1 + (136 − 106)x2 = 50x1 + 30x2 Therefore max z = 50x1 + 30x2        2x1 + x2 ≤ 200 x1 + 4.5x2 ≤ 540 4x1 + 3x2 ≤ 480 x1, x2 ≥ 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 20. 20Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Solution Cost A : 2 × 10 + 12 × 1 + 4 × 14 = 88$ Cost B : 1 × 10 + 12 × 4.5 + 3 × 14 = 106$ x1 : nb. of units produced of type A x2 : nb. of units produced of type B Max z : (138 − 88)x1 + (136 − 106)x2 = 50x1 + 30x2 Therefore max z = 50x1 + 30x2        2x1 + x2 ≤ 200 x1 + 4.5x2 ≤ 540 4x1 + 3x2 ≤ 480 x1, x2 ≥ 0 Now let’s draw the linear equations: 2x1 + x2 = 200 x1 0 100 x2 200 0 x1 + 4.5x2 = 540 x1 0 90 x2 120 100 4x1 + 3x2 = 480 x1 0 120 x2 160 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 21. 21Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems x1 + 4.5x2 = 540 4x1 + 3x2 = 480 B(x1 = 36, x2 = 112) 2x1 + x2 = 200 4x1 + 3x2 = 480 A(x1 = 60, x2 = 80) x1 + 4.5x2 = 540 x1 = 0 C(x1 = 0, x2 = 120) 4x1 + 3x2 = 480 x2 = 0 D(x1 = 100, x2 = 0) Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 22. 22Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems The coordinates of the corners are: C = (0, 120), O = (0, 0), D = (100, 0), B = (36, 112) and A = (60, 80) . Substituting these values in objective function. We obtain, for: O(0, 0) ; z = 50(0) + 30(0) = 0 5 A(60, 80) ; z = 50(60) + 30(80) = 5400 3 B(36, 112) ; z = 50(36) + 30(112) = 5160 5 C(0, 120 ; z = 50(0) + 30(120) = 3600 5 D(100, 0) ; z = 50(100) + 30(0) = 5000 5 The Max profit occures at the point A, so we obtain a Max profit of 5400$ when we produce 60 items of product A and 80 items of product B. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 23. 23Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems The Graphical Solution of Minimization Problems Example (Á) A company Produces 2 types of chocolate (light chocolate dark chocolate). • For light chocolate; we need 5g of sugar, 4g of cacao and 0.5g of butter. • For dark chocolate; we need 10g of sugar and 3g of cacao. The company must use at least 90g of sugar, 48g of cacao and 1.5g of butter. If the cost of one unit of light chocolate is 2$ and the cost of one unit of dark chocolate is 3$. Find the combination of products that gives the minimal cost. Solution Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 24. 24Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems The Graphical Solution of Minimization Problems Example (Á) A company Produces 2 types of chocolate (light chocolate dark chocolate). • For light chocolate; we need 5g of sugar, 4g of cacao and 0.5g of butter. • For dark chocolate; we need 10g of sugar and 3g of cacao. The company must use at least 90g of sugar, 48g of cacao and 1.5g of butter. If the cost of one unit of light chocolate is 2$ and the cost of one unit of dark chocolate is 3$. Find the combination of products that gives the minimal cost. Solution The details given in the problem is given in the table below: Ingredients Products Quantities in g Type 1 (light) Type 2 (dark) Sugar 5 10 90 Cacao 4 3 48 Butter 0.5 0 1.5 Profit per unit in $ 2 3 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 25. 25Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems The L.P. model is: Min : z = 2x1 + 3x2 Under the constraints:    5x1 + 10x2 ≥ 90 4x1 + 3x2 ≥ 48 0.5x1 ≥ 1.5 x1, x2 ≥ 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 26. 26Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Here we find the coordinates of corners and substitute the values in the objective function. In minimization problem, we select the coordinates giving minimum value. The coordinates of the corners are: A = (3, 12), B = (8.4, 4.5) and C = (18, 0) . Substituting these values in objective function. We obtain, for: A(3, 12) ; z = 2(3) + 3(12) = 42 5 B(8.4, 4.5) ; z = 2(8.4) + 3(4.5) = 30.3 3 C(18, 0) ; z = 2(18) + 3(0) = 36 5 Hence the optimal solution for the problem is company has to manufacture 18 units of product of type 1 and 9 units of product of type 2. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 27. 27Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Example (Â) Dorian Auto manufactures luxury cars and trucks. The company believes that its most likely customers are high-income women and men. To reach these groups, Dorian Auto has embarked on an ambitious TV advertising campaign and has decided to purchase 1-minute commercial spots on two types of programs: comedy shows and football games. • Each comedy commercial is seen by 7 million high-income women and 2 million high-income men. • Each football commercial is seen by 2 million high-income women and 12 million high-income men. A 1-minute comedy ad costs 50, 000$, and a 1-minute football ad costs 100, 000$. Dorian would like the commercials to be seen by at least 28 million high-income women and 24 million high-income men. Use linear programming to determine how Dorian Auto can meet its advertising requirements at minimum cost. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 28. 28Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Solution Dorian must decide how many comedy and football ads should be purchased, so the decision variables are x1 number of 1-minute comedy ads purchased x2 number of 1-minute football ads purchased Then Dorian wants to minimize total advertising cost (in thousands of dollars). Total advertising cost=cost of comedy ads+cost of football ads=50x1 + 100x2. Thus, Dorian’s objective function is Min z = 50x1 + 100x2 . Dorian faces the following constraints: • Constraint 1 Commercials must reach at least 28 million high-income women. • Constraint 2 Commercials must reach at least 24 million high-income men. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 29. 29Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems To express Constraints 1 and 2 in terms of x1 and x2, let HIW stand for high-income women viewers and HIM stand for high-income men viewers (in millions). Ingredients Products of 1min Number of customers comedy ads football ads HIW 7 2 28 HIM 2 12 24 Cost per 1minute in $ 50, 000 100, 000 So the Dorian LP is given by: Min : z = 50x1 + 100x2 Under the constraints:        7x1 + 2x2 ≥ 28 2x1 + 12x2 ≥ 24 x1 ≥ 0 x2 ≥ 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 30. 30Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 31. 31Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases The Graphical Solution of Maximization Problems The Graphical Solution of Minimization Problems The coordinates of the corners are: A = (0, 14), B = (18/5, 7/5) and C = (12, 0) . Substituting these values in objective function. We obtain, for: A(0, 14) ; z = 50(0) + 100(14) = 1400 5 B(7/5, 18/5) ; z = 50(3.6) + 100(1.4) = 320 3 C(12, 0) ; z = 50(12) + 100(0) = 600 5 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 32. 32Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem H Special Cases H Alternative or Multiple Optimal Solutions In this section, we encounter three types of LPs that do not have unique optimal solutions. 1. Some LPs have an infinite number of optimal solutions (alternative or multiple optimal solutions). 2. Some LPs have no feasible solutions (infeasible LPs). 3. Some LPs are unbounded: There are points in the feasible region with arbitrarily large (in a max problem) z-values. Example An auto company manufactures cars and trucks. Each vehicle must be processed in the paint shop and body assembly shop. If the paint shop were only painting trucks, then 40 per day could be painted. If the paint shop were only painting cars, then 60 per day could be painted. If the body shop were only producing cars, then it could process 50 per day. If the body shop were only producing trucks, then it could process 50 per day. Each truck contributes 300$ to profit, and each car contributes 200$ to profit. Use linear programming to determine a daily production schedule that will maximize the company’s profits. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 33. 33Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Solution The company must decide how many cars and trucks should be produced daily. This leads us to define the following decision variables: x1 is the number of trucks produced daily x2 is number of cars produced daily The company’s daily profit (in hundreds of dollars) is 3x1 + 2x2, so the company’s objective function may be written as Maxz = 3x1 + 2x2 The company’s two constraints are the following: • Constraint 1 The fraction of the day during which the paint shop is busy is less than or equal to 1. • Constraint 2 The fraction of the day during which the body shop is busy is less than or equal to 1. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 34. 34Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Thus, Constraint 1 may be expressed by 1 40 x1 + 1 60 x2 ≤ 1 (Paint shop constraint) Constraint 2 may be expressed by 1 50 x1 + 1 50 x2 ≤ 1 (Body shop constraint) Because x1 ≥ 0 and x2 ≥ 0 must hold, the relevant LP is Max : z = 3x1 + 2x2 Under the constraints:        1 40 x1 + 1 60 x2 ≤ 1 1 50 x1 + 1 50 x2 ≤ 1 x1 ≥ 0 x2 ≥ 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 35. 35Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 36. 36Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem The coordinates of the corners are:A = (0, 50), B = (20, 30) and C = (40, 0). Substituting these values in objective function. We obtain, for: A(0, 50) ; z = 3(0) + 2(50) = 100 5 B(20, 30) ; z = 3(20) + 2(30) = 120 3 C(40, 0) ; z = 3(40) + 2(0) = 120 3 From our current example, it seems reasonable (and can be shown to be true) that if two points (B and C here) are optimal, then any point on the line segment joining these two points will also be optimal. If an alternative optimum occurs, then the decision maker can use a secondary criterion to choose between optimal solutions. The auto company’s managers might prefer point C because it would simplify their business (and still allow them to maximize profits) by allowing them to produce only one type of product (trucks). Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 37. 37Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Infeasible solutions or No solutions Example Suppose that auto dealers require that the auto company in the previous example produce at least 30 trucks and 20 cars. Find the optimal solution to the new LP. Solution After adding the constraints x1 ≥ 30 and x2 ≥ 20 to the LP of the previous example, we obtain the following LP: Max : z = 3x1 + 2x2 Under the constraints:        1 40 x1 + 1 60 x2 ≤ 1 1 50 x1 + 1 50 x2 ≤ 1 x1 ≥ 30 x2 ≥ 20 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 38. 38Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem From the figure it is clear that no point satisfies all the constraints. This means that the problem has an empty feasible region and is an infeasible LP. Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 39. 39Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Unbounded problem Example Graphically solve the following LP: Max : z = 2x1 − x2 Under the constraints:    x1 − x2 ≤ 1 2x1 + x2 ≥ 6 x1, x2 ≥ 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 40. 40Ú42 Linear Programming The Graphical Solution of Two-Variable L.P Problems Examples Special Cases Alternative or Multiple Optimal Solutions Infeasible solutions or No solutions Unbounded problem Solution Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method
  • 41. 41Ú42 Exercise À Graphically solve the following LP: Max : z = 3x1 + x2 Under the constraints:        2x1 + x2 ≤ 6 x1 + 3x2 ≤ 9 x1 + x2 ≤ 4 x1, x2 ≥ 0 Dr. Kamel ATTAR | Chapter 1: Linear Programming-Graphical Method: | Graphical Method