Liear Programmig ad the Simplex ethod Abstract This article is a itroductio to Liear Programmig ad usig Simplex method for solvig LP problems i primal form. What is Liear Programmig? Liear Programmig is the method of fidig a optimal solutio for a liear fuctio F of variables, whe the variables are uder some liear costraits. Here we itroduce two famous problems i the field of liear programmig: Productio Problem The productio problem ivolves determiig the rate of productio for products, so that the profit resultig from the products is maximum. Each product uses some resources, which are fiite ad provide the costraits. Here is a formal statemet of the productio problem: Products P,, P are produced from resources R,, R m. b i is the amout of resource R i available to the maufacturer. a ij is the umber of uits of R i eeded for oe uit of P j. The profit from producig oe uit of P i is kow to be c i. So the problem is to maximize f(x,, x )= uder the coditios cjxj (x j represetig the amout of P j produced) aijxj bi for all j, j m (ad every x j o-egative).
Diet Problem The diet problem is determiig the least costly amout of food to be cosumed, i order to satisfy a miimum daily requiremet of some utriets(give the amout of utriets for each uit of food ad the cost of each food uit). Primal Form I order to fid a simple algorithm for solvig LP problems, we eed a stadard form for the problem to work with. This is called the primal form ad it ca be show that every LP problem ca be trasformed to a correspodig problem i the primal form. Although we might wat to fid a miimum for the fuctio F, problems i primal form cocer fidig a maximum for F(which is called the objective fuctio). iimizig F ( ) is clearly equal to maximizig F ( ). The costraits i LP problems i primal form are oly i the form of Costraits usig or = ca be trasformed to this form. aijxj bi. All variables are o-egative i the primal form.( Although this is usually the case i LP problems, whe we eed egative variables we ca replace them with x -x, where x ad x are o-egative. Feasible Solutios Ay (x,, x ) satisfyig the costraits of the LP problem is said to be a feasible solutio for that problem. If at this solutio the objective fuctio reaches it s required maximum or miimum, the solutio is said to be optimal feasible solutio (OFS). The Solutio of a LP Problem I order to solve a LP problem, we must first fid out whether at least oe feasible solutio exist or ot. If it exists, we must either fid the OFS or show that it does ot exist (this happes whe the objective fuctio is ot bouded i the required directio).
Example of a LP problem aximize f(x, x 2 )= -2x +5x 2 if x + x 2 5, 2x 2 4, First we see that (0,0) is a feasible solutio. For all x, x 2, f (x, x 2 )= -2x +5x 2 5x 2. 0.(sice x, x 2 are o-egative). So 0 is the upper boud of the objective fuctio, ad sice f (0,2)=0, (0,2) is the OFS. Simplex ethod The Simplex algorithm for solvig LP problems was discovered i 947 by George B. Datzig. Nearly all practical LP problems are solved by a variatio of the Simplex method. We itroduce here some otios that are useful i implemetig Simplex method. Codesed Tableau The codesed tableau is a represetatio of a system of liear equatios which is i reduced-row echelo form. It is based o the cotrast betwee pivot variables ad o pivot variables. The codesed tableau below represets the system of liear equatios: p x j+ a qxkq = q= p x jm+ q= a mqxkq = m k k 2 k p a a 2 a p a 2 a 22 a 2p a m a m2 a mp b b 2 b m j j 2
j m What we have doe, basically, is to elimiate the coefficiets for the pivots,(sice they are ). The umbers j j m are the idices for pivot variables ad k k p the idices for free variable. Now we explai how to chage the role of a pivot ad free variable. Suppose we wat to chage the place of variables k q ad j i (the first a free variable ad the secod a pivot). All the elemets of the tableau should chage i this maer: k q j r. a rq /a rs /a rs. a iq - a is a rq/ a rs - a iq/ a rs b r /a rs b - a is b r / a rs k s j We ca easily see that this is a ormal row operatio, ad thus prove the method easily. Simplex Tableau Here we itroduce some chages i the primal form of LP problems that makes it fir for usig Simplex method. First we itroduce slack variables. Slack variables are itroduced to chage all the iequalities to equatios. It is based o the observatio that a b meas there is some oegative c for which a+c=b. So each costrait x + i + aijxj = j = aijxj bi ca be chaged to bi. Now the oly restrictio o the primal form to make it fit for Simplex method is that all b i are o-egative.
So we itroduce slack variables for each equatio (which is clearly pivot), ad form the followig form, which has a row added for the objective fuctio ad is called the Simplex tableau.(the idices remai the same, except for the objective row). a a 2 a p a 2 a 22 a 2p a m a m2 a mp b b 2 b p -c -c 2... -c 0 Sice all b i are o-egative, we see that (0,,0) is a feasible solutio (ad the item at the last colum, last row, which is called the corer umber gives the F(0,,0). Now it ca be show that. The pivotig process explaied above remais uchaged o the objective row 2. If we select appropriate etries i the tableau, by doig the pivotig operatio, we get a corer umber greater (or equal) to the curret oe. I other words, we get closer to the maximum. The basic solutio of a tableau is the solutio obtaied from assigig 0 to all o-basic variables( whose idex is give at the top of the tableau). The rule is to to choose a egative etry i the objective row. For every positive a ij above it, calculate a ij /b i.(this is called the _-ratio). Choose the etry with the least _-ratio (if there is a tie, choose oe of them). Pivot that etry (The purpose of the _-ratio is to keep the b i for all i o-egative, so that we ca use the method i the ext iteratio). We ca prove that the corer umber is greater or equal to the previous oe. The oly case whe it is equal is whe we have a b i =0. This leads to a basic variable beig 0 i the basic solutio, which is called degeerate case. Now we ca explai the Simplex algorithm.. See whether a egative etry exists i the objective row. If ot, the basic solutio is the OFS (the corer umber beig the maximum). 2. If every egative etry i the objective row has at least oe positive umber i it s colum, the objective fuctio is ubouded above. 3. Choose a egative etry i the objective row, choose a positive etry i it s colum which has the least _-ratio. Pivot the tableau at this etry. Go to.
It is clear that the Simplex algorithm allows a degree of freedom i choosig the etry to be pivoted, ad this leads to differet method for implemetig it. I some cases, we might be stuck with a Simplex algorithm that returs to the same tableau agai ad agai( ad thus, ever stops). The followig selectio method guaratees that we do t have to face this problem. Always choose the elemet with the smallest subscript, whe two or more choices exist. We must use this both for choosig etries i the objective row ad the positive iteger above it. Its called Blad s Termiatio Theorem. Simplex ethod i Practice 2 2 3 4-2 0 4 5-3 -2 0 3-2 4 0 4 5-3 -2 0 3 2 3 5-4 4 3 7 2 So the aswer is (4,0).