Business Maths..Linear Programming 2

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

Transcript of Business Maths..Linear Programming 2

Page 1: Business Maths..Linear Programming 2

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

Page 2: Business Maths..Linear Programming 2

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 .

Page 3: Business Maths..Linear Programming 2

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.

In LP

Page 4: Business Maths..Linear Programming 2

LP

• LP - step-by-step iterative process.• Each step – improve the solution

until the "best answer“ or• No feasible answer exists.

Page 5: Business Maths..Linear Programming 2

Mathematical ModelingOR

Formulation

Page 6: Business Maths..Linear Programming 2

Components of Model

• Three Basic Components– Decision Variables

– Objective Function

– Constraints

Page 7: Business Maths..Linear Programming 2

Objectives

• Maximize – Profit, Return Rate and Reliability.

• Minimize – Cost, Loss, energy Consumption

Page 8: Business Maths..Linear Programming 2

Format of Model

• Maximize/Minimize

(Objective Function )

Subject to

Constraints (equalities,inequalities)

Page 9: Business Maths..Linear Programming 2

Constraints

1. Limitations of Funds2. quantity of raw materials

available,3. the level of demand for the

products,4. the equipment productive

Capacity

Page 10: Business Maths..Linear Programming 2

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.

Page 11: Business Maths..Linear Programming 2

Non Negative Constraints

• Some elements which will remain non negative. e.g– Cricket Stadium– Buses in transport– Furniture ( Like Chairs) etc.

Page 12: Business Maths..Linear Programming 2

Feasible Solution

• Any solution that satisfy all the constraints of the model constitute a feasible solution.

Page 13: Business Maths..Linear Programming 2

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

Page 14: Business Maths..Linear Programming 2

Cont…Products Labor

Hrs/unit

Clay

lbs/unit

Profit

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

Page 15: Business Maths..Linear Programming 2

Decision Variables

Let

X1 = the number of plates to produce

 X2 = the number of mugs to produce

Page 16: Business Maths..Linear Programming 2

Objective Function

Total profit, Z, can be expressed as

  Maximize Z = 4X1 + 5X2

Page 17: Business Maths..Linear Programming 2

Model Constraints

• 1X1 + 2X2 < 40 hours

• 4X1 + 3X2 < 120 pounds

Page 18: Business Maths..Linear Programming 2

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

Page 19: Business Maths..Linear Programming 2

Final Model

The complete LP model for this problem will be

Maximize Z = 4X1 + 5X2

subject to 1X1 + 2X2 < 404X1 + 3X2 < 120 X1, X2 > 0

Page 20: Business Maths..Linear Programming 2

Solution

X1 = 24 plates

X2 = 8 mugs

and profit Z = Rs. 136.

Page 21: Business Maths..Linear Programming 2

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:

Exterior paint Interior paint Max. daliy avalblty(tons)

R.Mat. M1 6 4 24

R. Mat. M2 1 2 6

Prft/ton ($1000)

5 4

Tons of raw mat./ ton of

Page 22: Business Maths..Linear Programming 2

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.

Page 23: Business Maths..Linear Programming 2

Example2 Cont… Construction of model

1. Decision VariablesLet

• X1 =Tons produced daily of Exterior paint

• X2 = Tons produced daily of Interior paint

Page 24: Business Maths..Linear Programming 2

Example2 Cont…

2. 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.

Page 25: Business Maths..Linear Programming 2

Example2 Cont…

3. 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

Page 26: Business Maths..Linear Programming 2

Example2 Cont…

6 x1 + 4 x2 <= 24

x1 + 2 x2 <= 6

- x1 + x2 <= 1

x2 <= 2

X1, X2 >= 0

Page 27: Business Maths..Linear Programming 2

Example2 Cont…• The Final Model is:Maximize the profit

Z = 5 x1 + 4 x2Subject to

6 x1 + 4 x2 <= 24 x1 + 2 x2 <= 6- x1 + x2 <= 1

x2 <= 2 X1, X2 >= 0

Page 28: Business Maths..Linear Programming 2

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.

Page 29: Business Maths..Linear Programming 2

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

Mg/oz

Oats

Mg/oz

Rice

Mg/oz

Mgs Reqd/box

A 10 20 08 100

D 07 14 12 70

Page 30: Business Maths..Linear Programming 2

Ingredients Mixing Cont…

• Decision variables– Let

X1 = ounces of wheat

X2 = ounces of oats

X3 = ounces of rice

• Objective FunctionMin Cost Z = Rs. 0.4X1 + 0.6X2 + 0.2X3

Page 31: Business Maths..Linear Programming 2

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

Page 32: Business Maths..Linear Programming 2

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

Page 33: Business Maths..Linear Programming 2

Ingredients Mixing Cont…• Non Negativity Constraints

As the negative amounts of each ingredient cannot be in the cereal, therefore

 X1, X2, X3 > 0

Page 34: Business Maths..Linear Programming 2

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

Page 35: Business Maths..Linear Programming 2

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.

Page 36: Business Maths..Linear Programming 2

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?

Page 37: Business Maths..Linear Programming 2

Example 4 Cont…• Decision variables

Let

X1 = No. of dressing tables produced.

X2 = No. of chairs produced.

X3 = No. of bookracks produced.

Page 38: Business Maths..Linear Programming 2

Example 4 Cont…

• Objective Function

Maximize the profit function.

Z = 550 X1 + 400 X2 + 350 X3

Page 39: Business Maths..Linear Programming 2

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

Page 40: Business Maths..Linear Programming 2

Example 5• Power Plus-electrical manufac. Comp. producing three

kinds of electrical appliances, which require four different processes. The man-hour requirements are:

ProductProduct Man-hour spent onMan-hour spent on

Metal Metal WorkWork

FittingFitting ElectricElectricalal

FinishinFinishingg

RefrigeratorRefrigerator 0.20.2 0.50.5 0.30.3 0.30.3

Washing Washing MachineMachine

0.40.4 0.60.6 0.60.6 0.10.1

Air Air ConditionerConditioner

0.20.2 0.50.5 0.50.5 0.20.2

Page 41: Business Maths..Linear Programming 2

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.

Page 42: Business Maths..Linear Programming 2

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.

Page 43: Business Maths..Linear Programming 2

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.

Page 44: Business Maths..Linear Programming 2

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 $

Page 45: Business Maths..Linear Programming 2

Giapetto’s Woodcarving Cont…

• Decision VariableX1 = No. of soldiers produced/week

X2 = No. of trains produced/week

• Objective FunctionZ = 3X1 + 2X2

Page 46: Business Maths..Linear Programming 2

Giapetto’s Woodcarving Cont…

• Constraints2 X1 + X2 <= 100 (Finishing contrain)

X1 + X2 <= 80 (carpentry)

X1 <= 40

X1, X2 >= 0

Page 47: Business Maths..Linear Programming 2

Giapetto’s Woodcarving Cont…• Final Mathematical Model:

• Maximize Objective FunctionZ = 3X1 + 2X2

Subject to constraints

2 X1 + X2 <= 100 (Finishing contrain)

X1 + X2 <= 80 (carpentry)

X1 <= 40

X1, X2 >= 0

Page 48: Business Maths..Linear Programming 2

Giapetto’s Woodcarving Cont…

Carpentry Finishing Profit/unit

( $)

Soldiers 1 2 3

Trains 1 1 2

Labor hour/ unit

Page 49: Business Maths..Linear Programming 2

Graphical Solution to LP ModelsFor two variables only:

1) 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).

Page 50: Business Maths..Linear Programming 2

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.

2) Compute corner points of solution space• As every point is an intersection of two

equations.

Page 51: Business Maths..Linear Programming 2

Graphical Solution to LP Models Cont…2) 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

Page 52: Business Maths..Linear Programming 2

Graphical Solution to LP Models Cont…

• The Optimum Solution exist at any one of the corner points of the fesible solution space, always.

Page 53: Business Maths..Linear Programming 2

Graphical Solution Cont…

• Maximize Z = 5x1 + 4x2Subject to

6x1 + 4x2 <= 24 x1 + 2x2 <= 6 -x1 + x2 <= 1 x2 <= 2

x1>= 0 x2>= 0

Page 54: Business Maths..Linear Programming 2

Graphical Solution Cont…

Page 55: Business Maths..Linear Programming 2

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)

Page 56: Business Maths..Linear Programming 2

• 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.

Page 57: Business Maths..Linear Programming 2

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. comedy ad costs $50,000 and a 1-min football ad 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.

Page 58: Business Maths..Linear Programming 2

Auto manufactures Cont…

• X1 = no. of 1-minute comedy ads purchased

• X2 = no. of 1-minute football ads purchased

Total Ad Cost =

(cost/comedy ad) (total comedy ads)

+

(cost/football ad) (total football ads)

Page 59: Business Maths..Linear Programming 2

Auto manufactures Cont…• HIW =

(HIW/comedy ad) (total comedy ads)

+

(HIW/football ad) (total football ads)

• HIM = (HIM/comedy ad) (total comedy ads)

+

(HIM/football ad) (total football ads)

Page 60: Business Maths..Linear Programming 2

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

Page 61: Business Maths..Linear Programming 2

Auto manufactures Cont…

Page 62: Business Maths..Linear Programming 2

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.

Page 63: Business Maths..Linear Programming 2

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.

Page 64: Business Maths..Linear Programming 2

Alter. optimal Solution cont…• X1 = no. of trucks produced daily.

• X2 = no. of cars produced daily

Paint shop produces per day

assembly shop prod. Per day

Profit per unit($)

Cars 60 50 200

Trucks 40 50 300

Page 65: Business Maths..Linear Programming 2

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)

Page 66: Business Maths..Linear Programming 2

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)

Page 67: Business Maths..Linear Programming 2

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)

Page 68: Business Maths..Linear Programming 2

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

Page 69: Business Maths..Linear Programming 2

Alter. optimal Solution cont…

Page 70: Business Maths..Linear Programming 2

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.

Page 71: Business Maths..Linear Programming 2

2. Infeasible LP Cont…

The New Mathematical Model is:Max Z = 300 X1 + 200 X2Subject to 3 X1 + 2 X2 <=120

1 X1 + 1X2 <= 50X1 >= 30X2 >= 20X1 >= 0

X2 >= 0

Page 72: Business Maths..Linear Programming 2

2. Infeasible LP Cont…

Page 73: Business Maths..Linear Programming 2

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.

Page 74: Business Maths..Linear Programming 2

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.

Page 75: Business Maths..Linear Programming 2

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

Page 76: Business Maths..Linear Programming 2

3. Unbounded LP Cont…

Page 77: Business Maths..Linear Programming 2

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.

Page 78: Business Maths..Linear Programming 2

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.

Page 79: Business Maths..Linear Programming 2

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.

Page 80: Business Maths..Linear Programming 2

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– After adding slack variables:

X1 + X2 + S1 = 40 and 2 X1 + X2 + S2 = 60– Where S1 and S2 are slacks and non-negative

i.e S1, S2 >= 0

Page 81: Business Maths..Linear Programming 2

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– After adding excess variables:

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

Page 82: Business Maths..Linear Programming 2

An example of standard form

• Max z = 20 x1 +15 x2

s.t. X1 <= 100

x2 <= 100

50 x1 + 35 x2 <= 6000

20 x1 + 15 x2 >= 2000

x1, x2 >= 0

• Max z = 20 x1 +15 x2

s.t. x1 + s1 = 100

x2 + s2 = 100

50 x1 + 35 x2+s3= 6000

20 x1 + 15 x2–e4 = 2000

x1, x2,s1,s2,s3,e4 >= 0

Which is a standard form.

Page 83: Business Maths..Linear Programming 2

Basic Solution to Linear System Cont…

• Non basic variables : NBVn – m variables, which are arbitrarily chosen as

zero, called NBV

• Basic variables : BVRemaining m variables( which are determined by

solving simultaneous equations) are called BV.

Page 84: Business Maths..Linear Programming 2

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.

Page 85: Business Maths..Linear Programming 2

The Simplex Algorithm1) 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.

Page 86: Business Maths..Linear Programming 2

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

Page 87: Business Maths..Linear Programming 2

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}

Page 88: Business Maths..Linear Programming 2

Example: Simplex Algorithm Cont…

• Tableau form:Basic

Z X1 X2 S1 S2 S3 S4 Solu.

Z 1 -5 -4 0 0 0 0 0

S1 0 6 4 1 0 0 0 24

S2 0 1 2 0 1 0 0 6

S3 0 -1 1 0 0 1 0 1

S4 0 0 1 0 0 0 1 2

Ratio

4

6

-1

infinit

Page 89: Business Maths..Linear Programming 2

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.

Page 90: Business Maths..Linear Programming 2

Example: Simplex Algorithm Cont…

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 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

Page 91: Business Maths..Linear Programming 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 ½

Page 92: Business Maths..Linear Programming 2

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

Page 93: Business Maths..Linear Programming 2

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.

Page 94: Business Maths..Linear Programming 2

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

Page 95: Business Maths..Linear Programming 2

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.

Page 96: Business Maths..Linear Programming 2

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

Page 97: Business Maths..Linear Programming 2

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 -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.

Page 98: Business Maths..Linear Programming 2

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

Page 99: Business Maths..Linear Programming 2

Alternative Optimal Solutions in Simplex Algorithm

Question

• How to determine, there exist a unique solution?

Answer

• 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.

Page 100: Business Maths..Linear Programming 2

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

Page 101: Business Maths..Linear Programming 2

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

Page 102: Business Maths..Linear Programming 2

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

Page 103: Business Maths..Linear Programming 2

Exercise 2Ghostbusters, 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.

Page 104: Business Maths..Linear Programming 2

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.

Page 105: Business Maths..Linear Programming 2

Unbounded LPs with Simplex• Breadco Bakeries bakes two kinds of bread: French

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 maximize Breadco’s profit.

Page 106: Business Maths..Linear Programming 2

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

Page 107: Business Maths..Linear Programming 2

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

Page 108: Business Maths..Linear Programming 2

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

Page 109: Business Maths..Linear Programming 2

Unbounded LPs with Simplex Cont…

• Hence Final Model is:

Max Z = 36 X1+ 30 X2 - 3X3 - 4X4Subject to

1X1 + 1X2 – X3 <= 56 X1 + 5X2 – X4 <= 10

X1, X2, X3, X4 >= 0

Page 110: Business Maths..Linear Programming 2

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

Page 111: Business Maths..Linear Programming 2

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

Page 112: Business Maths..Linear Programming 2

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

Page 113: Business Maths..Linear Programming 2

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

Page 114: Business Maths..Linear Programming 2

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.