You are on page 1of 114

# Group Members

Kazim Shaheen BBA-I
Nabeel Saleh BBA-I
Naeem Bhatti BBA-I
Umair BBA-I
Shabir Jan BBA-II
Saqib BBA-III
Usman Saeed BBA-III
Linear Programming
• LP Models – Linear OF and Constraints
• Programming refers to modeling and solving a
problem mathematically.
• Helps management to decide how to make the
most effective use of an organization’s resources.
• Resources - machinery, labor, money, time,
warehouse space, raw material and energy .
In LP
The term linear describes the
proportionate relationship
of two or more variables. Thus, a
given change in one variable will
always cause a resulting
proportional change in another
variable.
LP
• LP - step-by-step iterative process.
• Each step – improve the solution
Mathematical Modeling
OR
Formulation
Components of Model

• Three Basic Components
– Decision Variables
– Objective Function
– Constraints
Objectives

• Maximize – Profit, Return Rate and
Reliability.
• Minimize – Cost, Loss, energy
Consumption
Format of Model

• Maximize/Minimize
(Objective Function )
Subject to
Constraints
(equalities,inequalities)
Constraints
1. Limitations of Funds
2. quantity of raw materials
available,
3. the level of demand for the
products,
4. the equipment productive
Capacity
Time Period
A further element is the time period being
used. The duration may be either long
term or short term. Although time is an
important element, it is one that has
flexibility so that the time horizon may
be changed as long as the restrictions
are compatible with the periods under
consideration.
Non Negative Constraints
• Some elements which will remain non
negative. e.g
– Buses in transport
– Furniture ( Like Chairs) etc.
Feasible Solution
• Any solution that satisfy all the
constraints of the model constitute
a feasible solution.
Example 1
• The Decent China Company produces
two products daily; plates and mugs.
The company has limited amounts of
two resources used in the production of
these products. i.e. clay and labor. Given
these limited resources, the company
desires to know how many plates and
mugs are required to produce each day,
in order to Maximize the profit
Cont…
Products Labor Clay Profit
Hrs/unit lbs/unit Rs / unit
Plates 1 4 4

Mugs 2 3 5

Maximum 40 hours of labor and 120
pounds of clay available each day for
production
Decision Variables
Let

X1 = the number of plates to produce

X2 = the number of mugs to produce
Objective Function
Total profit, Z, can be expressed as

Maximize Z = 4X1 + 5X2
Model Constraints

• 1X1 + 2X2 < 40 hours
• 4X1 + 3X2 < 120 pounds
Non Negative Constraints
A final restriction is that the number of
plates and mugs produced be either
zero or a positive value, since it would
be impossible to produce negative
items. These restrictions are referred to
as nonnegative constraints and are
expressed mathematically as

X1 > 0, X2 > 0
Final Model
The complete LP model for this
problem will be

Maximize Z = 4X1 + 5X2
subject to
1X1 + 2X2 < 40
4X1 + 3X2 < 120
X1, X2 > 0
Solution
X1 = 24 plates
X2 = 8 mugs
and
profit Z = Rs. 136.
Example 2
• The Reddy Mikks Company produces both
interior and exterior paints from two raw
materials, M1and M2. The following table
provides the basic data of the problem:
Tons of raw mat./ ton of

Exterior paint Interior paint Max. daliy
avalblty(tons)
R.Mat. M1 6 4 24
R. Mat. M2 1 2 6
Prft/ton 5 4
(\$1000)
Example2 Cont…
A market survey indicates that the daily
demand for interior paint cannot exceed
that of exterior paint by more than one 1
ton. Also the maximum daily demand of
interior paint is 2 tons.
Reddy Mikks wants to determine the
optimum product mix of interior and
exterior paints that maximizes the total
daily profit.
Example2 Cont…
Construction of model
1. Decision Variables
Let
• X1 =Tons produced daily of Exterior paint

• X2 = Tons produced daily of Interior paint
Example2 Cont…
1. Objective Function
Maximize the profit
Z = 5 x1 + 4 x2
Where
5 x1 = profit produced by exterior paint.

4 x2 = profit produced by interior paint.
Example2 Cont…
1. Constraints
Usage of raw material by both paints
<=
Maximum raw material availibility

Usage of R.mat. M1 = 6 x1 + 4 x2 tons
Usage of R.mat. M2 = 1 x1 + 2 x2 tons
Example2 Cont…

6 x1 + 4 x2 <= 24
x1 + 2 x2 <= 6
- x1 + x2 <= 1
x2 <= 2
X1, X2 >= 0
Example2 Cont…
• The Final Model is:
Maximize the profit
Z = 5 x1 + 4 x2
Subject to
6 x1 + 4 x2 <= 24
x1 + 2 x2 <= 6
- x1 + x2 <= 1
x2 <= 2
X1, X2 >= 0
Example 3 - Ingredients Mixing
• ALICO produces a cereal SUNFLOWER which they
advertise as meeting the minimum daily
requirements for vitamins A and D. The mixing
department of the company uses three main
ingredients in making the cereal-wheat,
oats(cholestrol-fighting soluble fibre) , and rice.
All three of which contain amounts of vitamin A
and D. Given that each box of cereal must contain
minimum amounts of vitamin A and D, the
company has instructed the mixing department
determine how many ounces of each ingredient
should go into each box of cereal in order to
minimize total cost.
Ingredients Mixing Cont…
• Each ingredient has the following vitamin
contribution and requirement per box.
• Also each ingredient contributes a number
of milligrams of the vitamin to the cereal.
• The cost of one ounce of wheat is Rs 0.4, oats
is Rs 0.6, rice is Rs 0.2

Vitamin Wheat Oats Rice Mgs
Mg/oz Mg/oz Mg/oz Reqd/box

A 10 20 08 100
D 07 14 12 70
Ingredients Mixing Cont…
• Decision variables
– Let
X1 = ounces of wheat
X2 = ounces of oats
X3 = ounces of rice

• Objective Function
Min Cost
Z = Rs. 0.4X1 + 0.6X2 + 0.2X3
Ingredients Mixing Cont…
• Constraints
The constraint for vitamin A is

10 X1 + 20 X2 + 8 X3 > 100 milligrams

10 X1 = vitamin A contribution (in mg.)
for wheat
20 X2 = vitamin A contribution (in mg.)
for oats
8X3 = vitamin A contribution (in mg.)
for rice
Ingredients Mixing Cont…
The constraint for vitamin D is

7X1 + 14 X2 + 12X3 > 70 milligrams

7X1 = vitamin D contribution (in mg.)
for wheat
14 X2 = vitamin D contribution (in mg.)
for oats
12X3 = vitamin D contribution (in mg.)
for rice
Ingredients Mixing Cont…
• Non Negativity Constraints
As the negative amounts of each
ingredient cannot be in the
cereal, therefore

X1, X2, X3 > 0
Ingredients Mixing Cont…
Final Model
Minimize Z = Rs 0.4 X1 + 0.6 X2 + 0.2 X3

subject to 10X1 + 20 X2 + 8X3 > 100
7X1 + 14 X2 + 12 X3 > 70

X1, X2, X3 > 0
Example 4
• A woodwork company produces three
different kinds of furniture items: Dressing
Tables, chairs and bookracks. The required
wooden materials have to be cut according
to various sizes by machines. In total, 120
machine-hours are available for cutting.
Each unit of dressing table, chairs and
bookracks require 0.8, 0.4 and 0.5 machine-
hours respectively. The company also has
600 man-hours available for painting and
polishing. Each unit of dressing table, chairs
and bookracks require 6, 5 and 4 man-hours
respectively.
Example 4 Cont…
• These products are to be stored in a
warehouse which has a total capacity of
1500 sq. ft. The floor space required by
these three products are 8 sq. ft, 5 sq. ft, and
8 sq. ft, respectively, per unit of each
product. In the market, each item is sold at a
profit of Rs. 550, Rs. 400 and Rs. 350,
respectively. How many units of each
product should be made to obtained the
maximum profit?
Example 4 Cont…
• Decision variables
Let

X1 = No. of dressing tables produced.
X2 = No. of chairs produced.
X3 = No. of bookracks produced.
Example 4 Cont…
• Objective Function

Maximize the profit function.
Z = 550 X1 + 400 X2 + 350 X3
Example 4 Cont…
• Resource Constraints
• For cutting:
0.8 X1 + 0.4 X2 + 0.5 X3 =< 120
• For Painting:
6 X1 + 5X2 + 4 X3 =< 600
• For Storing:
8 X1 + 5X2 + 8 X3 =< 1500
• Non-Negative Constraints X1 , X2 , X3 >= 0
Example 5
• Power Plus-electrical manufac. Comp. producing three
kinds of electrical appliances, which require four
different processes. The man-hour requirements are:
Product Man-hour spent on
Metal Fitting Electric Finishin
Work al g
Refrigerator 0.2 0.5 0.3 0.3
Washing 0.4 0.6 0.6 0.1
Machine
Air 0.2 0.5 0.5 0.2
Conditioner
Example 5 Cont…
• In any one-day, there are 60 man-hours
available in the metal work station, 125
man-hours in the fitting section, 132 man-
hours available in the electrical section and
30 man-hours in the finishing section. Power
Plus gets Rs 700 profit on each refrigerator,
Rs 800 on each washing machine and Rs.
400 on each air conditioner. Read the
problem carefully and formulate it as an LP
model for maximizing profit.
Giapetto’s Woodcarving
• GWC Inc. manufactures two types of
wooden toys: soldiers and trains. A soldier
sells for 27\$ and uses 10\$ worth of raw
materials. Each soldier that is manufactured
increases Giapetto’s variable labor and
overhead costs by 14\$. A train sells for 21\$
and uses 9\$ worth of raw materials. Each
train built increases Giapetto’s variable
labor and overhead costs by 10\$. GWC
requires two types of skilled labor:
Carpentry and Finishing.
Giapetto’s Woodcarving Cont…
• A soldiers requires two hours of finishing
labor and 1 hour of carpentry labor. A train
requires 1 hour of finishing and 1 hour of
carpentry labor. Each week, Giapetto can
obtain all the needed raw materials but only
100 finishing hour and 80 carpentry hours.
Demand for trains is unlimited, but atmost
40 soldiers are bought each week. Giapetto
wants to maximize weekly profit. Formulate
a model of Giapetto’s situation that can be
used to max. Giapetto’s weekly profit.
Giapetto’s Woodcarving Cont…
• Since, Profit = revenue – cost
• Profit of One soldier:
– Soldier’s revenue/unit = 27\$
– Spldier’s worth R. mat/unit= 10\$
– Labor & overhead cost/unit= 14\$
• Total cost/unit = 10 + 14 = 24 \$
• Profit of soldier/unit = 27 – 24 = 3 \$
• Profit of train/unit =21 – (9 + 10) = 2 \$
Giapetto’s Woodcarving Cont…

• Decision Variable
X1 = No. of soldiers produced/week
X2 = No. of trains produced/week

• Objective Function
Z = 3X1 + 2X2
Giapetto’s Woodcarving Cont…

• Constraints
2 X1 + X2 <= 100 (Finishing contrain)
X1 + X2 <= 80 (carpentry)
X1 <= 40
X1, X2 >= 0
Giapetto’s Woodcarving Cont…
• Final Mathematical Model:
• Maximize Objective Function
Z = 3X1 + 2X2
Subject to constraints
2 X1 + X2 <= 100 (Finishing contrain)
X1 + X2 <= 80 (carpentry)
X1 <= 40
X1, X2 >= 0
Giapetto’s Woodcarving Cont…

Labor hour/ unit

Carpentry Finishing Profit/unit
( \$)
Soldiers 1 2 3

Trains 1 1 2
Graphical Solution to LP Models
For two variables only:
2) Finding feasible Solution Space
• Convert all inequalities into equations
• Name the axes in coord. Plane as decision
variables
• Draw these equations one by one in 2D plane.
• Each equation will divide the coord. Plane in
two halves.
• Select reference point in 2D plane, moslty
origin (0, 0).
Graphical Solution to LP Models Cont…
• Test the reference point into inequality, if
satisfied, then the half containing ref. Point will
be the feasible side, otherwise opposite side will
be feasible space.
• If line passes through origin, select any other
point as reference.
1) Compute corner points of solution space
• As every point is an intersection of two
equations.
Graphical Solution to LP Models Cont…
1) Finding Optimum Solution
• Draw isoprofit/isocost line by choosing
atleast two points in feasible region and
compute its Z-value.
• It will indicate the direction of Z, either
increasing or decreasing
• Draw all isoprofit lines by moving parallel to
it in the increasing/decreasing direction of Z.
• Keep moving isoprofit line untill we reach at
corner point, beyond which any further
increase in Z will put us outside the optimum
solution space
Graphical Solution to LP Models Cont…

• The Optimum Solution exist at any one of
the corner points of the fesible solution
space, always.
Graphical Solution Cont…
• Maximize Z = 5x1 + 4x2
Subject to
6x1 + 4x2 <= 24
x1 + 2x2 <= 6
-x1 + x2 <= 1
x2 <= 2
x1>= 0
x2>= 0
Graphical Solution Cont…
Classification of Constraints
• Binding
– If LHS = RHS(When decision variables are
substituted into the constraints)

• Non Binding constraints
– If LHS = RHS(When decision variables are
substituted into the constraints)
• Convex Sets
– If the line segment joining any pair of points in
a set S is wholly contained in S.
• Extreme Points/Corner Points
– If each line segment that lies completely in S
and contains the point P as an end point of the
line segment.
Dorian Auto manufactures
• Dorino Auto manufactures luxury cars and trucks.
The company believes that its most likely customers
are high income women HIW and men HIM. To
reach these groups, Dorian Auto has embarked on an
ambitious TV advertising and has decided to
purchase 1-minute of commercial spots on two types
of programs: Comedy show and football games.
Each comedy commercial is seen by 7 million HIW
and 2 million HIM. Each football commercial is seen
by 2 million HIW and 12 million HIM. A 1-min.
costs 100,000. Dorian would like the commercials to
be seen by at least 28 million HIW and 24 million
HIM. Objective = Min. cost of ad requirments.
Auto manufactures Cont…
• X1 = no. of 1-minute comedy ads purchased
• X2 = no. of 1-minute football ads purchased
+
Auto manufactures Cont…
• HIW =
+
• HIM =
+
Auto manufactures Cont…
Minimize Z = 50 x1 + 100 x2
subject to
7 x1 + 2 x2 >= 28 (HIW)
2 x1 + 12 x2 >= 24 (HIM)
x1>= 0
x2>= 0
Auto manufactures Cont…
Special Cases
• Alternative or Multiple Optimal Solutions.
– Range of Optimality (e.g Reddy Mikks)
• Some LPs have no feasible solutions

• Some LPs are unbounded: There are points
in the feasible region with arbitrarily large
(in a max problem) z-values.
1. Alternative optimal Solution
• 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, 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 profit.
Alter. optimal Solution cont…
• X1 = no. of trucks produced daily.
• X2 = no. of cars produced daily

Paint shop assembly Profit per
produces shop prod. unit(\$)
per day Per day
Cars 60 50 200

Trucks 40 50 300
Alter. optimal Solution cont…
• Max Z = 300 X1 + 200 X2
(for paint shop)
Since, 60 cars produced = 1 day
1 car produced = 1 / 60 days

(fraction of day)
similarly,
40 trucks produced = 1 day
1 truck produced = 1 / 40 days
(fraction of day)
Alter. optimal Solution cont…
(for body assembly shop)
Since, 50 cars produced = 1 day
1 car produced = 1 / 50 days
(fraction of day)
similarly,
50 trucks produced = 1 day
1 truck produced = 1 / 50 days
(fraction of day)
Alter. optimal Solution cont…
• Constraints

1 / 40 X1 + 1 / 60 X2 <= 1
(Paint shop constraint)
1 / 50 X1 + 1 / 50 X2 <= 1
(Body assembly shop constraint)
Alter. optimal Solution cont…
• Final Model is:
Max Z = 300 X1 + 200 X2
Subject to
3 X1 + 2 X2 <=120
(Paint shop constraint)
1 X1 + 1X2 <= 50
(Body assembly shop constraint)
X1 >= 0
X2 >= 0
Alter. optimal Solution cont…
2. Infeasible LP

• 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.
2. Infeasible LP Cont…
The New Mathematical Model is:
Max Z = 300 X1 + 200 X2
Subject to
3 X1 + 2 X2 <=120
1 X1 + 1X2 <= 50
X1 >= 30
X2 >= 20
X1 >= 0
X2 >= 0
2. Infeasible LP Cont…
3. Unbounded LP
• For Max. Problem:
– An unbdd. LP occurs if it is possible to find
points in the feasible region with arbitrarily
large z-values, which corresponds to a decision
maker earning arbitrarily large revenues or
profits.
– A max. problem is unbdd. If, when we move
parallel to our original isoprofit line in the
direction of increasing Z.
– It indicates the probability of incorrect
formulated problem
– Wrong input values are entered.
3. Unbounded LP Cont…

• For Min. Problem:
– An LP is unbdd. If there are points in the
feasible region with arbitrarily small z-values.
– A minimization problem is unbdd. If isocost
line never leave the feasible region, while
moving in the direction of decreasing Z.
3. Unbounded LP Cont…
• Graphically solve the following LP:
max Z = 2 X1 – X2
subject to
X1 – X2 <= 1
2 X1 + X2 >= 6
X1, X2 >= 0
3. Unbounded LP Cont…
Exp: Momiss River
• There are 3 factories on the Momiss River (1, 2, 3).Each
emits two types of pollutants (1 and 2)into the river. If the
waste from each factory is processed, the pollution in the
river can be reduced. It costs \$15 to process a ton of factory
1 waste and each ton processed reduces the amount of
pollutant 1 by 0.10 ton and the amount of pollutant 2 by
0.45 ton. It costs \$10 to process a ton of factory 2 waste,
and each ton processed will reduce the amount of pollutant
1 by 0.20 ton and the amount of pollutant 2 by o.25 ton. It
costs \$20 to process a ton of factory 3 waste, and each ton
processed will reduce the amount of pollutant 1 by 0.40 ton
and the amount of pollutant 2 by o.30 ton. The states wants
to reduce the amount of pollutant 1in the river by at least 30
tons and the amount of pollutant 2 in the river by at least 40
tons. Formulate an LP to min. cost of reducing pollution by
the desired amounts.
The Simplex Algorithm
• Used to solve LPs with thousands of
variables and constraints.
• An iterative method.
• Each iteration improves the value of
objective function.
• It requires a standard form of LP.
Two Conditions
• All the constraints (with the exception of
non-negative restrictions) are equations
with a non-negative RHS.
• All the variables are non-negative.
Conversion of LP to standard form
• Slack variables
– Used in constraints involving <= sign, to
convert into equation.
e.g. X1 + X2 <= 40 and 2 X1 + X2 <= 60
X1 + X2 + S1 = 40 and 2 X1 + X2 + S2 = 60
– Where S1 and S2 are slacks and non-negative
i.e S1, S2 >= 0
Conversion of LP to standard form
• Excess/Surplus variables
– Used in constraints involving >= sign, to
convert into equation.
e.g. X1 + X2 >= 40 and 2 X1 + X2 >= 60
X1 + X2 - e1 = 40 and 2 X1 + X2 - e2 = 60
– Where e1 and e2 are excess variables and non-
negative.
i.e e1, e2 >= 0
An example of standard form

• Max z = 20 x1 +15 x2 • Max z = 20 x1 +15 x2
s.t. X1 <= 100 s.t. x1 + s1 = 100
x2 <= 100 x2 + s2 = 100
50 x1 + 35 x2 <= 6000 50 x1 + 35 x2+s3= 6000
20 x1 + 15 x2 >= 2000 20 x1 + 15 x2–e4 = 2000
x1, x2 >= 0 x1, x2,s1,s2,s3,e4 >= 0
Which is a standard form.
Basic Solution to Linear System Cont…
• Non basic variables : NBV
n – m variables, which are arbitrarily chosen as
zero, called NBV
• Basic variables : BV
Remaining m variables( which are determined by
solving simultaneous equations) are called BV.
Optimality and Feasibility Conditions Cont…

• Feasibility Condition
– For both the max. and min. problems, the
leaving variable is the basic variable associated
with the smallest non-negative ratio (with
strictly positive denominator)
– Ties are broken arbitrarily.
The Simplex Algorithm
1) Convert the LP to standard form and then into
tableau form.
2) Find the starting basic feasible solution.
3) Determine whether the current bfs is
optimal(using optimality condition select an
entering variable). Stop, if there is no entering
variable; last solution is optimal.
4) Select a leaving variable using the feasibility
condition.
5) Determine the new basic solution by using
appropriate Gauss-Jordan computations.
6) Go To step 3.
Example: Simplex Algorithm
• Reddy Mikks Paints: Interior and Exterior
• Maximize Z = 5x1 + 4x2
Subject to
6x1 + 4x2 <= 24
x1 + 2x2 <= 6
-x1 + x2 <= 1
x2 <= 2
x1 >= 0
x2 >= 0
Example: Simplex Algorithm Cont…
• Standard form of Reddy Mikks model is:
• Maximize Z=5x1+4x2+0s1+0s2+0s3+0s4
Subject to
6x1 + 4x2 + s1 = 24
x1 + 2x2 + s2 = 6
-x1 + x2 + s3 = 1
x2 + s4 = 2
x1, x2,s1,s2,s3,s4 >= 0
NBV(zero):{x1,x2} ; BV:{s1,s2,s3,s4}
Example: Simplex Algorithm Cont…
• Tableau form:
Basi Z X1 X2 S1 S2 S3 S4 Solu Ratio
c .
Z 1 -5 -4 0 0 0 0 0

S1 0 6 4 1 0 0 0 24 4

S2 0 1 2 0 1 0 0 6 6

S3 0 -1 1 0 0 1 0 1 -1

S4 0 0 1 0 0 0 1 2 infinit
Example: Simplex Algorithm Cont…
• NBV ={s1,x2} ; BV={x1,s1,s2,s3}
basic Z X1 X2 S1 S2 S3 S4 Sol. ratio
Z 1 0 -2/3 5/6 0 0 0 20
X1 0 1 2/3 1/6 0 0 0 4 4
S2 0 0 4/3 -1/6 1 0 0 2 6
S3 0 0 5/3 1/6 0 1 0 5 -1
S4 0 0 1 0 0 0 1 2 Inf.
Example: Simplex Algorithm Cont…
basi Z X1 X2 S1 S2 S3 S4 Sol. ratio
c
Z 1 0 -2/3 5/6 0 0 0 20
X1 0 1 2/3 1/6 0 0 0 4 6
S2 0 0 4/3 -1/6 1 0 0 2 1.5
S3 0 0 5/3 1/6 0 1 0 5 3
S4 0 0 1 0 0 0 1 2 2
Example: Simplex Algorithm Cont…

basic Z X1 X2 S1 S2 S3 S4 Sol. ratio

Z 1 0 0 3/4 ½ 0 0 21
X1 0 1 0 ¼ -1/2 0 0 3
X2 0 0 1 -1/8 ¾ 0 0 3/2
S3 0 0 0 3/8 -5/4 1 0 5/2
S4 0 0 0 1/8 -3/4 0 1 ½
Alternative Optimal Solutions in Simplex Algorithm

• Maximize Z = 60x1+35x2+20x3
Subject to
8x1+6x2+x3 <= 48
4x1+2x2+1.5x3 <= 20
2x1+1.5x2+0.5x3 <= 8
x2 <= 5
x1,x2,x3 >= 0
Basic and Non Basic Variables
• After the Gauss Jordan method has been
applied to any linear system, a variable that
appears with a coefficient of 1 in a single
equation and a coefficient of 0 in all other
equations is called a basic variable.
• Any variable that is not basic is called Non-
basic variable.
Alternative Optimal Solutions in Simplex Algorithm

• Maximize Z = 60x1+35x2+20x3
Subject to
8x1+6x2+x3+S1 = 48
4x1+2x2+1.5x3+S2 = 20
2x1+1.5x2+0.5x3+S3 = 8
x2 +S4= 5
x1,x2,x3,S1,S2,S3,S4 >= 0
Alternative Optimal Solutions in Simplex Algorithm
• BV={S1,S2,S3,S4} NBV={X1,X2,X3}

Bas Z X1 X2 X3 S1 S2 S3 S4 Sol Rat
Z 1 -60 -35 -20 0 0 0 0 0
S1 0 8 6 1 1 0 0 0 48 6
S2 0 4 2 1.5 0 1 0 0 20 5
S3 0 2 1.5 0.5 0 0 1 0 8 4
S4 0 0 1 0 0 0 0 1 5 Inf.
Alternative Optimal Solutions in Simplex Algorithm

BV={S1,S2,X1,S4} NBV={S3,X2,X3}
Bas Z X1 X2 X3 S1 S2 S3 S4 Sol Rat

Z 1 0 10 -5 0 0 30 0 240

S1 0 0 0 -1 1 0 -4 0 16

S2 0 0 -1 .5 0 1 -2 0 4

X1 0 1 .75 .25 0 0 .5 0 4

S4 0 0 1 0 0 0 0 1 5
Alternative Optimal Solutions in Simplex Algorithm
BV={S1,S2,X1,S4} NBV={S3,X2,X3}

Bas Z X1 X2 X3 S1 S2 S3 S4 Sol Rat

Z 1 0 10 -5 0 0 30 0 24
0
S1 0 0 0 -1 1 0 -4 0 16 -16

S2 0 0 -1 .5 0 1 -2 0 4 8

X1 0 1 .75 .25 0 0 .5 0 4 16

S4 0 0 1 0 0 0 0 1 5 Inf.
Alternative Optimal Solutions in Simplex Algorithm
BV={S1,X3,X1,S4} NBV={S3,X2,S2}
Bas Z X1 X2 X3 S1 S2 S3 S4 Sol Rat

Z 1 0 0 0 0 10 10 0 280

S1 0 0 -2 0 1 2 -8 0 24
X3 0 0 -2 1 0 2 -4 0 8
X1 0 1 1.25 0 0 -0.5 1.5 0 2
S4 0 0 1 0 0 0 0 1 5
Alternative Optimal Solutions in Simplex Algorithm

Question
• How to determine, there exist a unique solution?
• If there is no non-basic variable with a zero
coefficient in row 0 of the optimal tableau then
the LP has a unique optimal solution.
– Even if there is non-basic variable with zero
coefficient in row 0 of the optimal tableau, it is
possible that the LP may not have alternative optimal
solutions.
Alternative Optimal Solutions in Simplex Algorithm
BV={S1,X3,X1,S4} NBV={S3,X2,S2}

Bas Z X1 X2 X3 S1 S2 S3 S4 Sol Rat

Z 1 0 0 0 0 10 10 0 280

S1 0 0 -2 0 1 2 -8 0 24
X3 0 0 -2 1 0 2 -4 0 8
X1 0 1 1.25 0 0 -0.5 1.5 0 2 1.6
S4 0 0 1 0 0 0 0 1 5 5
Alternative Optimal Solutions in Simplex Algorithm
BV={S1,X3,X2,S4} NBV={S3,X1,S2}
Bas Z X1 X2 X3 S1 S2 S3 S4 Sol Rat

Z 1 0 0 0 0 10 10 0 280

S1 0 1.6 0 0 1 1.2 -5.6 0 27.2
X3 0 1.6 0 1 0 1.2 -1.6 0 11.2
X2 0 0.8 1 0 0 -0.4 1.2 0 1.6

S4 0 -0.8 0 0 0 0.4 -1.2 1 3.4
Exercise 1
• Check whether the solution is unique or
alternative solution?
Max z = x1 + x2
s.t. x1 + x2 + x3 <= 1
x1 + 2x3<= 1
x1,x2,x3 >= 0
Exercise 2
Ghostbusters, Inc., exorcised (gets rid of) ghosts.
During each of the next three months, the company
will receive the following number of calls from
people who want their ghosts exorcised: Jan 100
calls, Feb 300, Mar 200. Ghostbusters is paid 800\$
for each ghost exorcised during the month in which
the customer calls. Calls need not be responded to
during the month they are made, but if a call is
responded to one month after it is made, then
Ghostbusters looses 100\$ in future goodwill, and is
a call is responded to two months after it is made,
Ghostbusters looses 200\$ in future goodwill.
Exercise 2 Cont…
Each employee of Ghostbusters can exorcise 10
ghosts during a month. Each employee is paid a
salary of 4000\$ per month. At the beginning of
January, the company has 8 workers. Workers can
be hired and trained (in 0 time) at a cost of 5000\$
per worker. Workers can be fired at a cost of
4000\$ per worker. Formulate an LP to maximize
Ghostbusters profit(revenue less costs)over the
next months. Assume that all calls must be
handled by the end of March.
Unbounded LPs with Simplex
and sourdough. Each loaf of French bread can be
sold for 36c and each loaf of sourdough bread for
30c. A loaf of French bread requires 1 yeast packet
and 6 oz of flour; sourdough requires 1 yeast packet
and 5 oz of flour. At present, Breadco has 5 packets
and 10 oz of flour. Additionally yeast packets can be
purchased at 3c each and additional flour at 4c/oz.
Formulate and solve an LP that can be used to
Unbounded LPs with Simplex Cont…
• X1 = # of loaves of French bread
baked
• X2 = # of loaves of sourdough bread
baked
• X3 = # of yeast packets purchased
• X4 = # of ounces of flour purchased
Unbounded LPs with Simplex Cont…
Maximize Profit = Revenues – Costs
Since, 1 French bread sold for = 36c
And 1 sourdough bread sold for = 36c
Therefore, Revenue = 36 X1+ 30 X2
Also, 1 Yeast packet costs = 3c
1 oz flour costs = 4c
Therefore, Cost = 3X3 + 4X4
So Max Z = 36 X1+ 30 X2 - 3X3 - 4X4
Unbounded LPs with Simplex Cont…
• Constraints
Consumed Yeast < = Available Yeast
1X1 + 1X2 <= 5 + X3
OR 1X1 + 1X2 – X3 <= 5
And
Consumed Flour < = Available Flour
6 X1 + 5X2 <= 10 + X4
Or 6 X1 + 5X2 – X4 <= 10
Unbounded LPs with Simplex Cont…
• Hence Final Model is:

Max Z = 36 X1+ 30 X2 - 3X3 - 4X4
Subject to
1X1 + 1X2 – X3 <= 5
6 X1 + 5X2 – X4 <= 10
X1, X2, X3, X4 >= 0
Unbounded LPs with Simplex Cont…
• BV={S1, S2} NBV = {X1, X2, X3, X4 }

Basi Z X1 X2 X3 X4 S1 S2 Sol rati

Z 1 -36 -30 3 4 0 0 0

S1 0 1 1 -1 0 1 0 5 5

S2 0 6 5 0 -1 0 1 10 5/3
Unbounded LPs with Simplex Cont…
• BV={S1, X1} NBV = {S2, X2, X3, X4 }

Basi Z X1 X2 X3 X4 S1 S2 Sol Rati

Z 1 0 0 3 -2 0 6 60

S1 0 0 1/6 -1 1/6 1 -1/6 10/3

X1 0 1 5/6 0 -1/6 0 1/6 5/3
Unbounded LPs with Simplex Cont…
• BV={S1, X1} NBV = {S2, X2, X3, X4 }

Basi Z X1 X2 X3 X4 S1 S2 Sol Rati

Z 1 0 0 3 -2 0 6 60

S1 0 0 1/6 -1 1/6 1 -1/6 10/3 20

X1 0 1 5/6 0 -1/6 0 1/6 5/3 Neg
Unbounded LPs with Simplex Cont…
• BV={X4, X1} NBV = {S2, X2, X3, S1 }

Basi Z X1 X2 X3 X4 S1 S2 Sol Rati

Z 1 0 2 -9 0 12 4 100

X4 0 0 1 -6 1 6 -1 20 Neg

X1 0 1 1 -1 0 1 0 5 Neg
Unbounded LPs with Simplex Cont…

• An unbounded LP problem occurs
when a variable with negative
coefficient in row 0 has a non-
positive coefficient in each
constraint.