Linear Programming Algorithms and applications Linear Programming Algorithms and applications S. VAJDA Visiting Professor University of Sussex LONDON NEW YORK CHAPMAN AND HALL First published in 1981 by Chapman and Hall Ltd 11 New Fetter Lane, London EC4P 4EE Published in the USA by Chapman and Hall in association with Methuen, Inc., 733 Third Avenue, New York NY 10017 © 1981 S. Vajda Softcover reprint of the hardcover 1s t edition 1981 Typeset by Style set Limited, Salisbury, Wiltshire ISBN-13: 978-0-412-16430-9 e-ISBN-13: 978-94-011-6924-0 DO I: 10.1 007/978-94-011-6924-0 This paperback edition is sold subject to the condition that it shall not, by way of trade or otherwise, be lent, re-sold, hired out, or otherwise circulated without the publisher's prior consent in any form of binding or cover other than that in which it is published and without a similar condition including this condition being imposed on the subsequent purchaser. All rights reserved. No part of this book may be reprinted, or reproduced or utilized in any form or by any electronic, mechanical or other means, now known or hereafter invented, including photo copying and recording, or in any information storage and retrieval system, without permission in writing from the Publisher. British Library Cataloguing in Publication Data Vajda, Steven Linear programming. - (Science paperbacks; 167). 1. Linear programming I. Title II. Series 519.7'2 T57.74 80-41232 Contents Preface vii 1. Linear Programming 2. Algorithms 16 3. Duality 50 4. Theory of Games 65 5. Transportation and Flow in Networks 78 6. Integer Programming 116 7. Linear Programming under Uncertainty 135 Answers to Problems 140 References 148 Index 149 Preface This text is based on a course of about 16 hours lectures to students of mathematics, statistics, and/or operational research. It is intended to introduce readers to the very wide range of applicability of linear programming, covering problems of manage ment, administration, transportation and a number of other uses which are mentioned in their context. The emphasis is on numerical algorithms, which are illustrated by examples of such modest size that the solutions can be obtained using pen and paper. It is clear that these methods, if applied to larger problems, can also be carried out on automatic (electronic) computers. Commercially available computer packages are, in fact, mainly based on algorithms explained in this book. The author is convinced that the user of these algorithms ought to be knowledgeable about the underlying theory. Therefore this volume is not merely addressed to the practitioner, but also to the mathematician who is interested in relatively new developments in algebraic theory and in some combinatorial theory as well. The chapters on duality, and on flow in networks, are particularly directed towards this aim and they contain theorems which might not be directly relevant to methods of computation. The application of the concept of duality to the theory of games is of historical interest. It is hoped that the figures, which illustrate the results, will be found illuminating by readers with active geometrical imagination. The references record the sources which contributed to the foundation and to the development of the subject. However, the contents of this book are meant to be self-contained. A further development of linear programming is the field of non linear or more generally of mathematical programming, but this is beyond the scope of the present exposition. The mathematics used are elementary. Of algebraic concepts we use those of vectors and matrices and of their multiplication. In one place we refer to the solution of linear homogeneous equations, dependent on their rank. CHAPTER 1 Linear programming To introduce our topic, we start with two examples. Example 1.1 A manufacturer produces two types of cloth, TI and T2. For a unit length of TI he needs 4 units of some raw material Rt. 5 units of raw material R2, and 1 unit of raw material R3• For a unit length of T2 the requirements are, in the same order, 1,3 and 2 units, respect ively. The amounts of R I, R 2 and R 3 which are available are, respect ively, 56, 105, and 56. The manufacturer estimates that from the sale of one unit of TI he can make a profit of 4 (in some monetary unit), and that from the sale of one unit of T2 his profit will be 5. He wants to know how much of Tl and of T2 he should produce from the available raw material, so as to maximize his total profit. We assume that he can sell all he produces. We shall now formulate this problem algebraically. Denote the amount of T I produced by x I, and that of T2 by X2. He then needs 4x I + X2 of raw material R I, and this must not exceed 56. Thus 4xI +X2 ~ 56 Similarly, regarding R 2 and R 3 5xI + 3X2 ~ 105 and xI+2x2~56 His profit will be 4xI + 5x2 = B (for 'benefit'), and he should choose XI and X2 so as to maximize this expression, not forgetting that neither XI nor X2 must be negative; explicitly XI ~0,X2 ~O. 2 LINEAR PROGRAMMING We consider now a second problem, which is called the 'nutrition problem' in the literature of our subject. Example 1.2 There are two types of food on the market, F land F 2. They contain three different nutritional ingredients, N 1 , N 2 and N 3. One unit of Fl contains, respectively, 3, 4 and 1 units of these, and one unit of F2 contains 1,3 and 2 units. A housewife has been told that she needs, for her family, 3 units of Nl, 6 of N2, and 2 of N3. She wants to obtain these ingredients by purchasing the available food items at the smallest total cost. One unit of Fl costs 20, and one unit of F2 costs 10 (in some monetary unit). The housewi(e's problem can be formulated as follows, if Yl is the amount of Fl andY2 that of F2 to be bought. Minimize 20Yl + lOY2 = C(for 'cost') subject to 3Yl + Y2 ~3 4Yl+3Y2~6 Yl+2Y2~2 Yl ~0,Y2 ~O We have written the conditions as inequalities, because it might be cheaper to obtain more of some ingredient than necessary if it is contained abundantly in some other food item which supplies other ingredients as well. The two examples which we have given are instances of linear programming problems. In such formulations it is required to optimize (maximize or minimize) a linear expression, the 'objective function', subject to linear inequalities, the 'constraints'. There is no fundamental algorithmic difference between maximiz ing and minimizing, because max [(x) equals -min [-[(x)]. In the maximizing problem the left hand side of a constraint was not larger than the right hand side (a constant), while in the minimiz ing problem the opposite. was true. Again, there is no fundamental LINEAR PROGRAMMING 3 algebraic difference between the two cases, because if [(x) ~ c, then -[(x) ~-c. An inequality a 1X l + ... + anXn :>;; c can be written as an equation alxl+···+anXn+Xn+l=C, with Xn+l~O. We call such an additional variable a 'slack' variable. In an inequality alXl + ... + anXn ~ C we would subtract a non-negative slack variable from the left hand side to convert it into an equivalent equation. Conversely, an equation a 1 x 1 + ... + anXn = C can be written as a pair of two simultaneous inequalities, thus and Another way of converting the given equation, in non-negative variables, into an inequality, consists in choosing one of the aj which is not zero, sayan, solving for Xn, namely and writing If a variable, say x, is not required to be non-negative, then in order to keep within the usual framework we replace it by two new variables which are required to be non-negative, thus x = x' - x". We now define the term linear programming. We mean by it maxi mizing or minimizing a linear function of non-negative variables, subject to linear constraints (equations or inequalities). In algebraic matrix notation we have a linear programming prob lem. Maximize b'x, subject to Ax:>;; c, where A is a matrix of m rows and n columns, c is an m-vector, and x as well as bare n-vectors. The co-ordinates of x are the variables to be determined, while A, b, and c are known. The vector x is also required to have non-negative co-ordinates (transposition of a vector or of a matrix will be denoted by a prime). If we introduce slack variables explicitly, then we have Ax + Imx = c, where 1m is the identity matrix of order m, and x is the 4 LINEAR PROGRAMMING m-vector of slack variables. The number of all variables is then n +m =N, say. In order to obtain a diagrammatic representation, we think of the components of x as ordinates of a point in a space of n dimensions. = In the examples above we had n 2, and we can therefore use dia grams in a plane. The diagram for Example 1.1 is Fig. 1.1. We have drawn = the Xl-axis X2 0 the x2"axis Xl =0 and the straight lines 4XI +X2 = 56 5XI + 3X2 =1 05 Xl + 2x2 =5 6 Introducing slack variables x3, X4, and Xs into the inequality con straints, the last three equations can be written X3 =0,X4 =O,xs =0 Every straight line of the diagram is thus described by one of 5 variables being zero. Xl = 0 \\ \\ \\ '~~'-"" ..... ",~~. .. X2 = 0 Figure 1.1
Description: