27
DECISION THEORY References: (1) Michael D. Resnick, Choices (An Introduction to Decision Theory). 5th Ed. Univ. Of Minnesota Press 2000. (2) Rex Brown, Rational Choice and Judgment. Wiley Interscience, 2005. (3) Robert J. Vanderbei, Linear Programing. 3rd Ed. , Springer 2007. (4) Yih-Long Chang, WinQSB Version 2.0,. Wiley, 2003. (5) J. Lawrence, B. Pasternack, Applied Management Science. 2nd Ed. Wiley 2010. (6) K. Leyton-Brown, Y. Shoham, Essentials of Game Theory. Morgan Clay- pool Publ. 2008. (7) R. Gibbons, A Primer in Game Theory. Pearson Education Ltd 1992. (8) J. Temesi, Foundations of decision theory (in Hungarian), Aula, 2002, Bu- dapest (9) W. J. Stevenson, Operation management, McGraw-Hill, Irvin, 2008 Software: WinQSB (Quantitative System for Business) http://www.econ.unideb.hu/sites/download/WinQSB.zip) 1. Introduction Decision theory: web Google search= 94.8 million hits Some areas of decision theory: medical, law, economics, technical, engineering, others. Some characteristic problems in decision theory Every day we have to make decisions. Sometimes we have to decide at once (e.g. what to eat for breakfast, where to have lunch today, which way to go to the university from our flat) at other occasions we have time to decide, moreover we must have justified, well considered decisions (e.g. decision about the productions of a factory: the quantity of various products, which are optimal in certain respect). 1. Production problem: a factory produces several products, and we have to decide how much to manufacture from each product such that e.g. the profit should 1

DECISION THEORY - riemann.math.klte.huriemann.math.klte.hu/~losi/jegyzet/eco/decision_1.pdf · 1. Introduction Decision theory: web Google search= 94.8 million hits Some areas of

Embed Size (px)

Citation preview

DECISION THEORY

References:

(1) Michael D. Resnick, Choices (An Introduction to Decision Theory). 5thEd. Univ. Of Minnesota Press 2000.

(2) Rex Brown, Rational Choice and Judgment. Wiley Interscience, 2005.(3) Robert J. Vanderbei, Linear Programing. 3rd Ed. , Springer 2007.(4) Yih-Long Chang, WinQSB Version 2.0,. Wiley, 2003.(5) J. Lawrence, B. Pasternack, Applied Management Science. 2nd Ed. Wiley

2010.(6) K. Leyton-Brown, Y. Shoham, Essentials of Game Theory. Morgan Clay-

pool Publ. 2008.(7) R. Gibbons, A Primer in Game Theory. Pearson Education Ltd 1992.(8) J. Temesi, Foundations of decision theory (in Hungarian), Aula, 2002, Bu-

dapest(9) W. J. Stevenson, Operation management, McGraw-Hill, Irvin, 2008

Software: WinQSB (Quantitative System for Business)http://www.econ.unideb.hu/sites/download/WinQSB.zip)

1. Introduction

Decision theory: web Google search= 94.8 million hits

Some areas of decision theory:

• medical,• law,• economics,• technical, engineering,• others.

Some characteristic problems in decision theory

Every day we have to make decisions. Sometimes we have to decide at once(e.g. what to eat for breakfast, where to have lunch today, which way to go to theuniversity from our flat) at other occasions we have time to decide, moreover wemust have justified, well considered decisions (e.g. decision about the productionsof a factory: the quantity of various products, which are optimal in certain respect).

1. Production problem: a factory produces several products, and we have todecide how much to manufacture from each product such that e.g. the profit should

1

2

be maximal, or the aim can be maximal profit with minimal use of energy (or labor)during the production process.

2. Investment problem: to choose a portfolio with maximal yield.Constraint: financial, other points to consider risk factors, duration of the invest-

ment etc.

3. Work scheduling: e.g. a supermarket employs a certain number of workers.On each day, depending on the trade a certain number of workers have to work. Wehave to make a weekly schedule of the available workers such that the total weeklywage of the workers be minimal (wage for Saturday is higher than other days).

4. Buying fighter planes.Points to consider: cost, max. speed, reliability etc.5. Tender evaluation. An international bank wants to replace its computers

with new ones. How to decide which offer to accept?Points to consider: cost, quality of hardware, service conditions, guarantees,etc.

In each case the aim is one action: the best production plan, the highest return,optimal work schedule, finding the best fighter planes for the country, etc.

Basic concepts

Alternatives: the different actions from which we can choose, their sets is calleddecision space.

Their characteristic properties:

• number of alternatives• how can one characterize the alternative by numbers,• independence of alternatives,• probability of the alternatives

Objectives (criterions, evaluation factors, aims): the directions to which wewant to take our system (sometimes these cannot be reached, or cannot be expressedby numbers).

Properties of objectives:

• complete (all important objectives have to be present),• should be suitable for scrutinizing,• decomposable (the alternatives can be studied for each objective separately),• omission of repetition of objectives,

3

• minimal (the number of objectives be the smallest possible),

Decision makers: the persons responsible for

• supplying the informations needed,• determining the alternatives, choosing the best alternative(s),• realizing the best alternative(s).

Behavior of decision makers: rational (wants to achieve optimum) or irrational.

The decision makers see a part of the problems objectively (in particular thosewhich can be measured, expressed by numbers, calculated values) in other parts ofthe problems some problems the decision makers may have preferences (subjectivestandpoint).

Behavior science: for the decision makers the principle of restricted rational-ity is valid

The decision process:

• formation of a decision situation (there is a need for solving conflicts),• phrasing of the decision problem,• formalizing of the decision problem (in terms of mathematics),• choosing the method of solution,• solution (choosing the optimal action),• adapting, evaluation, scrutinizing: was the decision correct or we have to

begin the decision process again.

2. Buying fighter planes

Viewpoints of the experts:

• S1= max. speed km /h,• S2= useful area in the plane in m2,• S3= loadability in kg,• S4= cost in million dollars,• S5= reliability,• S6= ability to maneouver.

S5, S6 are evaluated in the following way:vl=very low, l=low, a=average, g=good, vg=very good.

4

The table of offers (alternatives:

A1 A2 A3 A4

S1 1000 1250 900 1100

S2 150 270 200 180

S3 20000 18000 21000 20000

S4 5.5 6.5 4.5 5.0

S5 a l g g

S6 vg a g a

Evaluation of quantitative points of view

vl=very low =1 pointsl=low =3 pointsa=average =5 pointsg=good =7 pointsvg=very good =9 points

Making data independent of units

Ideal values are given by experts, or we have prior information on them.The data of our table (matrix) are denoted by: xij the number in the ith line, and

the jth column (elements of a 6× 4 type matrix)Ideal value in the ith line:max

jxij, (where the maximum is taken for all index

j) if the largest value is the ideal one, and minj

xij, if the smallest value is

the ideal one.

The transformed value

vij =xij

maxj

xij,

5

if the largest value is the ideal one, and

vij =minj

xij

xij,

if the smallest value is the ideal one.

Therefore, ifi = 1 then max

jx1j = 1250, v1j =

x1j

1250 (j = 1, 2, 3, 4)

i = 2 then maxj

x2j = 270, v2j =x2j

270 (j = 1, 2, 3, 4)

i = 3 then maxj

x3j = 21000, v3j =x3j

21000 (j = 1, 2, 3, 4)

i = 4 then minj

x4j = 4, 5, !!! v4j = 4,5x4j

(j = 1, 2, 3, 4)

i = 5 then maxj

x5j = 7, v5j =x5j

7 (j = 1, 2, 3, 4)

i = 6 then maxj

x6j = 9, v6j =x6j

9 (j = 1, 2, 3, 4)

Our new table:

A1 A2 A3 A4

S1 0.80 1 0.72 0.88

S2 0.56 1 0.74 0.67

S3 0.95 0.86 1 0.95

S4 0.82 0.64 1 0.90

S5 0.71 0.43 1 0.71

S6 1 0.56 0.78 0.56

The minimal elements in each column are written in boldface letter. Each element ofthe matrix is between 0 and 1 and every line contains a 1 (namely the best offer(s))

In the columns of the alternatives (offers) the best value is 1, and thesmallest value is the worst.

6

Decision methods: narrowing the alternatives

(a) Method of satisfaction: there is a level for each alternative which is justsatisfactory, below this level we cannot accept the alternative(s). For example atUniversity mark less than 2 is failure!

(b) Disjunctive method: gives priority to excellence (e.g. sport, science, art).If an alternative is better than a given level, then it is acceptable.

(c) Dominated alternatives. An alternative is dominated by another one if itis worse in every point of view than the other. Rational decision maker does notchoose dominated alternative.

Decision based on the order of importance: lexicographic method

Order the alternatives according to some point of view, and decide accordingly.For example if price is the most important (poor country cannot afford expensiveplanes) the we choose the cheepest offer.

Decision methods: optimistic, pessimistic, Hurwicz index

In each column of the table we choose the minimal (worst) and the maximal (best)value, these are printed by boldface and italic numbers respectively:

A1 A2 A3 A4

S1 0.80 1 0.72 0.88

S2 0.56 1 0.74 0.67

S3 0.95 0.86 1 0 .95

S4 0.82 0.64 1 0.90

S5 0.71 0.43 1 0.71

S6 1 0.56 0.78 0.56

Denote thes minimal and maximal values by mj and Mj respectively:

mj := minivij, Mj := max

ivij.

7

The pessimistic decision maker first choose the worst value in each columnand out of these finds the best value and takes the alternative corresponding to it(avoid the worst), this method is called the maximin method. In our case

maxj

mj = maxj

(min

ivij

)= 0, 72

the decision is A3.

The optimistic decision maker first choose the best value in each column andout of these finds again the best value and takes the alternative corresponding toit.this method is called the maximax method. In our case

maxj

Mj = maxj

(max

ivij

)= 1

the decisions are A1, A2, A3 which are equivalent.We can introduce the Hurwicz optimistic coefficient (index) α ∈ [0, 1], then

first we calculate the quantities

Hj(α) = αMj + (1− α)mj (j = 1, 2, 3, 4)

where Mj := maxi

xij, mj := minixij (j = 1, 2, 3, 4), then find the maximum of

Hj(α):

maxj

Hj = Hj0

if maximum is attained at j0 the the decision is the alternative Aj0.α = 0 means pessimistic decision maker, α = 1 is the optimistic one.

3. Decision in case of uncertainty: extension of a business

In the previous example the offers do not depend on random events, we had adeterministic model.

In a stochastic model our decision is influenced by random events.

Our business can be extended in 3 ways:A1 = new branch,A2 = new service,A3 = new product.

Our decision depends on the demand of next year, which should be estimated.

8

demand of next year estimated subjective probabilities

S1 very good P (S1) = 0.4

S2 good P (S2) = 0.3

S3 medium P (S3) = 0.2

S4 weak P (S4) = 0.1

4∑i=1

P (Si) = 1

The payoff table of the alternatives depends on the demands in the following way(given in million Ft) together with the probabilities is given in the next table:

A1 A2 A3 P

S1 20 26 10 0.4

S2 12 10 8 0.3

S3 8 4 7 0.2

S4 4 −4 5 0.1

The elements of the matrix are denoted by vij = v(Si, Aj).

Decision possibilities.

1. We neglect the probabilities and decide on the basis of the payoffs.(givingequal chance to S1, S2, S3, S4).

(a) Pessimistic, optimistic and Hurwicz index, see before.(b) Minimax regret decision. Regret is the payoff which is not realized.

9

If e.g.S1 happens but we did not choose (the best payoff) A2 but A1 or A3 thenpayoff not realized is

A1 A2 A3

6 0 16

Each elements of the line are deducted from the maximal element, in this way weget the regret table:

A1 A2 A3

S1 6 0 16

S2 0 2 4

S3 0 4 1

S4 1 9 0

column maximum 6 9 16

The minimum of these column maximums is =6, the decision is A1.

2. We take the probabilities into consideration.

(a) Decision based on (maximal) expected payoff

The expected values of the payoffs for each alternative are:

E(A1) = 20 · 0.4 + 12 · 0.3 + 8 · 0.2 + 4 · 0.1 = 13.6

E(A2) = = 13.8

E(A3) = = 8.3

Decision: A2.

(b) Equal likelihood method. Decision based on maximal expected valuetaking equal probabilities:

10

E(A1) = 20 · 0.25 + 12 · 0.25 + 8 · 0.25 + 4 · 0.25 = 11

E(A2) = = 9

E(A3) = = 7.5

Decision: A1.

(c) Decision based on (minimal) expected regret.

The expected values of the regrets:

E(A1) = 6 · 0.4 + 0 · 0.3 + 0 · 0.2 + 1 · 0.1 = 2.5

E(A2) = = 2.3

E(A3) = = 7.8

Decision A2.Expected value of perfect information.

Suppose that in some way we can influence the state of events Si (e.g. we postponethe decision until the economy is booming and the demand is very good) and in eachyear we do know which state will be realized.

The probabilities of the events will remain the same, but repeating the expansionof our business through 100 years (of course in theory only) we make in each yearthe best decision.Out of 100 years

as P (S1) = 0.4 the event S1 is realized 40 times, we choose A2 with payoff 26,as P (S2) = 0.3 the event S2 is realized 30 times, we choose A2 with payoff 12,as P (S3) = 0.2 the event S3 is realized 20 times, we choose A1 with payoff 8,as P (S4) = 0.1 the event S4 is realized 10 times, we choose A3 with payoff 5,the average payoff for one year is

26 · 0.4 + 12 · 0.3 + 8 · 0.2 + 5 · 0.1 = 16.1

subtracting the expected value of the payoff we get the expected value (payoff)of perfect information:

16.1− 13.8 = 2.3.

We can solve this problem by the Decision Analysis module of the software Win-QSB.

11

Data entry to the Payoff table analysis problem:

The table of solution:

4. Decision trees

This is a graphical decision method.

A company considers developing two new products.The first alternative A1 is a smoke and fire detector, the estimated development

costs is 100000Ft, in case of success the expected increase of the profit is 1000000Ftand the probability of success is 0.5.

The second alternative A2 is a motion detector, whose estimated developmentcost is 10000Ft, in case of success the expected increase of the profit is 400000Ftand the probability of success is 0.8.

Of course there is a third alternative A3 doing nothing (no new product).

In a decision tree we have three kind of nodes:

(1) decision node (denoted by a square)(2) chance node, from which branches start with probabilities (denoted by a circle)(3) endpoint (denoted by a black dot or triangle)

12

The starting node is called root. Starting from the root we draw branches to theright which run into a circle or square. If a branch starts at a circle then we writeon it the corresponding probability, and continue until we reach the endpoint. Thewe calculate the expected values which we write under the chance nodes (circles).Going to the left we write under the decision nodes the smaller expected value.

The decision tree of the above problem is shown below.

We put the following data in the decision analysis program:

Method of solution: first we draw the decision tree by hand, number the nodes,decide which is decision node which is chance node and also write in the tree the

13

probabilities and the payoffs(profits). Next we open the Decision Analysis module ofWinQSB then after clicking to File/ New Problem /Decision Tree Analysisa window opens to where we write

the name of the problemand give the number of nodes OK.Again a window opens to which we write (using the hand drawn decision tree)

the names of the nodes, the branchings, the types of the nodes, the payoffs andprobabilities (if any).

Next click Solve and Analyse, Draw Decision Tree which opens again awindow where we can modify the size of the tree, the nodes the data the programhas to calculate. Click OK then the tree will be drawn which we can make nicermodifying the display data.

Modification of the previous problem. It turned out that the smoke and firedetector can be sold only after a quality control. The cost of this is 5000Ft. Afterthe control the product can obtain three different quality grade: commercial quality,public quality and not qualified. The probability of obtaining commercial grade is0.3 and in that case the net income from this product is 1000000Ft, while publicgrade has probability 0.6 and in this case the net income from this product is only800000Ft. Probability of no qualification is 1-0.3-0.6=0.1.

The data of the modified problem and its decision tree:

14

The decision: develop the motion detector.

The data window and the decision tree of the business extension problem (dealtwith in 3.1) is seen below:

15

16

5. Constrained extremum, linear programing

Extremum= maximum or minimumDecision variables: x = (x1, . . . , xn) ∈ Rn united into an n-dimensional vector,description of conditions/constrains: by help of given functions gi : Rn → R i =1, . . . , k + l

gi(x) = 0 (i = 1, . . . , k); k < nconstraints of equality type

gj(x) ≤ 0 (j = k + 1, . . . , k + l);constraints of inequality type

Decision set: set of alternatives

X =

{x ∈ Rn :

gi(x) = 0, i = 1, . . . , k,

gj(x) ≤ 0 j = k + 1, . . . , k + l.

}

Single decision function: f(x) = max ha, x ∈ X Since f(x) = min ⇔ −f(x) =max, if, x ∈ X, it is enough to seek max.

Solution: linear or integer programing, finding constrained extremum.

Example for linear programing

(two variables, graphical solution):(ELOAD1.LPP)

x1, x2 ≥ 0,

x1 + 2x2 ≥ 6x2 − x1 ≤ 3x1 + x2 ≤ 10

2x1 − 3x2 = z → max or min

17

Solution: The set of points satisfying the system of inequalities is polygon whichis colored in our figure. The straight lines 2x1 − 3x2 = z where z = a constant areparallel lines for different values of z, in our figure the lines for z = 20, 6, −12.5 aredrawn. z is maximal if the line passes through the point (10.0) and minimal if itgoes through the point (3.5, 6.5), zmax = 20, zmin = −12.5.

18

6. The simplex method

In case of several (more than two) variables we can use the simplex methodtosolve LP (linear programing) problems.

Consider the following LP problem:

z = 5x1 + 4x2 + 3x3 = maximum, subject to2x1 + 3x2 + x3 ≤ 54x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8x1, x2, x3 ≥ 0

Introduce the slack variables s1, s2, s3 (as the difference between the right and lefthand sides of the inequalities. In this way we get the following problem which isequivalent with the original problem:

z = 5x1 + 4x2 + 3x3 = maximum, subject tos1 = 5− 2x1 − 3x2 − x3s2 = 11− 4x1 − x2 − 2x3s3 = 8− 3x1 − 4x2 − 2x3

x1, x2, x3, s1, s2, s3 ≥ 0

s1, s2, s3 are called basic variables, while x1, x2, x3 are called nonbasic variables.

Let us start with the solution x1 = x2 = x3 = 0, then s1 = 5, s2 = 11, s3 = 8 andthe value of the decision function is z = 0.Try to find a better solution. Since inthe decision function the coefficient of x1 is positive, thus increasing x1 the valueof z will increase too. Unfortunately we cannot increase x1 to much, as the slackvariables must remain nonnegative.

If x1 ≥ 0, x2 = x3 = 0 then all inequalities

s1 = 5− 2x1 ≥ 0 x1 ≤ 52 = 2.5

s2 = 11− 4x1 ≥ 0 x1 ≤ 114 = 2.75

s3 = 8− 3x1 ≥ 0 x1 ≤ 83 = 2.66.

have to be satisfied, therefore 0 ≤ x1 ≤ 2.5 or x1 can increase to at most 2.5.

Let therefore

x1 =5

2, x2 = x3 = 0 then s1 = 0, s2 = 1, s3 =

1

2

the value of z increased to 5 · 52 = 12.5.

19

How should we continue? Since now s1 = x2 = x3 = 0 the role of x1 is takenover by s1, the decision function and the inequality conditions should be rewrittencorresponding to these.

From the definition of s1 we get that

x1 = 2.5− 0.5s1 − 1.5x2 − 0.5x3,

substituting this into the decision function and into s2, s3 we get that

z = 5 (2.5− 0.5s1 − 1.5x2 − 0.5x3) + 4x2 + 3x3= 12.5− 2.5s1 − 3.5x2 + 0.5x3

s2 = 11− 4 (2.5− 0.5s1 − 1.5x2 − 0.5x3)− x2 − 2x3= 1 + 2s1 + 5x2

s3 = 8− 3 (2.5− 0.5s1 − 1.5x2 − 0.5x3)− 4x2 − 2x3= 0.5 + 1.5s1 + 0.5x2 − 0.5x3

Our problem with the new variables is:

z = 12.5− 2.5s1 − 3.5x2 + 0.5x3 = maximum, subject tox1 = 2.5− 0.5s1 − 1.5x2 − 0.5x3s2 = 1 + 2s1 + 5x2s3 = 0.5 + 1.5s1 + 0.5x2 − 0.5x3

s1, x2, x3, x1, s2, s3 ≥ 0

We can read from this that for s1 = x2 = x3 = 0 we get x1 = 2.5, s2 = 1, s3 = 0.5and z = 12.5.

In the decision function only the coefficient of x3 is positive, increasing x3 willincrease the value of z. How much can we increase x3? Since x3 ≥ 0, s1 = x2 = 0from the inequalities x1, s2, s3 ≥ 0 we get that

x1 = 2.5− 0.5x3 ≥ 0 x3 ≤ 5s2 = 1 ≥ 0 this is satisfied for all x3s3 = 0.5− 0.5x3 ≥ 0 x3 ≤ 1

therefore x3 = 1 s3 = 0 and s1 = x2 = 0, the decision function increases by0.5 · 1 = 0.5 to 13. The new nonbasic variables are s1, x2, s3, the role of x3 is takenover by s3. From the equation s3 = 0.5 + 1.5s1 + 0.5x2 − 0.5x3 we get that

x3 = 1 + 3s1 + x2 − 2s3,

20

substituting this into z, x1, s2 (please check yourself) we get our problem with thenew variables:

z = 13− s1 − 3x2 − s3 = maximum, subject tox1 = 2− 2s1 − 2x2 + s3s2 = 1 + 2s1 + 5x2s3 = 1 + 3s1 + x2 − 2s3

s1, x2, s3, x1, s2, x3 ≥ 0

Now there is no positive coefficient in z, we cannot increase z anymore. We haves1, x2, s3 ≥ 0 therefore z = 13 − s1 − 3x2 − s3 ≤ 13, but with s1 = x2 = s3 = 0(while x1, s2, x3 can be calculated from the previous formulae) we get z = 13 thusthe maximal value of is z = 13.

The simplex tableau of the preceding problem (after the introduction of theslack variables s1, s2, s2)

2x1 + 3x2 + x3 + s1 = 54x1 + x2 + 2x3 + s2 = 11

3x1 + 4x2 + 2x3 + s3 = 8−5x1 − 4x2 − 3x3 + z = 0

(where x1, x2, x3, s1, s2, s3 ≥ 0 and we look for the maximum of z) consist of thecoefficient matrix:

x1 x2 x3 s1 s2 s3s1 2 3 1 1 0 0 5s2 4 1 2 0 1 0 11s3 3 4 2 0 0 1 8z −5 −4 −3 0 0 0 0

The notation of rows and columns and the decision function and the numbers onthe right hand sides are separated by one-one line segments.1st step. First we find the pivot element, the entering and leav-

ing(dropping) variables. We choose the ”most negative” element (that is thenegative element of largest absolute value) in the last line this is −5 in our example.If there are more such element then we can choose any of them. The column ofthe chosen element will be the pivot column. Then we divide each element of thelast column by the corresponding element of the pivot column (we divide only by

21

positive elements), the rations will be written after the last column:

x1 x2 x3 s1 s2 s3 h.

s1 2 3 1 1 0 0 5 52 = 2.5 pivot row

s2 4 1 2 0 1 0 11 114 = 2.75

s3 3 4 2 0 0 1 8 83 = 2.66

z −5 −4 −3 0 0 0 0

We find the smallest ration (it there are more smallest ratio the we choose any ofthem) the row of this element will be the pivot row. In our example the smallestration is 2.5 in the first row, thus the pivot row is the first one. The pivot elementis the element in the pivot row and the pivot column, in our example the element 2.The entering variable is the variable corresponding to the pivot column (in our casex1), the leaving variable is the one corresponding to the pivot row (in our case s1).

2nd step. Next comes the pivoting. First we divide the elements of the pivotrow by the pivot element:

x1 x2 x3 s1 s2 s3 h.

s1 1 1.5 0.5 0.5 0 0 2.5 52 = 2.5 pivot row

s2 4 1 2 0 1 0 11 114 = 2.75

s3 3 4 2 0 0 1 8 83 = 2.66

z −5 −4 −3 0 0 0 0

then subtracting suitable multiples of this row from the other rows we make allelements of the pivot column (except the pivot element) zero. In our example fourtimes the first row is deducted from the second row, three times the first row isdeducted from the third row, finally fifth times the first row should be added to thelast row.

22

The name of the leaving variable is replaced by the name of the entering variable.The table obtained in this way is

x1 x2 x3 s1 s2 s3

x1 1 1.5 0.5 0.5 0 0 2.5

s2 0 −5 0 −2 1 0 1

s3 0 −0.5 0.5 −1.5 0 1 0.5

z 0 3.5 −0.5 2.5 0 0 12.5

Next we repeat steps 1 and 2 until all elements of the last row becomenonnegative or zero. Then the optimal solution can be read from thecolumn on the right hand side.

In our table the column of -0.5 will be the pivot column, the pivot row will be givenagain the row of smallest ratio of the corresponding elements of the last column andthe pivot column (we divide only by positive elements). In our case the pivot raw isthe third one. The entering variable in the one corresponding to the pivot column(in our case x3), the leaving variable is he one corresponding to the pivot row (inour case s3)

x1 x2 x3 s1 s2 s3 h.

x1 1 15 0.5 0.5 0 0 2.5 2.50.5 = 5

s2 0 −5 0 −2 1 0 1 −

s3 0 −0.5 0.5 −1.5 0 1 0.5 0.50.5 = 1 pivot row

z 0 3.5 −0.5 2.5 0 0 12.5

We divide the third row by 0.5 and deduct from the last row, and also deduct itsmultiple by 0.5 from the first row. The table obtained (omitting the ratios of the

23

last column) is

x1 x2 x3 s1 s2 s3

x1 1 2 0 2 0 −1 2

s2 0 −5 0 −2 1 0 1

x3 0 −1 1 −3 0 2 1

z 0 3 0 1 0 1 13

Since in the last column there are no negative elements, the solution process ended.The maximal value of z is 13, and the optimal values of the variables in the left sidecolumn can be read from the z column, thus in our case x1 = 2, s2 = 1, x3 = 1 theoptimal values of the other variables is zero, i.e. x2 = s1 = s3 = 0.

Remarks. The method above is the so called primal simplex method whichcan be applied to the solution of standard normal maximum problems. Suchproblems have the form

c1x1 + c2x2 + · · ·+ cnxn = z → max subject to the conditions

a11x1 + a12x2 + · · ·+ a1nxn ≤ b1,

a21x1 + a22x2 + · · ·+ a2nxn ≤ b2,

...

ak1x1 + ak2x2 + · · ·+ aknxn ≤ bk,

x1 ≥ 0, x2 ≥ 0, . . . , xn ≥ 0,

where, x = (x1, . . . , xn)> ∈ Rn×1 is the unknown n dimensional (column) vec-tor/matrix 0 = (0, . . . , 0)> ∈ Rn×1, is the n dimensional zero vector, A = (aij) ∈Rk×n is a given k× n type matrix, b = (b1, . . . , bk)

> ∈ Rk×1 is a given k dimensional(column) vector/matrix with nonnegative entries c = (c1, . . . , cn)> ∈ Rn×1 is agiven n dimensional row vector with nonnegative entries (we may assume thatthere is at least one positive cj).

24

Next we show the solution of the previous LP problem

z = 5x1 + 4x2 + 3x3 = maximum, subject to2x1 + 3x2 + x3 ≤ 54x1 + x2 + 2x3 ≤ 11

3x1 + 4x2 + 2x3 ≤ 8x1, x2, x3 ≥ 0

by help of the WinQSB software. The problem data (in matrix form) and the tableof solution are:

(five variables, solution with WinQSB ):(ELOAD1B.LPP)

25

x1, x2, x3, x4, x5 ≥ 0,

x1 + 2x3 − 2x4 + 3x5 ≤ 60x1 + 3x2 + x3 + x5 ≤ 12

x2 + x3 + x4 ≤ 102x1 + 2x3 ≤ 20

3x1 + 4x2 + 5x3 + 3x4 − 2x5 = z → max vagy min

Data entry in matrix form into WinQSB:

The table of solution:

26

In this table the reduced cost enters with decision variables with zero optimalvalue. It shows how the value of the decision function changes if we require positivevalue for the variable. For example at x3 = 0 the reduces cost is −1, which meansthat requiring x3 ≥ a3(> 0) (instead of x3 ≥ 0) results in increasing the optimalvalue of the decision function (approximately) by (−1) · a3.The shadow price appearing at a constraint shows how the change of the constanton the right hand side of the constraint influences the optimal value of the decisionfunction. For example at the constraint C3 the shadow price is 3, which means thatincreasing the right hand side of C3 by b3 (in our case to 10 + b3) the optimal valueof the decision function will (approximately) increase by 3 · b3.

The upper 1-5 rows of the last two column show that between which bounds maythe coefficient of the variable in the decision function change in order that the LPproblem still has optimal solution.

The last 4 rows of last two column show that between which bound may the righthand sides of the constraints change in order that the LP problem still has optimalsolution.

Further remarks:

LP problems may have several solution. As an example consider the problem(ELOAD2.LPP)

x1, x2, x3, x4 ≥ 0

x1 − x2 + x3 ≤ 8x2 + x3 − x4 ≤ 11

x1 + 2x2 − x3 + x4 ≤ 10

z = 6x1 + 2x2 + 5x3 + 7x4 → max .

This has two basis solutions (0, 0, 8, 18) and (0, 7, 15, 11) and obviously their convexcombinations, i.e. λ(0, 0, 8, 18) + (1 − λ)(0, 7, 15, 11) with arbitrary λ ∈ [0, 1] aresolutions as well.

27

It may happen that the LP problem has no solution, an example for this is theLP problem (ELOAD3.LPP)

x1, x2 ≥ 0

x1 + x2 ≤ 120x1 ≤ 90

12x1 + 12x2 ≥ 1680

z = 14x1 + 6x2 → max .