INDUSTRIAL STATISTICS AND OPERATIONAL MANAGEMENT 2: Linear Programming Problem (LPP) Dr. Ravi Mahendra Gor Associate Dean ICFAI Business School ICFAI HOuse, Nr. GNFC INFO Tower S. G. Road Bodakdev Ahmedabad380054 Ph.: 07926858632 (O); 07926464029 (R); 09825323243 (M) Email:
[email protected] CONTENTS Introduction Requirements of a Linear Programming Problem Model components Basic Assumptions (Properties) of LP Steps of formulating Linear Programming Problem (LPP) Exercise General form of LPP Solving the Linear Programming Problem Graphical Method of solving LPP Extreme point approach Isoprofit (cost) function line approach Special cases in LP Alternative (or Multiple) Optimal Solution An Unbounded Solution Infeasible Solution Redundant Constraint Simplex Method Simplex Algorithm : (Maximization Case) Simplex Algorithm : Minimization case Two – Phase Method Big – M method Duality in LPP Duality Theorems Review Exercise
CHAPTER 2 LINEAR PROGRAMMING (LP) 2.1 Introduction A typical mathematical program consists of a single objective function, representing either profits to be maximized or costs to be minimized, and a set of constraints that circumscribe the decision variables. In the case of a linear program (LP) the objective function and constraints are all linear functions of the decision variables. At first glance these restrictions would seem to limit the scope of the LP model, but this is hardly the case. Because of its simplicity, softwares are capable of solving problems containing millions of variables and tens of thousands of constraints have been developed. Countless realworld applications have been successfully modeled and solved using linear programming techniques.
Linear programming is a widely used model type that can solve decision problems with thousands of variables. Generally, the feasible values of the decision variables are limited by a set of constraints that are described by mathematical functions of the decision variables. The feasible decisions are compared using an objective function that depends on the decision variables. For a linear program the objective function and constraints are required to be linearly related to the variables of the problem.
The examples in the forthcoming section illustrate that linear programming can be used in a wide variety of practical situations. We illustrate how a situation can be translated into a mathematical model, and how the model can be solved to find the optimum solution.
A Linear Programming problem (LPP) is a special case of a Mathematical Programming problem. From an analytical perspective, a mathematical program tries to identify an extreme (i.e., minimum or maximum) point of a function f(x1, x2, …xn), which furthermore satisfies a set of constraints, e.g., g(x1, x2, …xn) ≥ b. Linear programming is the specialization of mathematical programming to the case where both, function f  to be called the objective function and the problem constraints are linear.
From an applications perspective, mathematical (and therefore, linear) programming is an optimization tool, which allows the rationalization of many managerial and/or technological decisions required by contemporary technosocioeconomic applications. An important factor for the applicability of the mathematical programming
11
methodology in various application contexts is the computational tractability of the resulting analytical models. Under the advent of modern computing technology, this tractability requirement translates to the existence of effective and efficient algorithmic procedures able to provide a systematic and fast solution to these models. For Linear Programming problems, the Simplex algorithm, discussed later in the text, provides a powerful computational tool, able to provide fast solutions to very largescale applications, sometimes including hundreds of thousands of variables (i.e., decision factors). In fact, the Simplex algorithm was one of the first Mathematical Programming algorithms to be developed (George Dantzig, 1947), and its subsequent successful implementation in a series of applications significantly contributed to the acceptance of the broader field of Operations Research as a scientific approach to decision making.
As it happens, however, with every modeling effort, the effective application of Linear Programming requires good understanding of the underlying modeling assumptions, and a pertinent interpretation of the obtained analytical solutions. Therefore, in this section we discuss the details of the LP modeling and its underlying assumptions. 2.2 Requirements of a Linear Programming Problem In the past 50 years, LP has been applied extensively to defence, industrial, financial, marketing, accounting, and agricultural problems. Even though these applications are diverse, all LP problems have four properties in common. 1. All problems seek to maximize or minimize some function, usually profit or cost. We refer to this property as the objective function of an LP problem. The major objective of a typical manufacturer is to maximize rupee profits. In the case of a trucking or railroad distribution system, the objective might be to minimize shipping costs. In any event, this objective must be stated clearly and defined mathematically. 2. The second property that LP problems have in common is the presence of restrictions, or constraints, that limit the degree to which we can pursue our objective. For example, deciding how many units of each product in a firm's product line to manufacture is restricted by available personnel and machinery. Selection of an advertising policy or a financial portfolio is limited by the amount of money available to be spent or invested. We want, therefore, to maximize or minimize a quantity (the objective function) subject to limited resources (the constraints).
12
3. There must be alternative courses of action to choose from. For example, if a company produces three different products., management may use LP to decide how to allocate among them its limited production resources (of personnel, machinery, and so on). Should it devote all manufacturing capacity 10 make only the first product, should it produce equal amounts of each product, or should it allocate the resources in some other ratio? If there were no alternatives to select from, we would not need LP. 4. The objective and constraints in linear programming problems must be expressed in terms of linear equations or inequalities. Linear mathematical relationships just mean that all terms used in the objective function and constraints are of the first degree (that is, not squared, or to the third or higher power, or appearing more than once). You will sec the term inequality quite often when we discuss linear programming problems. By inequalities we mean that not all LP constraints need be of the form A + B = C. This particular relationship, called an equation, implies that the term A plus the term B are together exactly equal to the term C. In most LP problems, we see inequalities of the form A + B ≤ C or A + B ≥ 2C. 2.2.1 Model Components : Model consists of linear relationships representing a firm’s objectives and resource constraints. •
Decision variables : mathematical symbols representing levels of activity of an operation.
•
Objective function : a linear mathematical relationship describing an objective of the firm, in terms of decision variables, that is to be maximized or minimized
•
Constraints : restrictions placed on the firm by the operating environment stated in linear relationships of the decision variables.
•
Parameters / cost coefficients : Numerical coefficients and constants used in the objective function and constraint equations.
2.2.2 Basic Assumptions (Properties) of LP Technically, there are five additiona1 requirements of an LP problem: 1. We assume that conditions of certainty exist; that is, numbers in the objective and constraints are known with certainty and do not change during the period being studied. 2. We also assume that proportionality exists in the objective and constraints. This means that if production of 1 unit of a product uses 3 hours of a particular scarce resource, then making 10 units of that product uses 30 hours of the
13
resource. 3. The third technical assumption deals with additivity, meaning that the total of all activities equals the sum of the individual activities. For example, if an objective is to maximize profit = Rs.8 per unit of first product made plus Rs.3 per unit of second product made, and if 1 unit of each product is actually produced, the profit contributions of Rs.8 and Rs.3 must add up to produce a sum of Rs. 11. 4. We make the divisibility assumption that solutions need not be in whole numbers (integers). Instead, they are divisible and may take any fractional value. If a fraction of Q product cannot be produced (for example, onethird of a bottle), an integer programming problem exists. 5. Finally, we assume that all answers or variables are nonnegative. Negative values of physical quantities are impossible; you simply cannot produce a negative number of chairs, shirts, lamps, or computers. In the next section, let us see the steps of mathematical formulation of the problem. 2.3 Steps of formulating Linear Programming Problem (LPP) : The following steps are involved to formulate LPP : Step 1 : Identify the decision variables of the problem. Step 2 : Construct the objective function as a linear combination of the decision variables. Step 3 : Identify the constraints of the problem such as resources, limitations, interrelation between variables etc. Formulate these constraints as linear equations or inequations in terms of the nonnegative decision variables. Thus, LPP is a collection of the objective function, the set of constraints and the set of the nonnegative constraints. Let us study some examples illustrating the formulation of a linear programming problem. Example 2.1 : The ABC Furniture Company produces tables and chairs. The production process for each is similar in that both require a certain number of hours of carpentry work and a certain number of labor hours in the painting and varnishing department. Each table takes 4 hours of carpentry and 2 hours in the painting and varnishing shop. Each chair requires 3 hours in carpentry and 1 hour in painting and varnishing. During the current production period, 240 hours of carpentry time are available and 100 hours in painting and varnishing time are available. Each table sold yields a profit of Rs.7; each chair produced is sold for a Rs.5 profit. ABC Furniture's problem is to determine the best possible combination of tables and chairs to manufacture in order to reach the maximum profit. The firm would like this production mix situation formulated as a linear programming problem.
14
We begin by summarizing the information needed to formulate and solve this problem (see Table 1.1). Further, let us introduce some simple notation for variables to be used in the objective function and constraints: X1 = number of tables to be produced X2 = number of chairs to be produced Now we can create the LP objective function in terms of X1 and X2. The objective function is maximize profit = Rs.7X1 + Rs.5X2. Our next step is to develop mathematical relationships to describe the two constraints in this problem. One general relationship is that the amount of a resource used is to be less than or equal to (≤) the amount of resource available. Table 1.1 ABC Furniture Company Data
Department Carpentry Painting and varnishing Profit per unit
Hours required to produce 1 unit Tables Chairs (x2) (x1) 4 3 2 1 Rs. 7 Rs. 5
Available hours Per week 240 100
In the case of the carpentry department, the total time used is(4 hours per table) (number of tables produced) + (3 hours per chair) (number of chairs produced) So the first constraint may be stated as follows: Carpentry time used is ≤ carpentry time available. 4X1 + 3X2 ≤240 (hours of carpentry time) Similarly, the second constraint is as follows: Painting and varnishing time used is ≤ painting and varnishing time available.
2 X1 + 1X2 ≤ 100 (hours of painting and varnishing time) Both of these constraints represent production capacity restrictions and affect the total profit. For
example, ABC Furniture cannot produce 70 tables during the production period because if X1 = 70, both constraints will be violated. It also cannot make X1 = 50 tables and X1 = 10 chairs. Why? Because this would violate the second constraint that no more than 100 hours of painting and varnishing time be allocated. Hence, we note one more important aspect of linear programming; that is, certain interactions will exist between variables. The more units of one product that a firm produces, the fewer it can make of other products. How this concept of interaction affects the optimal solution will be seen when we tackle the graphical solution approach.
15
Thus for this problem the LP formulation is : Find x1 and x2 so as to Maximize ( the objective function ) Z = 7x1 + 5x2 Subject to (the constraints) 4x1 + 3x2 ≤240 2 x1 + 1x2 ≤ 100 and x1 , x2 ≥ 0 Example 2.2 (Production Allocation Problem) A manufacturer produces two types of models M and N. Each M model requires 4 hours of grinding and 2 hours of polishing; whereas each N model requires 2 hours of grinding and 5 hours of polishing. The manufacturer has 2 grinders and 3 polishers. Each grinder works for 40 hours a week and each polisher works for 60 hours a week. Profit on model M is Rs.3 and model N is Rs.4. Whatever is produced in a week is sold in the market. How should the manufacturer allocate his production capacity to the two types of models so that he may make the maximum profit in a week ? Solution : Let x1 be the number of model M to be produced and x2 be the number of model N to be produced. Clearly x1 , x2 ≥ 0. The manufacturer gets profit of Rs.3 for model M and Rs.4 for model N. So the objective function is to maximize profit P = 3x1 + 4x2. It is given that each model M requires 4 hours and each model N requires 2 hours for grinding. The maximum available time for grinding is 40 hours and there are two grinders. So we have the constraint on the availability of the hours of grinding, 4x1 + 2x2 ≤ 80 Again model M requires 2 hours of polishing and model N requires 5 hours of polishing. The maximum available time for polishing is 60 hours and there are three polishers. Thus the constraint for the hours available for polishing is,
2x1 + 5x2 ≤ 180
Thus, the manufacturer’s allocation problem is to Maximize P = 3x1 + 4x2. subject to the constraints : 4x1 + 2x2 ≤ 80 , 2x1 + 5x2 ≤ 180 , and x1 , x2 ≥ 0.
16
Example 2.3 (Inspection Problem) A company has two grades of inspector 1 and 2, who are to be assigned for a quality control inspection. It is required that at least 2,000 pieces be inspected per 8 – hour day. Grade 1 inspector can check pieces at the rate of 40 with an accuracy of 97 %. Grade 2 inspector checks at the rate of 30 pieces per hour with an accuracy of 95 %. The wage rate of a Grade 1 inspector is Rs.5 per hour while that of a Grade 2 inspector is Rs.4 per hour. An error made by an inspector costs Rs.3 to the company. There are only nine Grade 1 inspectors and eleven Grade 2 inspectors available in the company. The company wishes to assign work to the available inspectors so as to minimize the daily inspection cost. Solution : Let x1 and x2 be the number of Grade 1 and Grade 2 inspectors doing inspections in a company respectively. Clearly x1 , x2 ≥ 0. One hour cost of inspection incurred by the company while employing an inspector = cost paid to the inspector + cost of errors made during inspection. Thus, costs for Inspector Grade 1 = 5 + 3 * 40 * (1 – 0.97) = Rs.8.60 Inspector Grade 2 = 4 + 3 * 30 * (1 – 0.95) = Rs.8.50 Both Grade inspector works for 8 hours a day. So the objective function (to minimize daily inspection cost) is Minimize C = 8 (8.60 x1 + 8.50 x2) = 68.80 x1 + 68.00 x2. Now the constraint of the inspection capacity of the inspectors for 8 – hours is 8 * 40x1 + 8 * 30x2 ≥ 2000 Also, company has only nine Grade 1 inspectors and eleven Grade 2 inspectors. So we have x1 ≤ 9 and x2 ≤ 11. Thus, LPP is Minimize C = 68.80 x1 + 68.00 x2. subject to the constraints : 320x1 + 240x2 ≥ 2000 x1 ≤ 9 x2 ≤ 11. and
x1 , x2 ≥ 0.
Example 2.4 : The Sky shop promotes its products from a large city to different parts in the state. The Sky shop has budgeted up to Rs.8,000 per week for local advertising. The money is to be allocated among four promotional media: TV spots, newspaper ads, and two types of radio advertisements. Sky shop’s goal is to reach the largest
17
possible highpotential audience through the various media. The following table presents the number of potential customers reached by making use of an advertisement in each of the four media. It also provides the cost per advertisement placed and the maximum number of ads that can be purchased per week.
medium
audience
cost per ad(rs.)
reached per
maximum ads per week
ad TV spot (1 minute)
5,000
800
12
Daily newspaper (fullpage ad)
8,500
925
5
Radio spot (30 seconds, prime time)
2,400
290
25
Radio spot (1 minute, afternoon)
2,800
380
20
Sky shop’s contractual arrangements require that at least five radio spots be placed each week. To ensure a broadscoped promotional campaign, management also insists that no more than Rs.1,800 be spent on radio advertising every week. Formulate this problem as a LPP. Solution : The problem can be stated mathematically as follows. Let X1 = number of 1minute TV spots taken each week. X2 = number of fullpage daily newspaper ads taken each week X3 = number of 30second primetime radio spots taken each week X4 = number of 1minute afternoon radio spots taken each week Objective: Maximize audience coverage = 5,000X1 + 8,500X2 + 2,400X3 + 2,800X4 subject to
X1 ≤ 12 (maximum TV spots/week) X2 ≤ 5
(maximum newspaper ads/week)
X3 ≤ 25
(maximum 30second radio spots/week)
X4 ≤ 20
(maximum 1minute radio spots/week)
800X1 + 925X2 + 290X3 + 380X4 ≤ 8,000
(weekly advertising budget)
X3 + X4 ≥ 5(minimum radio spots contracted) 290X3 + 380X4 ≤ Rs.1,800 (maximum rupees spent on radio) with X1, X2, X3 and X4 ≥ 0
18
Example 2.5: A pharmaceutical company produces two products : A and B. Production of both products requires the same process, I and II. The production of B results also in a byproduct C at no extra cost. The product A can be sold at a profit of Rs.3 per unit and B at a profit of Rs.8 per unit. Some of this byproduct can be sold at a unit profit of Rs.2, the remainder has to be destroyed and the destruction cost is Rs.1 per unit. Forecasts show that only up to 5 units of C can be sold. The company gets 3 units of C for each unit of B produced. The manufacturing times are 3 hours per unit for A on process I and II, respectively, and 4 hours and 5 hours per unit for B on process I and II, respectively. Because the product C results from producing B, no time is used in producing C. The available times are 18 and 21 hours of process I and II, respectively. Formulate this problem as an LP model to determine the quantity of A and B which should be produced, keeping C in mind, to make the highest total profit to the company. Solution : Let x1 units of product A be produced and x2 units of product B be produced. Let x3 and x4 units of product C to be produced and destroyed respectively. It is given that the company gets profit of Rs.3 per unit of product A, Rs.8 per unit of product B, Rs.2 per unit of product C and looses Rs.1 for destroying one unit of the product C. So objective function is Maximize profit P = 3x1 + 8x2 + 2x3 – x4. Manufacturing constraints for products A and B are 3x1 + 4x2 ≤ 18 3x1 + 5x2 ≤ 21 Manufacturing constraints for byproduct C are x3 ≤ 5  3x2 + x3 + x4 = 0 and
x1 , x2 , x3, x4 ≥ 0.
Example 2.6: A company, engaged in producing tinned food, has 300 trained employees on the rolls, each of whom can produce one can of food in a week. Due to the developing taste of the public for this kind of food, the company plans to add to the existing labor force by employing 150 people, in a phased manner, over the next five weeks. The newcomers would have to undergo a twoweek training programme before being put to the work. The training is to be given by employees from among the existing ones and it is known that one employee can train three trainees. Assume that there would be no production from the trainers and the trainees during training period as the training is offthejob. However, the trainees would be remunerated at the rate of Rs.300 per week, same rate as for the trainers.
19
The company has booked the following orders to supply during the next five weeks : Week
:
1
2
3
4
5
No. of Cans
:
280
298
305
360
400
Assume that the production in any week would not be more than the number of cans ordered for so that every delivery of the food would be ‘fresh’. Formulate this problem as an LP model to develop a training schedule that minimizes the labour cost over the fiveweek period. Solution : Let x1, x2, x3, x4 and x5 be number of trainees appointed in the beginning of the week 1, 2, 3, 4 and 5, respectively. The objective is to minimize the total labor force, i.e. Minimize Z = 5x1 + 4x2 + 3x3 + 2x4 + x5. subject to the Capacity constraints : 300 – (x1 / 3) ≥ 280
; 300 – (x1 / 3) – (x2 / 3) ≥ 298
300 + x1 – (x2 / 3) – (x3 / 30) ≥ 305 ;
300 + x1 + x2 – (x3 / 3) – (x4 / 3) ≥ 360
300 + x1 + x2 + x3 – (x4 / 3) – (x5 / 3) ≥ 400 New recruitment constraint : x1 + x2 + x3 + x4 + x5 = 150 and x1, x2, x3, x4, x5 ≥ 0. Example 2.7 Pantaloons Industries, a nationally known manufacturer of menswear, produces four varieties of ties. One is an expensive, allsilk tie, one is an allpolyester tie, and two are blends of polyester and cotton. The following table illustrates the cost and availability (per monthly production planning period) of the three materials used in the production process: MATERIAL
COST PER
MATERIAL AVAILABLE PER
Silk
21
800
Polyester
6
3,000
Cotton
9
1,600
The firm has fixed contracts with several major department store chains to supply ties. The contracts require that Pantaloons supply a minimum quantity of each tie but allow for a larger demand if Pantaloons chooses to meet that
20
demand. (Most of the ties are not shipped with the name Pantaloons on their label, incidentally, but with "private stock" labels supplied by the stores.) Table 1.2 summarizes the contract demand for each of the four styles of ties, the selling price per tie, and the fabric requirements of each variety. TABLE 1.2 Data for Pantaloons variety of tie
selling price per tie (Rs.)
monthly contract minimum
monthly demand
material required per tie (yards)
material requirements
All silk All polyester
6.70 3.55
6,000 10,000
7,000 14,000
0.125 0.08
Polycotton
4.31
13,000
16,000
0.10
50% polyester50%
Polycotton
4.81
6,000
8,500
0.10
30% polyester70%
100% silk 100% polyester
Pantaloon’s goal is to maximize its monthly profit. Formulate the policy for product mix by a LP. Solution : Let X1 = number of allsilk ties produced per month X2 = number of polyester ties X3 = number of blend 1 polycotton ties X4 = number of blend 2 polycotton ties But first the firm must establish the profit per tie. 1. For allsilk ties (X1), each requires 0.125 yard of silk, at a cost of Rs.21 per yard. Therefore, the cost per tie is Rs.2.62. The selling price per silk tie is Rs.6.70, leaving a net profit of (Rs.6.70  Rs.2.62 = ) Rs.4.08 per unit of X1. 2. For allpolyester ties (X2), each requires 0.08 yard of polyester at a cost of Rs.6 per yard. The cost per tie is, therefore, Rs.0.48. The net profit per unit of X2 is (Rs.3.55 Rs.0.48 =)Rs.3.07. 3. For polycotton blend 1 (X3), each tie requires 0.05 yard of polyester at Rs.6 per yard and 0.05 yard of cotton at Rs.9 per yard, for a cost of Rs.0.30 + Rs.0.45 = Rs.0.75 per tie. The profit is Rs.3.56. 4. Try to compute the net profit for blend 2. You should calculate a cost of Rs.0.81 per tie and a net profit of Rs.4. The objective function may now be stated as Maximize profit = Rs.4.08X1 + Rs.3.07X2 + Rs.3.56X3 + Rs.4.00X4 subject to 0.125X1 ≤ 0.08X2 + 0.05X3 + 0.03X4 ≤
800 (yards of silk) 3,000 (yards of polyester)
21
0.05X3 + 0.07X4 ≤
1,600 (yards of cotton)
X1 ≥
6,000 (contract minimum for all silk)
X1 ≤
7,000 (contract maximum)
X2 ≥ 10,000 (contract minimum for all polyester) All Xi’s non negative Example 2.8: The International City Trust (ICT) invests in shortterm trade credits, corporate bonds, gold stocks, and construction loans. To encourage a diversified portfolio, the board of directors has placed limits on the amount that can be committed to any one type of investment. ICT has Rs.5 million available for immediate investment and wishes to do two things: (1) maximize the interest earned on the investments made over the next six months, and (2) satisfy the diversification requirements as set by the board of directors. The specifics of the investment possibilities are as follows: maximum investment investment
interest earned (%)
Trade credit
7
(rs. millions) 1.0
Corporate bonds
11
2.5
Gold stocks
19
1.5
Construction loans
15
1.8
In addition, the board specifies that at least 55% of the funds invested must be in gold stocks and construction loans, and that no less than 15% be invested in trade credit. Formulate as LPP. Solution : To formulate ICT's investment decision as an LP problem, we let X1 = rupees invested in trade credit X2 = rupees invested in corporate bonds X3 = rupees invested in gold stocks X4 = rupees invested in construction loans Objective: Maximize rupees of interest earned = 0.07X1 + 0.11X2 + 0.19X3 + 0.15X4 subject to:
X1
≤ 1,000,000
X2
≤ 2,500,000
22
X3
≤ 1,500,000
X4
≤ 1,800,000
X3+ X4 ≥ 0.55 (X1 + X2 + X3 + X4) X1
≥ 0.15 (X1 + X2 + X3 + X4)
X1 + X2 + X3 + X4 ≤ 5,000,000 And all Xi’s non negative EXERCISE: Q. An agriculturist has a farm with 126 acres. He produces Radish, Mutter and Potato. Whatever he raises is fully sold in the market. He gets Rs.5 for radish per kg, Rs.4 for mutter per kg and Rs.5 for potato per kg. The average yield is 1,500 kg of radish per acre, 1,800 kg of mutter per acre and 1,200 kg of potato per acre. To produce each 100 kg of radish and mutter and to produce each 80 kg of potato, a sum of RS.12.50 has to be used for manure. Labour required for each acre to raise the crop is 6 man days for radish and potato each and 5 man days for mutter. A total of 500 man days of labour at a rate of Rs.40 per man day are available. Formulate this problem as a LP model to maximize agriculturist’s total profit. Q. A Mutual Fund company has Rs.20 lakhs available for investment in government bonds, blue chip stocks, speculative stocks and shortterm bank deposits. The annual expected return and risk factor are given below : Type of investment
Annual Expected Return (%)
Risk factor (0 to 100)
Government bonds
14
12
Blue chip stocks
19
24
Speculative stocks
23
48
Shortterm bank deposits
12
6
Mutual fund is required to keep at least Rs.2 lakhs in shortterm deposits and not exceed an average risk factor of 42. Speculative stocks must be at most 20 % of the total amount invested. How should mutual fund invest the funds so as to maximize its expected annual return ? Formulate this problem as LPP so as to optimize return on the investment. Q. Two alloys A and B are made from four different metals I, II, III and IV according to following specifications : A : at most 80 % of I
B : between 40 % and 60 % of II
23
at most 30 % of II
at least 30 % of III
at most 50 % of III
at most 70 % of IV
The four metals are extracted from different ores whose constituents % of these metals, maximum available quantity and cost per tonne are given below : Ore
Maximum Constitutions (%) Other price Rs/Tonne Quantity (tones) I II III IV 1 1,000 20 10 30 30 10 30 2 2,000 10 20 30 30 10 40 3 3,000 5 5 70 20 0 50 Assuming the selling price of alloys A and B are Rs.200 and Rs. 300 per tonne respectively, formulate this problem as a LP model selecting appropriate objective and constraints. Q. Suppose a media specialist has to decide on the allocation of advertising in three media vehicles. Let xk be the number of messages carried in the media, k = 1, 2, 3. The unit costs of message in the three media are Rs.1000, Rs. 750 and Rs. 500. The total budget available is Rs. 2,00,000 for the campaign period of one year. The first media is a monthly magazine and it is desired to advertise not more than one insertion in one issue. At least six messages should appear in second media. The number of messages in the third media should strictly lie between 4 and 8. The expected effective audience for unit message in the media vehicles is shown below : Vehicle Expected effective audience 1 80,000 2 60,000 3 45,000 Formulate this problem as an LP model to determine the optimum allocation that would maximize total effective audience. Q. A wine maker has a stock of three different wines with the following characteristics :
Wine
Proofs
Acid (%)
Specific gravity
Stock (Gallons)
A
27
0.32
1.70
20
B
33
0.20
1.08
34
C
32
0.30
1.1.04
22
A good dry table wine should between 30 and 31 degree proof, it should contain 0.25 % acid and should have a specific gravity at least 1.06. The wine maker wishes to blend the three types of wine to produce as large a
24
quantity as possible of a satisfactory dry table wine. However, his stock of wine A must be completely used in the blend because further storage would cause it to deteriorate. What quantities of wines B and C should be used in the blend. Formulate this problem as an LP model. Q. A paint manufacturing company manufactures paints at two plants. Firm orders have been received from three large contractors. The firm has determined that the following shipping cost data is appropriate for these contractors with respect to its two plants : Contractor
Order size (gallon)
Shipping cost / Gallon (Rs.) From Plant 1
From Plant 2
A
750
1.80
2.00
B
1,500
2.60
2.20
C
1,700
2.10
2.25
Each gallon of paint must be blended and tinted. The company’s costs with two operations at each of the two plants are as follows : Plant
Operation
Hours required/gallon
Cost/hour
Hours available
(Rs.) 1
2
Blending
0.10
3.80
300
Tinting
0.25
3.20
360
Blending
0.15
4.00
600
Tinting
0.20
3.10
720
Formulate this problem as an LP model.
25
2.4 General form of LPP : The general LPP can be described as follows : Given a set of m – linear inequalities or equalities in n – variables, we want to find nonnegative values of these variables which will satisfy the constraints and optimize (maximize or minimize) linear function of these variables (objective function). Mathematically, we have m – linear inequalities or equalities in n – variables (m can be greater than, less than or equal to n) of the form
ak1x1 + ak2x2 + … + aknxn {≥, =, ≤} bk, k = 1, 2, …, m
(2.1)
where for each constraint, one and only one of the signs ≥, =, ≤ holds, but the sign may vary from one constraint to another. The aim is to find the values of the variables xj satisfying (2.1) and xj ≥ 0, j = 1, 2, …, n , which maximize or minimize a linear function :
Z = c1x1 + c2x2 + … + cnxn.
(2.2)
The akj, bk and cj are assumed to be known constants. It is assumed that the variable xj can take any nonnegative values allowed by (2.1) and (2.2). These nonnegative values can be any real number. Thus, LPP is Optimize Z = c1x1 + c2x2 + … + cnxn.
(2.3)
subject to the constraints ak1x1 + ak2x2 + … + aknxn {≥, =, ≤} bk, k = 1, 2, …, m and
xj ≥ 0, j = 1, 2, …, n
(2.4) (2.5)
LPP in canonical form : In general, ≤ constraints will be associated with maximization LPP and ≥ constraints with minimization LPP. Let us write canonical form of maximization problem Maximize Z = c1x1 + c2x2 + … + cnxn. subject to the constraints
ak1x1 + ak2x2 + … + aknxn ≤ bk, and
k = 1, 2, …, m
xj ≥ 0, j = 1, 2, …, n
The canonical form of minimization problem is Minimize Z = c1x1 + c2x2 + … + cnxn.
26
subject to the constraints ak1x1 + ak2x2 + … + aknxn ≥ bk, k = 1, 2, …, m and
xj ≥ 0, j = 1, 2, …, n
Note : Different constraints may have different signs. Note : When nothing is mentioned about the nonnegativity of the variables, they are said to be unrestricted in sign. To convert them in order that they can be set according to the format of LPP, we write the unrestricted variable xj as a difference of two nonnegative variables xj′ and xj″ i.e. xj = xj′  xj″; xj′ ,xj″ ≥ 0. Note : The theoretical discussion is based on n – decision variables and m – constraints (n ≥ m). For solving any LPP by algebraic or analytic method it is necessary to convert inequalities (inequations) into equality (equations). This can be done by introducing so called slack and surplus variables.
n
Consider an equality of the form ak1x1 + ak2x2 + … + aknxn ≤ bk. Introduce a variable sn+k = bk 
∑
akj
j =1 n
xj ≥ 0. So that
∑
akj xj + sn+k = bk. Such a variable sn+k is known as a slack variable. Similarly, consider an
j =1 equality of the form
n
ak1x1 + ak2x2 + … + aknxn ≥ bk. Introduce a variable sn+k =  bk +
∑
j =1
n
akj xj ≥ 0. So that
∑
akj xj  sn+k =
j =1
bk. Such a variable sn+k is known as a surplus variable. To each slack and / or surplus variable, assign a cost coefficient of zero in the objective function i.e the slack and the surplus variables do not contribute to the objective function. Managerial Significance the Slack And The Surplus Variables: Let us take the constraint 4X1 + 3X2 ≤ 240 (hours of carpentry time) from the Example 3.1 discussed earlier. Here we think that the best combination of tables and chairs in the ABC furniture case may not necessarily use all the time available in each department. We must therefore add to each inequality a variable which will take up the slack, that is, the time not used in each department. This variable is called the slack variable. In this case if we write the above inequality as equality as follows 4X1 + 3X2 + S1 = 240
27
then S1 represents the unused time in the carpentry department ( in general, unused amount of a resource)
Similarly, the constraint of the form 4X1 + 3X2 ≥240 if converted to equality, will look like 4X1 + 3X2  S2 ≥ 240. Here the variable S2 represents the amount by which the carpentry hours will exceed 240 in the solution. Hence they are the surplus amount of resources required. Note :
After introducing slack / surplus variables, any given LPP can be expressed as under : Maximize Z = c1x1 + c2x2 + … + cnxn.
subject to the constraints
ak1x1 + ak2x2 + … + aknxn + sn+k = bk, and
k = 1, 2, …, m
xj ≥ 0, j = 1, 2, …, n+k Using matrix notations, above LPP in canonical form as well as standard form can be expressed as follows :
Canonical Form : Maximize (Minimize) Z = cTx Standard form : Maximize (Minimize) Z = cTx
subject to Ax ≤ (≥) b, x ≥ 0. subject to Ax = b, x ≥ 0.
where c, x є Rn, b є Rm and A = (aij)m×n is a real valued matrix with rank equal to m ≤ n. Thus, A will have m linearly independent columns. Significance of the slack and the surplus variables: 2.5 Solving the Linear Programming Problem: Let us introduce some definitions for our standard LPP : Solution : Any x є Rn which satisfies A x = b is a solution. Feasible solution : Any x є Rn which satisfies A x = b, x ≥ 0 is called a feasible solution to the given LPP. The set SF = { x є Rn : A x = b, x ≥ 0 } is known as the set of all feasible solutions. Basic Solution : Any solution x in which at most m – variables are nonzero is called a basic solution. Basic Feasible Solution : Any feasible solution x є Rn in which k (≤ m) variables have positive values and rest (n – k) have zero values is called a basic feasible solution. If
k = m, the basic feasible solution is called non
degenerate. If k < m, the basic feasible solution is called degenerate. Our aim is to obtain a basic feasible solution to given LPP which optimizes the objective function. Optimum Solution : Any feasible solution, x є Rn which optimizes the objective function Z = cTx is known as the optimum solution to the given LPP.
28
Optimum Basic Feasible Solution : A basic feasible solution is said to be optimum if it optimizes the objective function. Unbounded Solution : If the value of the objective function can be increased or decreased infinitely without violating the constraints then the solution is known as unbounded solution. Let us discuss some of the fundamental results. Consider LPP : Maximize (Minimize) Z = cTx
subject to Ax = b, x ≥ 0.
Let SF = { x є Rn : A x = b, x ≥ 0 } denote the set of all feasible solutions. Theorem 2.1 SF is a convex set. Proof : Let x1, x2 є SF and λ є [0, 1] be any scalar. Then A x1 = b and A x2 = b, x1 ≥ 0,
x2 ≥ 0. Consider a convex
combination of x1 and x2 (say) xλ . Then xλ = λ x1 + (1 – λ) x2. Obviously, xλ ≥ 0. Further A xλ = A(λ x1 + (1 – λ) x2) = λAx1 + (1 – λ) Ax2 = λ b + (1 – λ)b = b, implying xλ є SF . Hence, SF is a convex set. Note 1: If SF is a null set then there is no solution to given LPP. Note 2: If SF is a closed bounded convex set, i.e. a convex polyhedron, given LPP will have an optimum solution assigning finite value to the objective function. Note 3: If SF is a convex set unbounded in some direction of Rn, then LPP will have a solution but the optimum value of the objective function may be finite or infinite. Theorem 2.2 Suppose the set SF of feasible solutions to the given LPP is nonempty then the basic feasible solution to the LPP (if it exists) lies at the vertex of a convex polygon. Proof : Suppose SF has p – vertices (say) x1, x2, …, xp. Let x0 be the basic feasible solution to given LPP. Two cases may arise : Case (i) : x0 is vertex of convex polygon. Then result is obvious. Case (ii) : Let x0 be interior point of is vertex of SF . Then x0 can be expressed as convex combination of its
p
vertices. That is there exists scalars λ1, λ2, …, λp with
0 ≤ λ j≤ 1, 1 ≤ j ≤ p and
∑
j =1
29
λj = 1 such that
p
x0 =
∑
λj xj
(2.6)
j =1 Since x0 is optimum, we have cTx0 ≥ cTxj for all 1 ≤ j ≤ p
(2.7)
In particular, let x0 be such that cTxm ≥ cTxj for all 1 ≤ j ≤ p
(2.8)
From (2.7) and (2.8), cTx0 ≥ cTxm
(2.9)
Again, cTxm ≥ cTxj for all 1 ≤ j ≤ p then λj cTxm ≥ λj cTxj for all 1 ≤ j ≤ p.
p
λj cTxm ≥
∑
j =1
p
λj cTxj implies cTxm
∑
j =1
p
λj ≥ cT
∑
λj xj
j =1
i.e cTxm ≥ cTx0
(2.10)
From (2.9) and (2.10), it follows that cT x0 = cTxm . Thus, there always exists a vertex xm є SF such that is cTxm optimum value. Thus, if a basic feasible solution to a given LPP exists then one of the vertex will give optimum value to the objective function. Theorem 2.3 The set of optimal solutions to the LPP is convex. Proof : Let SF0 denotes the set of optimal solutions. If SF0 is empty or singleton then it is convex. Let SF0 contains more than one solution (say) x10 , x20 є SF0 .Then cTx10 = cTx20 = max Z. Consider convex combination of x10 and x20 as w0 = λ x1 + (1 – λ) x2 , 0 ≤ λ ≤ 1. Then cTw0 = cT { λ x10 + (1 – λ) x20 } = λ cT x10 + (1 – λ) cT x20 = λ max Z + (1 – λ)max Z = max Z. Thus, w0 є SF0. SF0 is convex. Theorem 2.4 If the convex set of the feasible solution of Ax = b, x ≥ 0 is a convex polyhedron then at least one of the extreme points give a basic feasible solution. If the basic feasible solution occurs at more than one extreme point, the value of the objective function will be same for all convex combinations of these extreme points. Proof : Let x1, x2, …, xk be the extreme points of the feasible region F of the LPP defined in (2.3) – (2.5). Suppose xm is the extreme point among x1, x2, …, xk at which the value of the objective function is maximum (say Z*). Then Z* = cT xm
(2.11)
30
Now, consider a point x0 є SF , which is not an extreme point and let Z0 be the corresponding value of the objective function. Then Z0 = cT x0
(2.12)
Since x0 is not an extreme point, it can be expressed as a convex combination of the extreme points x1, x2, …, xk of the feasible region F where F is assumed to be a closed and bounded set. The there exists scalars λ1, λ2, …, λk with
k
∑
λ j = 1, 0 ≤ λ j ≤ 1,
1 ≤ j ≤ k such that x0 = λ1x1 + λ2 x2 + … + λk xk. Therefore (2.12) becomes
j =1 Z0 = cT { λ1x1 + λ2 x2 + … + λk xk } = λ1cT x1 + λ2 cT x2 + … + λk cT xk ≤ cT xm i.e. Z0 ≤ Z* (from (2.11)) which implies that an optimum solution, the extreme point solution is better than any feasible solution in F. Second part of the Theorem : Let x1, x2, …, xr (r ≤ k) be the extreme points of the feasible region F at which the objective function assumes the same optimum value. This means Z* = cT x1 = cT x2 = … = cT xr .
r
Further let x = λ1x1 + λ2 x2 + … + λr xr ,
∑
λ j = 1, 0 ≤ λ j ≤ 1, 1 ≤ j ≤ r be the convex combination of x1, x2, …,
j =1 xr . Then cTx = cT { λ1x1 + λ2 x2 + … + λr xr } = λ1cT x1 + λ2 cT x2 + … + λr cT xr
r
= λ1Z* + λ2 Z* + … + λr Z* = Z*
∑
λ j = Z*
j =1 which completes the proof. Theorem 2.5 If there exists a feasible solution to the LPP then there exists a basic feasible solution to a given LPP. Proof : Consider Maximize Z = c1x1 + c2x2 + … + cnxn. subject to the constraints a1x1 + a2x2 + … + anxn = b where ajT = (aj1, aj2, …, ajn) is jth column of A. Suppose that there exists a feasible solution to a above LPP in which k > m variables have positive values. Without loss of generality, we assume that first k – variates have positive values. Then a1x1 + a2x2 + … + anxn = b .
31
For each aj є Rm, {a1, a2, …, ak) forms a dependent set. Assume that xr ≠ 0 and ar is linear combination of remaining
k
vectors of the set. So there exists scalars α1, α2, …, αr1, αr+1, …, αk such that
∑
αjaj = 0 implies
j =1 k
∑
k
αjaj + αrar = 0 i.e. ar =
j =1 j≠ r
⎛ αj ⎞ ⎜ − ⎟ aj αr ⎠ j =1 ⎝ j≠ r
∑
k
We have arxr +
∑
k
ajxj = b i.e. arxr + xr
j =1 j≠ r
j =1 j≠ r k
∑
(xj +
j =1 j≠ r
∑
⎛ αj ⎞ ⎜ − ⎟ aj = b i.e. ⎝ αr ⎠
k ⎛ αj ⎞ ⎛ αj ⎞ − − x ) a = b. Put x `= x + x . Then j j ⎜ ⎟ r ⎜ ⎟ r j ∑ xj ` aj = b. ⎝ αr ⎠ ⎝ αr ⎠ j =1 j≠ r
Thus, xj gives a new solution to given LPP which depends on (k – 1) – variables. In order that the new solution is feasible, we require xj ` ≥ 0. Clearly, xj +
xj ⎛ αj ⎞ ⎛ αj ⎞ xr ≤ , αj ≠ 0. ⎜ − ⎟ xr ≥ 0, j = 1, 2, …, k. So xj ≥ ⎜ ⎟ xr . or αr α j ⎝ αr ⎠ ⎝ αr ⎠
Thus, if we choose ar such that
xj xr = min { , αj ≠ 0 } then the solution will also be feasible. Thus, we get a j αr αj
new feasible solution in which
(k – 1) – variables have positive values. This process can be continued till we get a
feasible solution in which m – variables have positive values. Now let us discuss methods of solving LPP. 2.6 Graphical Method of solving LPP : LPP involving two decision variables can be solved graphically. Using results proved in section 2.5, the optimal solution to LPP can be found by evaluating the value of the objective function at each vertex of the feasible region. The theorem 2.2 also states that an optimal solution to LPP will only occur at one of the extreme points. The algorithm to solve LPP using graphical method is as follows :
32
2.6.1 Extreme point approach : Step 1 : Formulate LPP as discussed in section 2.3. Step 2 : Plot all constraints on the graph paper and shade the feasible region. Step 3 : List all extreme points of the feasible region. Evaluate the values of the objective function at each extreme point and the extreme point of the feasible region that optimizes (maximize or minimize) the objective function value is the required basic feasible solution. 2.6.2 Isoprofit (cost) function line approach : Follow step 1 and step 2 as stated in 3.6.1. Step 3 : Draw an Isoprofit (isocost) line for small value of the objective function without violating any of the constraints of the given LPP. Step 4 : Move isoprofit (isocost)lines parallel in the direction of increasing (or decreasing) objective function. Step 5 : The feasible extreme point for which the value of isoprofit (isocost) is maximum (minimum) is the optimal solution. This means that while moving the isoprofit line in the required direction, the last point after which we move out of the feasible region is the required optimal solution. We discuss the steps involved in solving a simple linear programming model graphically with the help of the following example. Example 2.9: The PQR Company manufactures products X and Y. Each unit of X yields an incremental profit of Rs.2, and each unit of Y, Rs.4. A unit of X requires four hours of processing at Machine Center A and two hours at Machine Center B. A unit of Y requires six hours at Machine Center A, six hours at Machine Center B, and one hour at Machine Centre C. Machine Center A has a maximum of 120 hours of available capacity per day. Machine Center B has 72 hours, and Machine Center C has 10 hours. If the company wishes to maximize profit, how many units of X and Y should be produced per day? Solution: To maximize profit the objective function may be stated as Maximize Z = 2X + 4Y The maximization will be subject to the following constraints: 4X +6Y ≤ 120 (Machine Center A constraint) 2X + 6Y ≤ 72 (Machine Center B constraint) 1Y ≤ 10 (Machine Center C constraint)
33
X, Y ≥ 0 1. Formulate the problem in mathematical terms. The equations for the problem are given above. 2. Plot constraint equations.
The constraint equations are easily plotted by letting one variable equal zero and solving
for the axis intercept of the other. (The inequality portions of the restrictions are disregarded for this step.) For the machine center A constraint equation when X = 0, Y = 20, and when Y = 0, X = 30. For the machine center B constraint equation, when X = 0, Y = 12. and when Y = 0, X = 36. For the machine center C constraint equation Y= 10 for all values of X. These lines are graphed. 3. Determine the area of feasibility. The direction of inequality signs in each constraint determines the area where a feasible solution is found. In this case, all in equalities are of the lessthanorequalto variety, which means that it would be impossible to produce any combination of products that would lie to the right of any constraint line on the graph. The region of feasible solutions is unshaded on the graph and forms a convex polygon. Plot the objective function. The objective function may be plotted by assuming some arbitrary total profit figure and then solving for the axis coordinates, as was done for the constraint equations. Other terms for the objective function, when used in this context, are the isoprofit or equal contribution line, because it shows all possible production combinations for any given profit figure. 4. Find the optimum point. It can be shown mathematically that the optimal combination of decision variables is always found at an extreme point (corner point) of the convex polygon. In the graph there are four corner points (excluding the origin), and we can determine which one is the optimum by either of two approaches. The first approach is to find the values of the various corner solutions algebraically. This entails simultaneously solving the equations of various pairs of intersecting lines and substituting the quantities of the resultant variables in the objective function. For example, the calculations for the intersection of 2X + 6Y = 72 and Y = 10 are as follows: Substituting Y= 10 in 2X+ 6Y=72 gives 2X + 6(10) = 72, 2X = 12, or X=6. Substituting X = 6 and Y = 10 in the objective function, we get Profit = Rs.2X + Rs.4Y = Rs.2(6) + Rs.4( 10) = Rs.12 + Rs.40 = Rs.52 A variation of this approach is to read the X and Y quantities directly from the graph and substitute these quantities into the objective function, as shown in the previous calculation. The drawback in this approach is that in problems with a large number of constraint equations, there will be many possible points to evaluate, and the procedure of testing each one mathematically is inefficient.
34
The second and generally preferred approach entails using the objective function or isoprofit line directly to find the optimum point. The procedure involves simply drawing a straight line parallel to any arbitrarily selected initial isoprofit line so that the isoprofit line is farthest from the origin of the graph. (In costminimization problems, the objective would be to draw the line through the point closest to the origin.) In the figure, the dashed line labeled Rs.2X + Rs.4Y = Rs.64 intersects the most extreme point. Note that the initial arbitrarily selected isoprofit line is necessary to display the slope of the objective function for the particular problem. This is important since a different objective function (try profit = 3X + 3Y) might indicate that some other point is farthest from the origin. Given that Rs.2X + Rs.4Y as Rs.64 is optimal, the amount of each variable to produce can be read from the graph: 24 units of product X and four units of product Y. No other combination of the products yields a greater profit. Y
(0,20) 2X + 4Y=64
(0,16) (0,12)
Y=10 (0,8)
(24,4) 2X + 4Y=32 (36,0)
(30,0) (32,0)
(16,0)
X
Fig 2.1 Getting back to the problem, we now evaluate the value of the objective function at all the corner points of the feasible region and select that point as the optimal solution which gives the maximum value. Here the corner points are (0,0), (0,12), (6,10), (24,4) and (30,0). Out of these the maximum value of the objective function is at the point (24,4). So the solution is : 24 units of product X and 4 units of product Y. Example 2.10 Solve graphically the LPP : Maximize z = 45x1 + 80x2 Subject to the constraints :
5x1 + 20x2 ≤ 400, 10x1 + 15x2 ≤ 450, and x1 , x2 ≥ 0.
35
Solution :
X2
(0,30)
(0,20) (24,14)
(0,0) (45,0)
(80,0)
X1
Fig. 2.2 The vertices of the shaded region are (0,0), (0, 20), (45, 0) and (24, 14). The values of the objective function z at these extreme points are 0, 1600, 2025 and 2200 respectively. The maximum value of z = 2200 occurs at x1 = 24 and x2 = 14. Example 2.11 Solve graphically the LPP : Maximize z = 7x1 + 3x2 Subject to the constraints : x1 + 2x2 ≥ 3 , x1 + x2 ≤ 4, 0 ≤ x1 ≤ 5/2, 0 ≤ x2 ≤ 3/2, and x1 , x2 ≥ 0. Solution :
X2
X1=2.5
(0,4)
(0, 1.5)
(2.5, 1.5)
X2=1.5
(2.5, 0.25) (3, 0) Fig. 2.3
36
(4, 0)
X1
The vertices of convex polygon are (0, 1.5), (2.5, 0.25), (2.5, 1.5). The values of the objective function z are 4.5, 18.25, 22 respectively of which maximum is 22 obtained at (2.5, 1.5). 2.7 Special cases in LP : 2.7.1 Alternative (or Multiple) Optimal Solution : We try to under the concept of alternative or multiple solution by considering the example. Maximize P = 4x1 + 4x2 subject to the constraints : x1 + 2x2 ≤ 10 6x1 + 6x2 ≤ 36 x1 ≤ 6 and x1 , x2 ≥ 0. X2
(0,6) (0,5)
(6,0)
(10,0)
X1
Fig. 2.4 It can be observed in Fig. 2.4 that the isoprofit line coincides with the edge of the convex feasible region. Thus there will be infinitely many points at which the objective function is maximum. Hence, any point on the isoprofit line will give optimum solutions and these solutions will yield the same maximum value of the objective function. 2.7.2 An Unbounded Solution : We have discussed in section 2.5 that when the value of the decision variables in LP is allowed to increase indefinitely without violating the feasible conditions, the solution is said to be unbounded. Here, the value of the objective function may take value infinity.
37
Example 2.12 Solve (if possible) following LPP : Maximize z = 3x1 + 4x2 subject to the constraints : x1  x2 = 1  x1 + x2 ≤ 0 and
x1 , x2 ≥ 0. X2
(0,1)
X1 (1,0)
(2,0) Fig. 2.5
The feasible region suggests that the given LP has unbounded solution. 2.7.3 Infeasible Solution : The infeasible solution occurs when no value of the variables satisfy all the constraints simultaneously; equivalently, infeasible solution to the LP occurs when there is no unique feasible region. Example 2.13 Verify that the following LP has infeasible solution. Maximize z = 5x1 + 3x2 subject to the constraints : 4x1 + 2x2 ≤ 8, x1 ≥ 3, x2 ≥ 7 and x1 , x2 ≥ 0. 2.7.4 Redundant Constraint : A constraint which does not affect the feasibility of the region is said to be the redundant constraint. Thus, the redundant constraint will not have any effect on the optimum value of the objective function.
38
2.8 Simplex Method : In general, any system may not be restricted to only two decision variables. In this section we try to explore an algebraic technique to solve LPP iteratively in finite number of steps. This method is known as simplex method. In this method, we start with one of the vertex or extreme point of SF and at each step or iteration move to an adjacent vertex in such a way that the value of the value of the objective for iteration improves at each iteration. This method either gives an optimum solution (if it exists) or gives an induction that the given LPP has an unbounded solution. Consider LPP : Maximize (Minimize) Z = cTx
subject to Ax = b, x ≥ 0. Assume that the rank of (A, b) = rank of A equal
to m but less than or equal to n. This means that the set of constraint equation is consistent, all m – rows of A are linearly independent and the number of constraints are less than or equal to the number of decision variables. Further, Ax = b, can be written as x1a1 + x2a2 + … + xnan = b i.e. aj is the column of A associated with the variables xj , j = 1, 2, …, n. Since rank of A is equal to m less than n, there are m – linearly independent columns of A. These m – linearly independent columns of A will form a basis in Rm. Let B : m × m denote the matrix formed by m – linearly independent columns of A, then B = (b1, b2, …, bj, …, bm) will represent the basis matrix. Obviously, B : m × m will be nonsingular so that B1 exists. Any column (say) bi of B is some column (say) aj of A. Note that it is not necessary that the arrangement of column in B should be in accordance with those of A. Any vector aj є A can be expressed as a linear combination of columns of B. i.e. for any aj є A, there exists
m
scalars y1j, y2j, …, ymj such that aj =
∑
yij bi or aj = Byj, j = 1, 2, …, n where yj = (y1j, y2j, …, ymj ). Thus,
j =1 A = (a1, a2, …, aj, …, an) = (By1, By2, …, Byj, …, Byn) = B(y1, y2, …, yj, …, yn) i.e A = By implies y = B1 A or yj = B1 aj , j = 1, 2, …, n. With this discussion, we are ready to study Simplex method. Consider the LPP : Maximize Z = cTx
subject to Ax = b, x ≥ 0.
39
The aim is to obtain an optimum basic feasible solution for given LPP. Since simplex method is an iterative method, we assumed that an initial basic feasible solution is available. Let B : m × m denote a basis matrix (say) B = (b1, b2, …, bj, …, bm). Each bi is some aj of A, i =1, 2, …, m and j = 1, 2, …, n. The columns of A included in B are called basic vectors and those which are not in B are called nonbasic vectors. The variables vector x chosen corresponding to vectors in basis matrix B are known as basic variables and rest are known as nonbasic variables. Then the constraint equations Ax = b can now be written as BxB + PxR = b where B : m × m is the basis matrix and R : m × (n – m) is the nonbasis matrix formed by the nonbasic vectors of A. xB : m × 1 is the vector corresponding to basic variables and xR : (n – m) × 1 is the vector corresponding to non  basic variables. Taking xR = 0, we get BxB = b or xB = B1b. The basis matrix B : m × m is chosen in such a way that xB = B1b ≥ 0. Then we have basic feasible solution to the given LPP. Let CB : m × 1 denote the cost vector corresponding to the variables in xB . Then the value of the objective function for this solution is ZB = cTB xB + cTR xR = cTB xB = cTB B1b. Further, corresponding to above basis matrix we define a new quantity
m
Zj = cTB yj =
∑
cTBi yij = cTB B1b
i =1 Further, corresponding to above basis matrix we define a new quantity
m
T
cj = c
B
yj =
∑
cTBi yij cTB B1aj , j = 1, 2, …, n.
i =1 The quantity zj – cj (or cj – zj), j = 1, 2, …, n is known as net evaluations. After obtaining a basic feasible solution check following : 1) Whether the basic feasible solution is optimum or not ? and 2) If not to obtain a new improved basic feasible solution. This can be done by remaining one of the basic vectors from the matrix B = (b1, b2, …, br, …, bm) and inserting a nonbasic vectors of A = (a1, a2, …, aj, …, an) in its place.
40
The problem is “Which basic variable should be removed from B and which of the nonbasic variable should be introduced in its place ?” aj є A in its place. Let B*
Suppose we remove a basic vector br from B and introduce a nonbasic vector denote the nonbasic matrix obtained by replacing aj in place of br then B* = (b1, b2, …, br1, aj , br+1, …, bm) = (b1, b2, …, br1, br + aj  br, br+1, …, bm) = (b1, b2, …, br1, br, br+1, …, bm) + (0, 0, …, 0, aj  br, 0, …, 0) Therefore, B* = B + (aj  br) eTr where eTr є Rm is the r – th unit vector in Rm . This gives B*1 = B1 
B−1 (a j − b r )eTr B−1 1 + eTr B−1 (a j − b r )
= B1 
B−1 (a j − b r )eTr B−1 y rj
= B1 
(y j − e r )eTr B−1 y rj
In order that B*1 can be obtained the necessary condition is yrj ≠ 0. Thus, aj can replace br if and only if yrj ≠ 0. The new solution is then *
1
1
xB = B b = (B 
= xB 
(y j − e r )eTr B−1 y rj
(y j − e r )eTr y rj
Therefore, xB* = xB 
)b=B b
(y j − e r )eTr B−1 y rj
b = xB 
(y j − e r )eTr y rj
xB
xBr
x Br (yj – er). y rj
Hence, the new solution is xBi* = xBi 
xBi 
1
x Br (yj – 0), i = 1, 2, …, m, i ≠ r because in er, ith element is zero. So xBi* = y rj
x Br x x yij or xBr* = xBr  Br (yrj 1) = Br . y rj y rj y rj We thus have a new basic solution. In order that the new solution is feasible, we require xBi* ≥ 0, i = 1, 2,
…, m i.e. xBr* =
Further, xBi 
x Br x > 0, i = 1, 2, …, m, i ≠ r. Since xBr ≥ 0, xBr* = Br > 0 if yrj > 0. Thus, we require that yrj > 0. y rj y rj
x Br x Br x Bi x x yij ≥ 0 implies ≤ , i = 1, 2, …, m. Hence, Br = min { Bi , yij > 0}. i y rj y rj yij y rj yij
41
(2.13)
Thus, the vector br to be removed from B should be chosen in accordance with (2.13). Let cB* denote the new cost vector corresponding to the new solution then cB* = (cB1, cB2, …, cBr1, cBj, cBr+1, …, cBm)T = (cB1, cB2, …, cBr1, cBr + cj  cBr, cBr+1, …, cBm)T and new value of the objective function is Z* = cTB* xB*= [cTB + (cj – cBr)eTr ] [xB 
x Br x (yj – er)]. Put Br = θ y rj y rj
= cTB* xB*= [cTB + (cj – cBr)eTr ] [xB  θ (yj – er)] = Z  θ (zj – cj )
(2.14)
Our aim is to maximize Z, and so we require Z* > Z equivalently zj – cj (or cj – zj) > 0 (< 0). Therefore, the vector aj є A to be introduced into the basis matrix B must be such that zj – cj > 0 (or cj – zj < 0). Note that determination of aj does not require information about br. However, determination of vector br to be removed from the basis requires information about both r and j. We should first determine the vector aj to be introduced into new basis and then using (2.13) determine the vector br to be removed from B. Continuing in this may for finite number of steps, we can ultimately obtain optimum solution. The new y  matrix is *
*1
y =B
1
A = [B 
(y j − e r )eTr B−1 y rj
1
] A = B A
=y
1 (yj – er) erTy y rj
=y
1 (yj – er) (yr1, yr2, …, yij, …, yrn) y rj
Comparing the elements on both sides, we get yik* = yik 
So yij* = yij 
yrj* = yrj 
(y j − e r )eTr B−1 y rj
1 yij yrk y rj
1 (yij yrj – 0), i =1, 2, …, m, i ≠ r , j = 1, 2, …, n, k ≠ j and y rj
1 (yrj yrj – yrj) = 1. y rj
42
A
Note : 1. While discussing simplex method, we have assumed an initial basic feasible solution, we have assumed an initial basic feasible solution with a basis matrix B. If B = I then
B1 = I then initial solution xB = B1b = b and y matrix
is y = B1A = A. Net evaluations, zj – cj =  cj + cBTB1aj =  cj + cBTaj , j = 1, 2, …, n and value of the objective function
Z = cBTxB = cBTb. Thus, we observe that if initial basis matrix is a unit matrix then it is easy to obtain
initial solution and related parameters. Hence, in order to obtain initial basic feasible solution, we shall assume that a unit matrix is present as a submatrix of the coefficient matrix A. 2. For choosing incoming vector aj in the next basis, choose that zj – cj ( cj – zj)which is most negative (positive). If two or more zj – cj ( cj – zj) have the same most negative (positive) value, choose any one of the corresponding vector to enter into the basis. 3. After choosing the incoming vector, choose the outgoing vector which satisfies (2.13). If this minimum value is assumed for more than two vectors, choose any one of the corresponding basis vector from B. Following two theorems will state without proof. Theorem 3.6 Every basic feasible solution to a LPP corresponds to a vertex of the set of feasible solution. Theorem 3.7 For the LPP : Maximize Z = cTx
subject to Ax = b, x ≥ 0. A necessary and sufficient condition for a
basic feasible solution xB = B1b corresponding to a basis matrix B : m × m to be optimum is that zj – cj ≥ 0 (or cj – zj ≤ 0) for all j = 1, 2, …, n. 2.8.1 Simplex Algorithm : (Maximization Case) To find an optimum basic feasible solution to a standard LPP (maximization case, all constraints ≤ , all bj i.e all R.H.S values positive), perform following steps : Step 1 : Select an initial basic feasible solution to initiate the solution. Step 2 : Test for the optimality as discussed in section 3.6. That is if all zj – cj ≥ 0( cj – zj ≤ 0), then the basic feasible solution is optimal. If at least for one of the coefficient matrix zj – cj < 0 (or cj – zj > 0) and elements in that columns are negative (positive), then there exists an unbounded solution to the given problem. If at least one zj – cj < 0 ( cj – zj > 0) and each of these has at least one positive (negative) element for some row then solution can be improved. Step 3 : For selecting the variable entering into the basis, select a variable that has the most negative zj – cj value (or most positive cj – zj). The column to be entered is called key column.
43
Step 4 : After selecting key column, next step is to decide the outgoing variable using (3.6) This ratio is called replacement ratio (RR). The replacement ratio restricts the number of units of incoming variables that can be obtained from the exchange. The row selected in this manner is called key row. The element at the intersection of key row and key column is called key element. Note that the division by negative or zero element in key column is not allowed. Denote these cases by . Step 5 : Now we want to find new solution. If the key element is 1, then don’t change the row in the next simplex table. If the key element is other than 1, then divide element in that key row by that element including the element in xB – column and formulate the new row. The new values of the elements in the remaining rows for the next iteration can be evaluated by performing elementary operations on all rows so that all elements except the key element in the key column are zero. This can be also calculated as follows (New row numbers) = (numbers in old row)[ (numbers above or below the key element)×(corresponding number in the new row, that is the row replaced in the previous step)] If new solution so obtained satisfies step 2 then terminate the process otherwise perform step 4 and step 5. Repeat the steps for finite number of steps to obtain basic feasible solution i.e. no further improvement is possible. Example 2.14 Use simplex method to maximize z = 5x1 + 4x2 subject to the constraints : 4x1 + 5x2 ≤ 10, 3x1 + 2x2 ≤ 9, 8x1 + 3x2 ≤ 12 and x1 , x2 ≥ 0. Solution : Writing given LPP in standard form, we need to add slack variables s1, s2 and s3 in the constraints. Thus LPP is Maximize z = 5x1 + 4x2 + 0s1+ 0s2 + 0s3 subject to the constraints : 4x1 + 5x2 + s1 = 10 3x1 + 2x2 + s2 = 9 8x1 + 3x2 + s3 = 12 and
x1 , x2 , s1, s2, s3 ≥ 0.
Putting x1 = x2 = 0, we get first iteration as
44
cj
5
4
0
0
0
RR
cB
B
xB
x1
x2
s1
s2
s3
0
s1
10
4
5
1
0
0
10/4
0
s2
9
3
2
0
1
0
9/3
0
s3
12
8
3
0
0
1
12/8 →
z
0
zj  cj
5
4
0
0
0
↑
Clearly, most negative zj – cj corresponds to x1. So x1 will enter into the basis. The minimum replacement ratio corresponds to s3 so s3 will leave the basis. So key column corresponds to x1 and key row corresponds to s3. The leading (key) element is 8 which is other than 1 so divide all elements of key row by 8 and using elementary row transformations so that in key column entries of the first and second row are zero. The new iteration table is
cj
5
4
0
0
0
RR
cB
B
xB
x1
x2
s1
s2
s3
0
s1
4
0
7/2
1
0
1/2
8/7 →
0
s2
9/2
0
7/8
0
1
3/8
36/7
5
x1
3/2
1
3/18
0
0
1/8
9
z
15/2
zj  cj
0
17/8
0
0
5/8
↑
Clearly, most negative zj – cj corresponds to x2 so x2 will enter into the basis. The minimum replacement ratio corresponds to s1 so s1 will leave the basis. So key column corresponds to x2 and key row corresponds to s1. The leading (key) element is 7/2 which is other than 1 so divide all elements of key row by 2/7 and using elementary row transformations so that in key column entries of the second and third row are zero. The new iteration table is
45
cj
5
4
0
0
0
cB
B
xB
x1
x2
s1
s2
s3
4
x2
8/7
0
1
1
0
1/7
0
s2
7/2
0
0
0
1
2/8
5
x1
15/14
1
0
0
0
5/28
z
139/14
zj  cj
0
0
17/28
0
9/28
Since all zj – cj ≥ 0, the solution x1 = 15/14, x2 = 8/7 maximizes the z = 139/14.
Example 2.15 Maximize Z = 2x1 + 4x2, subject to 2x1 + 3x2 ≤ 48, x1 + 3x2 ≤ 42, x1 + x2 ≤ 21, and x1, x2 ≥ 0 We will check the optimality here by evaluating NER as CjZj. Also we will format the table in a different way so that the reader is accustomed to both the ways. We will make a continuous table in which all the iterations are taken care of. Introducing the slack variables and entering the values in the simplex table we get,
46
Cj →
2
4
0
0
0
↓
x1
x2
s1
s2
s3
R.H.S
R.R
Var→ Basis ↓
0
s1
2
3
1
0
0
48
48/3=16
0
s2
1
3
0
1
0
42
14 →
0
s3
1
1
0
0
1
21
21
N.E.R
2
4
0
0
0
Z=0
↑
=CjZj 0
s1
1
0
1
1
0
6
6→
4
x2
1/3
1
0
1/3
0
14
42
0
s3
2/3
0
0
1/3
1
7
21/2
N.E.R
2/3
0
0
4/3
0
Z = 56
=CjZj
↑
2
x1
1
0
1
1
0
6
4
x2
0
1
1/3
2/3
0
12
0
s3
0
0
2/3
1/3
1
3
N.E.R
0
0
2/3
2/3
0
Z = 60
=CjZj
As all NER (CjZj) entries are ≤ 0, the optimality criteria is satisfied and the solution obtained is optimal. Thus, the final solution is x1 = 6, x2 = 12 and Maximum Z = 60 Example 2.16 Minimize Z = x1  3x2 + 2x3 subject to 3x1  x2 + 3x3 ≤ 7, 2x1 + 4x2 ≤ 12, 4x1 + 3x2 + 8x3 ≤ 10 and x1, x2 , x3 ≥ 0 This being a minimization problem with all constraints of ≤ type, we will first convert it into a maximization problem by multiplying the objective function Z with 1 and then maximizing the same. i.e Maximize Z* =  Z =  x1 + 3x2  2x3 preparing the simplex table and solving,
47
Cj →
1
3
2
0
0
0
↓
x1
x2
x3
s1
s2
s3
RHS
R.R
Var→ Basis ↓
0
s1
3
1
3
1
0
0
7
7
0
s2
2
4
0
0
1
0
12
3→
0
s3
4
3
8
0
0
1
10
10/3
N.E.R
1
3↑
2
0
0
0
Z*=0
=CjZj 0
s1
5/2
0
3
1
1/4
0
10
4→
3
x2
1/2
1
0
0
1/4
0
3
6
0
s3
5/2
0
8
0
3/4
1
1
2/5
1/2 ↑
0
2
0
3/4
0
Z*=9
N.E.R =CjZj 1
x1
1
0
6/5
2/5
1/10
0
4
3
x2
0
1
3/5
1/5
3/10
0
5
0
s3
0
0
11
1
1/2
1
11
0
0
13/5
1/5
8/10
0
Z*=11
N.E.R =CjZj
As all NER (CjZj) entries are ≤ 0, the optimality criteria is satisfied and the solution obtained is optimal. The optimum value of the original objective function will be obtained by taking –Z*. Thus, the final solution is x1 = 4, x2 = 5, x3 = 0 and Minimum Z =  Z* = 11.
Example 2.17 :Use simplex method to maximize z = 2x1 + 3x2 subject to the constraints :  x1 + 2x2 ≤ 4, x1 + x2 ≤ 6, x1 + 3x2 ≤ 9 and x1 , x2 unrestricted.
48
Solution : s1, s2, s3 are slack variables introduced in given three constraints. Since x1 and x2 are unrestricted, we introduce the nonnegative variables x1′ ≥ 0, x1′′ ≥ 0 and x2′ ≥ 0, x22′′ ≥ 0 so that x1 = x1′  x1′′ and x2 = x2′  x2′′ .
cj
2
2
3
3
0
0
0
RR
cB
B
xB
x1′
x1′′
x2′
x2′′
s1
s2
s3
0
s1
4
1
1
2
2
1
0
0
2→
0
s2
6
1
1
1
1
0
1
0
6
0
s3
9
1
1
3
3
0
0
1
3
z
0
zj  cj
2
2
3
3
0
0
0
↑ x2′ enters into the basis and s1 leaves the basis. The iterative table is cj
2
2
3
3
0
0
0
RR
cB
B
xB
x1′
x1′′
x2′
x2′′
s1
s2
s3
3
x2′
2
1/2
½
1
1
1/2
0
0

0
s2
4
3/2
3/2
0
0
1/2
1
0
8/3
0
s3
3
5/2
5/2
0
0
3/2
0
1
6/5 →
z
6
zj  cj
7/2
7/2
0
0
3/2
0
0
↑ x2′ enters into the basis and s3 leaves the basis. The iterative table is cj
2
2
3
3
0
0
0
RR
cB
B
xB
x1′
x1′′
x2′
x2′′
s1
s2
s3
3
x2′
13/5
0
0
1
1
1/5
0
1/5
65/5
0
s2
11/5
0
0
0
0
2/5
1
3/5
55/10 →
2
x1′
9/5
1
1
0
0
3/5
0
2/5

z
51/5
zj  cj
0
0
0
0
3/5
0
7/5
↑
s1 enters into the basis and s2 leaves the basis. The iterative table is
49
cj
2
2
3
3
0
0
0
cB
B
xB
x1′
x1′′
x2′
x2′′
s1
s2
s3
3
x2′
3/2
0
0
1
1
0
1/2
½
0
s1
11/2
0
0
0
0
1
5/2
3/2
2
x1′
9/2
1
1
0
0
0
3/2
1/2
z
27/2
zj  cj
0
0
0
0
0
3/2
½
Since zj  cj are all nonnegative, the optimum solution x1′ = 9/2 and x2′ = 3/2 with maximum z = 27/2 is obtained. Therefore x1 = 9/2 – 0 = 9/2 and x2 = 3/2 – 0 = 3/2 is the required basic feasible solution. 2.9 Minimization Case : Consider LPP
m
Minimize Z =
∑
cixi
i =1
n
subject to the constraints
∑
aij xj ≥ bi, xj ≥ 0
j =1 The inequality of ≥ (or =)  type should be transformed by adding surplus variables. i.e.
n
∑
aij xj – si = bi, xj , si ≥ 0
j =1 By putting xj = 0, j = 1, 2, …, n, we get an initial solution si =  bi which violates nonnegativity criteria of surplus variables. In this to preserve the nonnegativity of surplus variables we add artificial variables (say) Ai, i = 1, 2, …, m to get initial basic feasible solution. Thus, we have constraint equations as
n
∑
aij xj – si + Ai = bi, xj , si , Ai ≥ 0
j =1
50
Now the resultant LPP has n decision variables, m artificial variables and m surplus variables. An initial basic feasible solution of the resultant LPP can be obtained by putting (n + m) variables equal to zero; i.e. the iteration starts with Ai = bi, i = 1, 2, …, m which does not contribute any value to the optimal solution but are added to retain the feasibility condition of LPP. We will discuss the following two methods to remove artificial variables first from the optimal solution. 1.
Two – Phase method
2.
Big – M method (penalty method)
Note : For constraints with equality, we will add only the artificial variables. 2.9.1 Two – Phase Method : In the phase I of this method, we will try to minimize the sum of the artificial variables subjected to the constraints of the given LPP. The phase II minimizes the original objective function with initial iteration as the final iteration of phase II. Let us study steps to be performed in solving LPP by TwoPhase method. Step 1 Check the nonnegativity of the bi (constant terms). If some of them are negative, make them positive by multiplying those constraints with – 1. Step 2 Subtract surplus variables and add artificial variables to reformulate inequality constraints into equations. Step 3 Initialize iterative step by taking Ai = bi. Step 4 Assign a cost ‘ 1’ to each artificial variables for a maximization problem ( ‘1’ for minimization) and a cost ‘0’ to all other variables (surplus and decision variables) of LPP in the objective function; Thus, objective function for phase I will be Maximize z* =  A1 – A2  …  Ap (p ≤ m). Step 5 Solve the problem written in step 4 until either of the following three cases do arise : 1.
If all zj – cj ≥ 0 and at least one artificial variable occurs in the optimum basis and hence max z* < 0, then LPP has infeasible solution.
2.
If all zj – cj ≥ 0, max z* = 0 and at least one artificial variable occurs in the optimum basis then go to phase II.
3.
If all zj – cj ≥ 0 and no artificial variable appears in the optimum basis.
If cases 2 or 3 occur than go to phase II.
51
Step 6 Use the optimum basic feasible solution of phase I as an initial solution for the given LPP. Assign actual costs to the original variables and ‘0’ to other variables in the objective function. Use simplex method to improve the solution. Note : Maximize z =  Minimize ( z). Example 2.18 Use twophase method to minimize z = x1 + x2 subject to the constraints : 2x1 + x2 ≥ 4, x1 + 7x2 ≥ 7, and x1 , x2 ≥ 0. Solution : In order to get constraints equations, introduce surplus variables s1 , s2 ≥ 0; and artificial variables A1, A2, ≥ 0. Then LPP converted to the maximization form is Maximize z =  x1  x2 + 0s1 + 0s2  A1  A2 subject to the constraints : 2x1 + x2 – s1 + A1 = 4, x1 + 7x2 – s2 + A2 = 7, and x1 , x2, s1, s2 , A1, A2 ≥ 0. Phase I : Here the objective function is Maximize z* = 0 x1 + 0x2 + 0s1 + 0s2  A1  A2 subject to the above constraints. Initialize the solution by putting x1 = x2 = s1= s2 = 0 then A1= 4 and A2 = 7. The simplex table is cj
0
0
0
0
1
1
RR
cB
B
xB
x1
x2
s1
s2
A1
A2
1
A1
4
2
1
1
0
1
0
4
1
A2
7
1
7
0
1
0
1
1 →
z*
11
zj  cj
3
8
1
1
0
0
↑
x2 enters into the basis and A2 leaves the basis. The new iterative table is
52
cj
0
0
0
0
1
1
RR
cB
B
xB
x1
x2
s1
s2
A1
A2
1
A1
3
13/7
0
1
1/7
1
1/7
21/13 →
0
x2
1
1/7
1
0
1/7
0
1/7
7
z*
3
zj  cj
13/7
0
1
1/7
0
8/7
↑
x1 enters into the basis and A1 leaves the basis. The new iterative table is cj
0
0
0
0
1
1
cB
B
xB
x1
x2
S1
s2
A1
A2
0
x1
21/13
1
0
7/13
1/13
7/13
1/13
0
x2
10/13
0
1
1/13
2/13
1/13
2/13
z*
0
zj  cj
0
0
0
0
1
1
Since zj  cj are all nonnegative and no artificial variable appears in the basis, the optimum basic feasible solution to the objective function of phase I is obtained and go to phase II. Phase II : Consider the objective function with original cost associated to the decision variables; i.e. Maximize z =  x1  x2 + 0s1 + 0s2 . Here we will initialize the solution with last table of phase I. cj
1
1
0
0
cB
B
xB
x1
x2
s1
s2
1
x1
21/13
1
0
7/13
1/13
1
x2
10/13
0
1
1/13
2/13
z
31/13
zj  cj
0
0
6/13
1/13
Since zj  cj are all nonnegative, the optimum basic feasible solution is x1 = 21/13, = 31/13 is obtained. Example 2.19 Use twophase method to minimize z = x1  2x2 – 3x3 subject to the constraints : 2x1 + x2 + 3x3 = 2, 2x1 + 3x2 + 4x3 = 1, and x1 , x2 , x3 ≥ 0.
53
x2 = 10/13 and minimum z
Solution : In order to get constraints equations, introduce artificial variables A1, A2, ≥ 0. Then LPP is Maximize z = x1  2x2 – 3x3  A1  A2 subject to the constraints : 2x1 + x2 + 3x3 + A1 = 2, 2x1 + 3x2 + 4x3 + A2 = 1, and x1 , x2, A1, A2 ≥ 0. Phase I : Here the objective function is Maximize z* = 0 x1 + 0x2 + 0s1 + 0s2  A1  A2 subject to the above constraints. Initialize the solution by putting x1 = x2 = 0 then A1= 2 and A2 = 1. The simplex table is cj
0
0
0
1
1
RR
cB
B
xB
x1
x2
x3
A1
A2
1
A1
2
2
1
3
1
0
2/3
1
A2
1
2
3
4
0
1
1/4 →
z*
3
zj  cj
0
4
7
0
0
↑ x3 enters into the basis and A2 leaves the basis. The new iterative table is cj
0
0
0
1
1
cB
B
xB
X1
x2
x3
A1
A2
1
A1
5/4
7/2
5/4
0
1
3/4
1
x3
¼
1/2
3/4
1
0
1/4
Z*
5/4
zj  cj
7/2
5/4
0
0
3/4
Since zj  cj are all nonnegative, an optimum basic feasible solution to the reduced problem is attained but at the same time artificial variable A1 appears in the basis at a positive level, so given LPP does not possess any feasible solution. 2.9.2 Big – M method : To solve the LPP involving ≥ or =  to type, another method is Big M method in which a high penalty cost is associated to the artificial variables. The computational algorithm is as follows :
54
Step 1 Write given LPP in standard form maximization. Add slack, surplus and artificial variables in the constraints as stated in previous two sections but assign very high value ‘ M’ as a coefficient of the artificial variable. Step 2 Proceed according to the simplex method. At any iteration of the simplex method there can be any one of the following three cases : 1.
Net evaluations zj – cj (j = 1, 2, …, n) are nonnegative and the artificial variables are not be present in the basis. ( alternatively also cjzj ≤ 0)
2.
Net evaluations zj – cj (j = 1, 2, …, n) are nonnegative and there is at least one artificial variable in the basis and the objective function value z contains M. Then the LPP has no solution i.e. infeasible solution.
3.
At least one net evaluation zj – cj (j = 1, 2, …, n) is negative indicating that some variable is trying to enter the basis but all RR – entries are negative or undefined then the problem has unbounded solution.
Example 2.20 Use Big M method to maximize z = 3x1  x2 subject to the constraints : 2x1 + x2 ≥ 2, x1 + 3x2 ≤ 9, x2 ≤ 4 and x1 , x2 ≥ 0. Solution : Introduce surplus variable s1 in and artificial variable A1 in the first constraint and slack variables s2 and s3 in second and third constraints. The modified LPP is Maximize z = 3x1  x2 + 0s1 + 0s2 + 0s3 – MA1 subject to the constraints : 2x1 + x2 – s1 + A1 = 2 x1 + 3x2 + s2 = 9 x2 + s3 = 4 and x1 , x2 , s1, s2, s3, A1 ≥ 0. Putting x1 = x2 = s1 = 0 gives initial iterate as A1 = 2, s2 = 9 and s3 = 4. The iterative table is
cj
3
1
0
0
0
M
RR
cB
B
xB
x1
x2
s1
s2
s3
A1
M
A1
2
2
1
1
0
0
1
1→
0
s2
9
1
3
0
1
0
0
9
0
s3
4
0
1
0
0
1
0

55
z
2M
zj  cj
2M3
M+1
M
0
0
0
↑
x1 enters into the basis and A1 leaves the basis. The new iterative table cj
3
1
0
0
0
RR
cB
B
xB
x1
x2
s1
s2
s3
3
x1
1
1
1/2
1/2
0
0

0
s2
2
0
5/2
1/2
1
0
4→
0
s3
4
0
1
0
0
1

Z
3
zj  cj
0
5/2
3/2
0
0
↑ s1 will enter into the basis and s2 will exist. cj
3
1
0
0
cB
B
xB
x1
x2
s1
s3
3
x1
3
1
3
0
0
0
s1
4
0
5
1
0
0
s3
4
0
1
0
1
z
3
zj  cj
0
10
0
3
The optimum basic feasible solution is x1 = 3, x2 = 0 and maximum z = 9.
Example 2.21 Use Big M method to maximize z = 6x1 + 4x2 subject to the constraints : 2x1 + 3x2 ≤ 30, 3x1 + 2x2 ≤ 24, x1 + x2 ≥ 3 and x1 , x2 ≥ 0. Solution : Introduce slack variables s1 and s2 in first and second constraints and surplus variable s3 in and artificial variable A1 in the third constraint. The modified LPP is Maximize z = 6x1 + 4x2 + 0s1 + 0s2 + 0s3 – MA1 subject to the constraints : 2x1 + 3x2 + s1 = 30
56
3x1 + 2x2 + s2 = 24 x1 + x2  s3 + A1 = 4 , and x1 , x2 , s1, s2, s3, A1 ≥ 0. Putting x1 = x2 = s3 = 0 gives initial iterate as s1 = 30, s2 = 24 and A1 = 4. The iterative table is cj
6
4
0
0
0
M
RR
cB
B
xB
x1
x2
s1
s2
s3
A1
0
s1
30
2
3
1
0
0
0
15
0
s2
24
3
2
0
1
0
0
8
M
A1
3
1
1
0
0
1
1
3→
z
3M
zj  cj
M6
M+4
0
0
M
0
↑
x1 enters into the basis and A1 leaves the basis. The new iterative table cj
6
4
0
0
0
RR
cB
B
xB
x1
x2
s1
s2
s3
0
s1
24
0
1
1
0
2

0
s2
15
0
1
0
1
3
5→
6
x1
3
1
1
0
0
1

z
18
zj  cj
0
2
0
0
6 ↑
s3 enters into the basis and s2 leaves the basis. The new iterative table cj
6
4
0
0
0
cB
B
xB
x1
x2
s1
s2
s3
0
s1
14
0
5/3
1
2/3
0
0
s3
5
0
1/3
0
1/3
1
6
x1
8
1
2/3
0
1/3
0
z
48
zj  cj
0
0
0
2
0
Since all zj – cj ≥ 0, the optimum solution x1 = 8 and x2 = 0 is attained with maximum
57
z = 48.
It is observed from the table that the net evaluation corresponding to nonbasic variable x2 is zero which indicates that there is an alternative solution to the LPP. Enter x2 into the basis instead of s1 or s3. The alternative solution will be
cj
6
4
0
0
0
cB
B
xB
x1
x2
s1
s2
s3
4
x2
42/5
0
1
3/5
2/5
0
0
s3
39/5
0
0
1/5
1/5
1
6
x1
12/5
1
0
2/5
3/5
0
z
48
zj  cj
0
0
0
2
0
Here the optimum solution x1 = 12/5 and x2 = 42/5 with maximum z = 48.
Example 2.22 Maximize Z = x1 + 3x2, Subject to x1 + x2 ≥ 3, x1 + x2 ≤ 2, x1  2x2 ≤ 2 and x1, x2 ≥ 0 Introducing the slack, surplus and the artificial variables we get, Maximize Z = x1 + 3x2 , Subject to x1 + x2  s1 + A1 = 3, x1 + x2 + s2 = 2, x1  2x2 + s3 = 2, preparing the simplex table and solving,
58
Cj → ↓
Var→
1
3
0
M
0
0
x1
x2
s1
A1
s2
s3
RHS
R.R
Basis ↓ M
A1
1
1
1
1
0
0
3
3
0
s2
1
1
0
0
1
0
2
2→
0
s3
1
2
0
0
0
1
2
1
1+M
3+M
M
0
0
0
Z=3M
N.E.R
↑
=CjZj M
A1
2
0
1
1
1
0
1
1/2 →
3
x2
1
1
0
0
1
0
2
2
0
s3
1
0
0
0
2
1
6
6
N.E.R
4+2M
0
M
0
(M+3)
0
Z=6M
=CjZj
↑
1
x1
1
0
1/2

1/2
0
1/2
1
3
x2
0
1
1/2

1/2
0
5/2
5
0
s3
0
0
1/2

3/2
1
13/2
13
0
0
2↑

1
0
Z=8
N.E.R =CjZj
Here, s3 is trying to enter the basis. But as all R.R entries are negative, the given problem has an unbounded solution. Example 2.23 Maximize Z = 5x1  x2, Subject to x1 + x2 ≥ 2, x1 + 2x2 ≤ 2, 2x1 + x2 ≤ 2 and x1, x2 ≥ 0 Introducing the slack, surplus and the artificial variables we get, Maximize Z = 5x1  x2 Subject to x1 + x2  s1 + A1 = 2 x1 + 2x2 + s2 = 2 2x1 + x2 + s3 = 2
59
preparing the simplex table and solving,
Cj → ↓
Var→
5
1
0
M
0
0
x1
x2
s1
A1
s2
s3
RHS
R.R
Basis ↓ M
A1
1
1
1
1
0
0
2
2
0
s2
1
2
0
0
1
0
2
2
0
s3
2
1
0
0
0
1
2
1→
N.E.R
5+M
1+M
M
0
0
0
Z=2M
=CjZj
↑
M
A1
0
1/2
1
1
0
1/2
1
2
0
s2
0
3/2
0
0
1
1/2
1
2/3 →
5
x1
N.E.R
1
1/2
0
0
0
1/2
1
0
(M7)/2
M
0
0
(M+5)/2
Z= M+5
↑
=CjZj M
A1
0
0
1
1
1/3
1/3
2/3
1
x2
0
1
0
0
2/3
1/3
2/3
5
x1
1
0
0
0
1/3
2/3
2/3
0
0
M
0
(7+M)/3
(M+11)/3
Z=
N.E.R
2
=CjZj
(82M)/3
As all NER entries are ≤ 0, the optimality criteria is satisfied, but the Z value in the final table contains the coefficient of the artificial variable. Hence, it is a case of no feasible solution.
2.10 Duality in LPP : From both the theoretical and practical points of view, the theory of duality is one of the most important and interesting concepts in linear programming. The basic idea behind the duality theory is that every linear programming problem has an associated linear program called its dual such that a solution to the original linear
60
program also gives the solution to its dual. Thus, whenever a linear program is solved by the simplex method, we are actually getting solutions for two linear programming problems. The original problem is called the primal problem. Although the idea of duality is essentially mathematical, we shall see that duality has important interpretations which can help managers to answer questions about alternative courses of action and their relative values. Let us understand the concepts and the managerial significance of duality with the help of the following example. Example 2.24: ABC Company makes three products, T, C and B, which must be processed through the Assembly, Finishing and the Packaging departments. The three departments have maximum 60, 40 and 80 hours available. The profit on one unit of each of the products is Rs. 2 per T, Rs. 4 per C and Rs. 3 per B. The other data is given below. Hours required for 1 unit of product T
C
B
Assembly
3
4
2
Finishing
2
1
2
Packaging
1
3
2
The problem can be formulated as: Maximize: 2T + 4C + 3B subject to the constraints : 3T + 4C + 2B ≤ 60 2T + 1C + 2B ≤ 40 1T + 3C + 2B ≤ 80 and T, C and B ≥ 0 Let the slack variables SA, SF and SP be the unused hours in the three departments. So the above L.P becomes Maximize: 2T + 4C + 3B + 0SA + 0SF + 0SP subject to the constraints : 3T + 4C +2B + SA = 60 2T + 1C + 2B + SF = 40
61
1T + 3C + 2B + SP = 80 and T, C and B ≥ 0 The following table gives the simplex solution of the above problem. cj
2
4
3
0
0
0
RR
cB
B
xB
T
C
B
SA
SF
SP
0
SA
60
3
4
2
1
0
0
15 →
0
SF
40
2
1
2
0
1
0
40
0
Sp
80
1
3
2
0
0
1
80/3
z
0
cj  zj
2
4
3
0
0
0
↑ 4
C
15
3/4
1
1/2
1/4
0
0
30
0
SF
25
5/4
0
3/2
1/4
1
0
50/3 →
0
Sp
35
5/4
0
1/2
3/4
0
1
70
z
60
cj  zj
1
0
1
1
0
0
↑ 4
C
20/3
1/3
1
0
1/3
1/3
0
3
B
50/3
5/6
0
1
1/6
2/3
0
0
Sp
80/3
5/3
0
0
2/3
1/3
1
z
228/3
cj  zj
11/6
0
0
5/6
2/3
0
This being a maximization problem, the optimality criteria is satisfied as all N.E.R entries, that is all cj  zj entries are ≤ 0. Recall that (a) Each positive number in the cj  zj row represents the net profit obtainable if 1 unit of the variable heading that column were added to the solution. (b) Each negative number (a net loss) in the cj  zj row indicates the decrease in the total profit if 1 unit of the variable heading that column were added to the product mix. A negative number in the cj  zj row under one of the columns representing time has another interpretation also. A negative number here represents the amount of increase in total profit if the number of hours available in that department could be increased by 1.
62
We see from the table that the optimal solution is to produce 20/3 units of C, 50/3 units of B and no unit of T. The total contribution for this product mix is about Rs. 76.67. The values under the SA, SF and SP columns in the cj  zj row indicate that to remove 1 productive hour from each of the three departments would reduce the total contribution respectively, by Rs. 5/6, 2/3 and 0. This can be taken to mean also that if additional capital were available to expand productive time in these departments, the value of increased production to ABC Company, of 1 more hour in each of these departments would be Rs. 5/6, 2/3 and 0. i.e. adding another hour of Assembly time will increase profit by Rs. 5/6, adding another hour of Finishing will increase profit by Rs. 2/3 and adding another hour of packaging time will leave profit unchanged. These three values 5/6, 2/3 and 0 are called dual prices, shadow prices, or simply unit worth of a resource. To be more specific, if adding another hour to each department costs the same, we would add the time to the Assembly department, for there it is worth Rs. 5/6, which is more than 2/3 or 0. This primal was concerned with maximizing the contribution from the three products; the dual will be concerned with evaluating the time used in the three departments to produce T, C and B. The production manager of the ABC Company recognizes that the productive capacity of the three departments is a valuable resource to the firm; he wonders whether it would be possible to place a monetary value on its worth. He soon comes to think in terms of how much he would receive from another manufacturer, a renter who wants to rent all the capacity in ABC Company’s three departments. He reasons along the following lines. Suppose the rental charges were Rs. A per hour of Assembly time, Rs. F per hour of Finishing and Rs. P per hour of Packaging time, then the cost to the renter of all the time would be Total rent paid = 60A + 40F + 80P and of course the renter would want to set the rental prices in such a way as to Minimize the total rent he would have to pay; so the objective of the dual is Minimize : 60A + 40F + 80P The production manager of ABC Company will not rent out his time unless the rent offered enables him to net as much as he would if he used the time to produce products T, C and B for ABC Company. This observation leads to the constraints of the dual. To make one unit of T requires 3 Assembly hours, 2 Finishing hours and 1 packaging hour. The time that goes into making one unit of T would be rented out for Rs. 3A + 2F + 1P. If the manager used all that time to make T, he would earn Rs. 2 in contribution to profit., and so he will not rent out the time unless
63
3A + 2F + 1P ≥ 2 and this gives the first constraint in the dual. Similar reasoning with respect to C and B gives the other two dual constraints 4A + 1F + 3P ≥ 4 2A + 2F + 2P ≥ 3 So the entire dual problem which determines for the manager of the ABC Company, the value of the productive resources of the company (its plant hours) is: Minimize 60A + 40F + 80P subject to the constraints : 3A + 2F + 1P ≥ 2 4A + 1F + 3P ≥ 4 2A + 2F + 2P ≥ 3 and A, F, and P ≥ 0 We add appropriate surplus and artificial variables as follows and then solve the dual problem. Only the initial and the final tables are shown below. Minimize 60A + 40F + 80P subject to the constraints : 3A + 2F + 1P  S1 + A1 = 2 4A + 1F + 3P  S2 + A2 = 4 2A + 2F + 2P  S3 + A3 = 3 with A, F, and P ≥ 0
64
cj
60
40
80
0
0
0
M
M
M
cB
B
xB
A
F
P
S1
S2
S3
A1
A2
A3
RR
M
A1
2
3
2
1
1
0
0
1
0
0
2/3 →
M
A2
4
4
1
3
0
1
0
0
1
0
1
M
A3
3
2
2
2
0
0
1
0
0
1
3/2
z
9M
cjzj
609M
405M
806M
M
M
M
0
0
0
↑ :
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
60
A
5/6
1
0
2/3
0
1/3
1/6
0
1/3
1/6
0
S1
11/6
0
0
5/3
1
1/3
5/6
1
1/3
5/6
40
F
2/3
0
1
1/3
0
1/3
2/3
0
1/3
2/3
z
228/3
cjzj
0
0
80/3
0
20/3
50/3
M
M20/3
M50/3
This being a minimization problem, the optimality criteria is satisfied as all N.E.R entries, that is all cjzj row entries are ≥ 0. The optimum solution to the dual problem indicates that the worth to ABC Company, of 1 productive hour in the Assembly department is Rs. 5/6 (A = 5/6 in the final table), in the Finishing department is Rs. 2/3 and in the packaging department is Rs. 0 (T is not in the basis). Of course, these are the same values we got by looking at the cjzj row in the final table of the primal problem. Thus, when we solved the primal, we also got the solution to the dual. Does solving the dual also give us the solution to the primal? Yes, if we look at the values contained under the S1, S2 and S3 columns in the cjzj row in the final table of solution of the dual, we find 0, 20/3 and 50/3, which are the optimal values for T, C and B in the primal.
65
Now look at the two problem formulations again. Primal Problem
Dual problem
Maximize: 2T + 4C + 3B
Minimize: 60A + 40F + 80P
Subject to:
Subject to :
3T + 4C +2B ≤ 60
3A + 2F + 1P ≥ 2
2T + 1C + 2B ≤ 40
4A + 1F + 3P ≥ 4
1T + 3C + 2B ≤ 80
2A + 2F + 2P ≥ 3
and T, C and B ≥ 0
and A, F, and P ≥ 0
Some direct observations from the table above: 1.
The objective function coefficients of the primal problem have become the right hand side constants of the dual. Similarly, the right hand side constants of the primal have become the objective function coefficients of the dual.
2.
The inequalities have been reversed in the constraints.
3.
The objective is changed from maximization in primal to minimization in dual.
4.
Each column in primal corresponds to a constraint (row) in a dual. Thus, the number of dual constraints is equal to the number of primal variables.
5.
Each constraint (row) in the primal corresponds to a column in the dual. Hence, there is one dual variable for every primal constraint.
6.
The transpose of the technological (inputoutput) coefficient matrix of the primal becomes the technological (inputoutput) coefficient matrix of the dual.
Further economic interpretations of duality: 1.
Suppose T, C, B is a feasible solution to the primal ( a level of output that can be achieved with the current resources) and A, F, P is a feasible solution of the dual (a set of rents which would induce the manager to rent out the plant rather than to use it himself). Then, 2T + 4C + 3B ≤ 60A + 40F + 80P
2.
The optimal values are the same in both problems. This is always the case. It means that the value to ABC Company, of all its productive resources is precisely equal to the profit the firm can make if it employs these resources in the best possible way. In this way, the profit made on the firm’s output is used to derive the imputed values of the inputs to produce that output.
66
3.
In the above problem, the dual variable P was equal to 0 and not all the packaging time was used. This is entirely reasonable, since if the company already has excess packaging time, additional packaging time cannot be profitably used and so it worthless. This is half of what is called the principle of complimentary slackness.
4.
A = 5/6, F = 2/3 and P = 0, 3A+2F+1P = 23/6. This shows us that the value of the time needed to produce one unit of T is Rs. 23/6. But one unit of T contributes a profit of Rs. 2. Since the time needed to produce T is worth more than the return on it, the optimal solution to the primal does not produce any T. This is the other half of the principle of complimentary slackness.
Now we look at the concept of duality by introducing mathematical rigour. To every LPP, there is an associated LPP called dual of the given LPP. The given problem is called primal problem; i.e. every LPP when expressed in its standard form has associated unique LPP based on the same data. These primal – dual pair are interrelated and variables of this pair have interesting implications in econometrics, production engineering etc. Let us define dual of Primal : Maximize z = cTx, x є Rn subject to the constraints : Ax ≤ b, x ≥ 0, b є Rm, A is m × n . Dual : Minimize z* = bTw, w є Rm subject to the constraints : AT w ≥ c, w ≥ 0. Note : In order to convert any problem into its dual, the primal LPP must be expressed in the maximization form with all constraints in ≤ type or = type. Thus, primal – dual pairs are as follows : 1 2 3 4
Primal problem Maximize z = cTx subject to the constraints : Ax ≤ b, x ≥ 0 Maximize z = cTx subject to the constraints : Ax = b, x ≥ 0 Minimize z = cTx subject to the constraints : Ax = b, x ≥ 0 Minimize (maximize) z = cTx subject to the constraints : Ax = b, x is unrestricted
Dual problem Minimize z* = bTw subject to the constraints : AT w ≥ c, w ≥ 0 Minimize z* = bTw subject to the constraints : AT w ≥ c, w is unrestricted. Maximize z* = bTw subject to the constraints : AT w ≤ c, w is unrestricted. Maximize (minimize) z* = bTw subject to the constraints : AT w = c, w is unrestricted.
Given an LPP, it can be directly converted into its dual using the following table :
67
Primal Problem
Dual Problem
1
Maximization with constraints ≤ or =
Minimization with constraints ≥ or =
2
No. of constraints
No. of variables
3
Coefficients of the objective function
RHS of constraints
4
Input – output matrix A
Input – output matrix AT
5
j – th constraint of = type
j – th variable unrestricted in sign
6
k – th variable unrestricted in sign
k – th constraint of = type
Example 2.25 Write dual of LPP : Maximize z = 8x1 + 6x2 subject to the constraints : x1 – x2 ≤ 3/5, x1 – x2 ≥ 2, x1, x2 ≥ 0 Solution : To write given LPP in maximization form with all constraints ≤  type; So primal is Maximize z = 8x1 + 6x2 subject to the constraints : x1 – x2 ≤ 3/5,  x1 + x2 ≤ 2, x1, x2 ≥ 0 Let w1 and w2 be dual variables. Then dual problem is Minimize z* = 3/5w1 – 2w2 subject to the constraints : w1 – w2 ≥ 8,  w1 + w2 ≥ 6, w1, w2 ≥ 0 Example 2.26 Write dual of LPP : Minimize z = 4x1 + 6x2 + 18x3 subject to the constraints : x1 + 3x2 ≥ 3, x2 + 2x3 ≥ 5, x1, x2 , x3 ≥ 0 Solution : Primal is Minimize z = 4x1 + 6x2 + 18x3 subject to the constraints : x1 + 3x2 + 0x3 ≥ 3, 0x1 + x2 + 2x3 ≥ 5, x1, x2, x3 ≥ 0 Let w1 and w2 be dual variables corresponding to each of the primal constraint. Then dual problem is Maximize z* = 3w1 + 5w2 subject to the constraints : w1 + 0w2 ≤ 4, 3w1 + w2 ≤ 6, 0w1 + 2w2 ≤ 18. Rewriting the dual problem as Maximize z* = 3w1 + 5w2 subject to the constraints : w1 ≤ 4, 3w1 + w2 ≤ 6, 2w2 ≤ 18, w1, w2 ≥ 0,
68
Example 2.27 Write dual of LPP : Minimize z = 7x1 + 3x2 + 8x3 subject to the constraints : 8x1 + 2x2 + x3 ≥ 3, 3x1 + 6x2 + 4x3 ≥ 4, 4x1 + x2 + 5x3 ≥ 1, x1 + 5x2 + 2x3 ≥ 7, x1, x2 , x3 ≥ 0 Solution : Primal is Minimize z = 7x1 + 3x2 + 8x3 subject to the constraints : 8x1 + 2x2 + x3 ≥ 3, 3x1 + 6x2 + 4x3 ≥ 4, 4x1 + x2 + 5x3 ≥ 1, x1 + 5x2 + 2x3 ≥ 7, x1, x2, x3 ≥ 0 Let w1, w2, w3 and w4 be dual variables corresponding to each of the primal constraint. Then dual problem is Maximize z = 3w1 + 4w2 + x3 + 7w4 subject to the constraints : 8w1 + 3w2 + 4w3 + w4 ≤ 7, 2w1 + 6w2 + w3 + 5w4 ≤ 3, w1 + 4w2 + 5w3 + 2w4 ≤ 8, w1, w2, w3, w4 ≥ 0 . Example 2.28 Write dual of LPP : Maximize z = 3x1 + x2 + x3 – x4 subject to the constraints : x1 + 5x2 + 3x3 + 4x4 ≤ 4, x1 + x2 =  1, x3 – x4 ≤  5, x1, x2 , x3, x4 ≥ 0 Solution : Primal as Maximize z = 3x1 + x2 + x3 – x4 subject to the constraints : x1 + 5x2 + 3x3 + 4x4 ≤ 4,  x1  x2 = 1, x3 – x4 ≤ 5, x1, x2, x3, x4 ≥ 0 Let w1, w2, and w3 be dual variables corresponding to each of the primal constraint. Then dual problem is Minimize z* = 4w1 + w2 – 5w3 subject to the constraints : w1  w2 ≥ 3, 5w1  w2 ≥ 1, 3w1 + w3 ≥ 1, 4w1  w2 ≥ 1, and
w1, w3 ≥ 0, and w2
unrestricted. Example 2.29 Obtain dual of LPP : Minimize z = x1  3x2  2x3 subject to the constraints : 3x1  x2 + 2x3 ≤ 7, 2x1  4x2 ≥ 12,  4x1 + 3x2 + 8x3 = 10, unrestricted. Solution : Putting x3 = x3′ x3″, we have primal as Minimize z = x1  3x2 – 2(x3′ x3″)
69
x1, x2 ≥ 0 and x3 is
subject to the constraints : 3x1 + x2  2(x3′ x3″) ≥  7, 2x1  4x2 ≥ 12,  4x1 + 3x2 + 8(x3′ x3″) = 10; x1, x2, x3′, x3″ ≥ 0 Also as the third constraint is an equality, we convert it into inequalities as follows : 4x1 + 3x2 + 8(x3′ x3″) ≤ 10 and 4x1 + 3x2 + 8(x3′ x3″) ≥ 10 Rewriting primal problem as minimization problem with all constraints ≥  type : Minimize z = x1  3x2 – 2(x3′ x3″) subject to the constraints : 3x1 + x2  2(x3′ x3″) ≥  7, 2x1  4x2 ≥ 12, 4x1  3x2  8(x3′ x3″) ≥  10, 4x1 + 3x2 + 8(x3′ x3″) ≥ 10; x1, x2, x3′, x3″ ≥ 0 Let w1, w2, w3 and w4 be dual variables corresponding to each of the primal constraint. Then dual problem is Maximize z* =  7w1 + 12w2  10w3 + 10w4 subject to the constraints :  3w1 + 2w2 + 4w3  4w4 ≤ 1, w1 – 4w2  3w3 + 3w4 ≤  3,
2w1  8w3 + 8w4 ≤  2,
2w1 + 8w3 – 8w4 ≤ 2, w1, w2 , w3, w4 ≥ 0. The third and the fourth constraints can be written as 2w1 + 8w3 – 8w4 = 2. From the objective function and the constraints, w3 and w4 can be put together by writing w = w3 – w4. So w becomes unrestricted in sign. Rewriting the dual problem as Maximize z* =  7w1 + 12w2  10w subject to the constraints :  3w1 + 2w2 + 4w ≤ 1, w1 – 4w2  3w ≤  3, 2w1 + 8w = 2,
w1 ≥ 0, w2 ≥ 0 and w is
unrestricted. Instead of working out the dual in the above manner, the following way can also be applied by using the above table given. Primal (minimize with ≥ )
Dual
Minimize z = x1  3x2  2x3
Maximize z* =  7w1 + 12w2  10w
subject to the constraints :
subject to the constraints :
3x1 + x2  2x3 ≥ 7,
3w1 + 2w2 + 4w ≤ 1,
2x1  4x2 ≥ 12,
w1 – 4w2  3w ≤  3,
4x1  3x2  8x3 = 10,
2w1  8w = 2,
x1, x2 ≥ 0 and x3 is unrestricted.
w1 ≥ 0, w2 ≥ 0 and w is unrestricted
70
2.10.1 Duality Theorems : Theorem 2.6 The dual of dual is the primal. Proof : Consider the standard LPP : Primal : To find, x є Rn which maximize z = cTx, x є Rn subject to the constraints : Ax ≤ b, x ≥ 0, b є Rm, A is m × n – matrix
(2.15)
Then dual of (2.15) is to find w є Rm which minimize z* = bTw, w є Rm subject to the constraints : AT w ≥ c, w ≥ 0.
(2.16)
Eq. (2.16) can be written as find w є Rm which maximize z* =  bTw, w є Rm subject to the constraints :  AT w ≤  c, w ≥ 0.
(2.17)
Now dual of (2.17) is find, x є Rn which minimize z** = (c)Tx, x є Rn subject to the constraints : (AT)T x ≤ b, x ≥ 0, b є Rm
(2.18)
Rewriting (2.18) we get (2.15); i.e. dual of dual is primal. Theorem 2.7 If x0 is a feasible solution of the primal (2.15) and w0 is a feasible solution of the dual problem (2.16) then cTx0 ≤ bTw0. Proof : Since x0 is a feasible solution of the primal (2.15), Ax0 ≤ b. Premultiply by w0T. Then w0T Ax0 ≤ w0T b or w0T Ax0 ≤ bw0T
(2.19)
(because both are 1 × 1 size matrices of real numbers). Now w0 is a feasible solution of the dual problem (2.16) so ATw0 ≥ c. Taking transpose, we get w0TA ≥ cT or w0TAx0 ≥ cT x0
(2.20)
From (2.19) and (2.20), we have the result. Theorem 3.8 The value of the objective function z for any feasible solution of the primal is not less than the value of the objective function z* for any feasible solution of the dual. Proof: Consider the primal problem (2.15) to find x є Rn which maximize z = cTx, x є Rn subject to the constraints : Ax ≤ b, x ≥ 0, b є Rm, A is m × n – matrix Then dual (2.16) is to find w є Rm which minimize z* = bTw, w є Rm subject to the constraints : AT w ≥ c, w ≥ 0. Introducing the necessary slack variables in constraints of (2.15) and (2.16) we get Primal z = c1x1 + c2x2 + … + cnxn
71
subject to the constraints : a11x1 + a12x2 + … + a1nxn + xn+1 = b1; a21x1 + a22x2 + … + a2nxn + xn+2 = b2; : : am1x1 + am2x2 + … + amnxn + xm+n = bm; and x1, x2, …, xn+m ≥ 0; and its dual is z* = b1w1 + b2w2 + … + bnwn Subject to the constraints : a11w1 + a21w2 + … + am1wm + wm+1 = c1; a12w1 + a22w2 + … + am2wm + wm+2 = c2; : : a1nw1 + a2nw2 + … + amnwm + wm+n = bm; and w1, w2, …, wm+n ≥ 0. Let x1, x2, …, xn+m and w1, w2, …, wm+n be any feasible solutions of (3.13) and (3.14) respectively. Multiply primal constraints by w1, w2, …, wm and add. Similarly multiply dual constraints by x1, x2, …, xn and add. Subtracting resultant equations, we get z – z* = x1wm+1 + … + xnwm+n + w1xn+1 + … + wmxn+m. Clearly, RHS is nonnegative, so z – z* ≥ 0.
Review Exercise Solve graphivally :
Q. Maximize Z = 90x1 + 60x2 subject to : 5x1 + 8x2 ≤ 2000, x1 ≤ 175, x2 ≤ 225, 7x1 + 4x2 ≤ 1400; x1, x2 ≥ 0. Ans. x1 = 800/9, x2 = 1750/9, max z = 59000/3.
72
Q. Maximize Z = 60x1 + 40x2 subject to : x1 ≤ 25, x2 ≤ 35, 2x1 + x2 = 60; x1, x2 ≥ 0. Ans. x1 = 25, x2 = 10, max z = 1900. Q. Maximize Z = 30x1 + 40x2 subject to :
4x1 + 6x2 ≤ 180, x1 ≤ 20, x2 ≥ 10, x1 + x2 ≤ 40; x1, x2 ≥ 0. Ans. x1 = 16, x2 = 16.66667, max z = 1266.67.
Q. Minimize Z = 4x1 + 3x2 subject to : x1 + 3x2 ≥ 9, 2x1 + 3 x2 ≥ 12, x1 + x2 ≥ 5; x1, x2 ≥ 0. Ans. x1 = 0, x2 = 5, max z = 15. Q. Maximize Z = x1 + 3x2 subject to : x1 + 2x2 ≤ 9, x1 – x2 ≥ 2, x1 + 4x2 ≤ 11; x1, x2 ≥ 0. Ans. x1 = 7, x2 = 1, max z = 10. Q. Maximize Z = 10x1 + 8x2 subject to :
2x1 + x2 ≤ 20, x1 + 3 x2 ≤ 30, x1 – 2x2 ≥ –15; x1, x2 ≥ 0. Ans. x1 = 6, x2 = 8, max z = 124.
Q. Solve graphically : A diet conscious housewife wishes to ensure certain minimum intake of vitamins A, B and C for the family. The minimum daily (quantity) needs of the vitamins A, B and C for the family are respectively 30, 20 and 16 units. For the supply to these minimum requirements, the housewife relies on two fresh foods. The first one provides 7, 5, 2 units of the three vitamins per gram respectively and the second one provides 2, 4, 8 units of the same three vitamins per gram of the foodstuff respectively. The first foodstuff costs Rs. 3 per gram and the second Rs. 2 per gram. The problem is how many grams of each foodstuff should the housewife buy everyday to keep her food bill as low as possible?
Ans. x1 = 10, x2 = 0, min z = 30.
73
Q. (a)
Maximize Z = 40x1 + 30x2 subject to : x1 + 2x2 ≤ 40; 4x1 + 3x2 ≤ 120; x1, x2 ≥ 0
Ans. x1 = 30, x2 = 0, max z =1200 or x1 = 24, x2 = 8, max z =1200
(b)
Maximize Z = 3x1 – x2 subject to : 15x1 – 5x2 ≤ 30; 10x1 + 30x2 ≤ 120; x1, x2 ≥ 0
Ans. x1 = 2, x2 = 0, max z = 6 or x1 = 3, x2 = 3, max z = 6.
Q. (a)
Maximize Z = 5x1 + 3x2 subject to : 4x1 + 2x2 ≤ 8; x1 ≥ 4; x2 ≥ 6 ; x1, x2 ≥ 0
(b)
Maximize Z = 6x1  4x2 subject to : 2x1 + 4x2 ≤ 4, 4x1 + 8x2 ≥16; x1, x2 ≥ 0
Ans. Infeasible solution.
Q. (a)
Maximize Z = 4x1 + 2x2 subject to : x1 ≥ 4, x2 ≤ 2; x1, x2 ≥ 0.
(b)
Maximize Z = – x1 + x2 subject to : – x1 + 4x2 ≤ 10, – 3x1 + 2x2 ≤ 2; x1, x2 ≥ 0.
Ans. Unbounded solution
74
Simplex method Q. Find the maximum value of p = x + 2y + 3z
subject to: 7x + z ≤ 6, x + 2y ≤ 20, 3y + 4z ≤ 0 ; x ≥ 0, y ≥ 0, z ≥ 0
Ans. x = 0.8571, y = 0, z = 0, max p = 0.8571.
Q. Find the maximum value of p = 2x  3y + 5z
subject to: 2x + y ≤ 16, y + z ≤ 10, x + y + z ≤ 20 ; x ≥ 0, y ≥ 0, z ≥ 0
Ans. x = 8, y = 0, z = 10, max p = 66. Q. Find the minimum value of z = x1 – 3x2 + 2x3 subject to: 3x1 – x2 + 2x3 ≤ 7, 2x1 + 4x2 ≤ 12, 4x1 + 3x2 + 8x3 ≤ 10; x1, x1and x3 ≥ 0. Ans. x1 = 4, x2 = 5, min z = 11. Q. Find the maximum value of p = 2x + 4y + z + w subject to: x + 3y + w ≤ 4, 2x + y ≤ 3, y + 4z + w ≤ 3; x, y, z, w ≥ 0. Ans. x = 1, y = 1, z = 0.5, w = 0, max p = 13/2. Q. Find the maximum value of p = 107x + y + 2z subject to : 14x + y – 6z + 3w = 7, 16x + 0.5y – 6z ≤ 5, 3x – y – z ≤ 0 ; x, y, z, w ≥ 0. [Hint: divide the first equation by 3 (coefficient of w) and then treat w as the slack variable] Ans. Unbounded solution. Q. Find the maximum value of p = 2x + 4y + 3z subject to: 3x + 4y + 2z ≤ 60, x + 3y + 2z ≤ 80, 2x + y + 2z ≤ 40; x, y, z ≥ 0. Ans. x = 0, y = 20/3, z = 50/3, max p = 250/3.
Q. Find the maximum value of p = 2x + 4y + z + w subject to: 2x + y + 2z + 3w ≤ 12, 2x + y + 4z ≤ 16, 3x + 2z + 2w ≤ 20; x, y, z ,w ≥ 0. Ans. x = 0, y = 12, z = 0, w = 0, max p = 48.
75
Solve the following LP problems using Big – M method. Q. Find the minimum value of p = 4x + 8y + 3z subject to: 3x + 2y + z ≤ 3, 2x + y + 2z ≥ 3; x, y, z ≥ 0. Ans. x = 3/4, y = 0, z = 3/4, min p = 3. Q. Find the maximum value of p = 2x + y + 3z subject to: 2x + 3y + 4z = 12, x + y + 2z ≤ 5; x, y, z ≥ 0. Ans. x = 3, y = 2, z = 0, max p = 10. Q. Find the minimum value of p = 5x + 2y + 10z subject to: x  z ≤ 10, y + z ≥ 10 ; x, y, z ≥ 0. Ans. x = 0, y = 10, z = 0, min p = 20.
Solve the following LP problem to show that these have alternative optimal solutions. Q. Find the minimum value of p = 2x + 8y subject to: 2x + 2y ≥ 14, 5x + y ≥ 10, x + 4y ≥ 12 ; x, y ≥ 0. Ans. (i) x = 12, y = 0, min p = 24. (ii) x = 16/3, y = 5/3, min p = 24. Q. Find the maximum value of p = x + 2y + 3z – w subject to: x + 2y + 3z = 15, x + 2y + z + w ≥ 10, 2x + y + 5z ≥ 20 ; x, y, z, w ≥ 0. Ans. (i) x = y = z = 2.5, w = 0, max p = 15 or x = 0, y = 15/7, z = 25/7, w = 0, max p = 15 Solve the following LP problem to show that these have unbounded solutions.
Q. Find the minimum value of p = x + 2y + 3z
subject to: x + y + z ≥ 500, x + 2y + 3z ≥700, y + 3z ≤ 0 ; x, y, z ≥ 0
Ans. The solution is unbounded.
Q. Find the minimum value of p = 50x + 150y + 100z
subject to: 5x + 5y + 5z ≥2,500, 5x + 10y + 15z ≥3,500, 3x  y + 3z ≤ 0 ; x, y, z ≥ 0
76
Ans. The solution is unbounded. Solve the following LP problem to show that these have no feasible solutions. Q. Find the minimum value of p = x – 2y – 3z subject to: – 2x + y + 2z = 2, 2x + 3y + 2z = 1; x, y, z ≥ 0. Ans. There is no feasible solution. Q. Find the maximum value of p = x + 3y subject to: x – y ≥ 1, 3x – y ≤ 3; x, y ≥ 0. Ans. There is no feasible solution.
77