Download presentation

Presentation is loading. Please wait.

Published byStone Skerrett Modified over 2 years ago

1
Degeneracy and the Convergence of the Simplex Algorithm LI Xiao-lei

2
Preview The relationship (for a max problem) between the z-values for the current bfs and the new bfs: z-value for new bfs= z-value of current bfs – (value of entering variable in new bfs) (coefficient of entering variable in row 0 of current bfs)(15)

3
Preview (coefficient of entering variable in row 0)<0 and (value of entering variable in new bfs)≥0 We can deduce the following facts: if (value of entering variable in new bfs)>0, then (z-value for new bfs)>(z-value for current bfs) If (value of entering variable in new bfs)=0, then (z-value for new bfs)=(z-value for current bfs)

4
Preview In each of the LP’s basic feasible solutions, all the basic variables are positive(>0). An LP with this property is a nondegenerate LP. When the simplex is used to solve a nondegenerate LP, it is impossible to encounter the same bfs twice. We are guaranteed to find the optimal solution in a finite number of iterations.

5
Preview The simplex may fail for a degenerate LP. DEFINITION An LP is degenerate if it has at least one bfs in which a basic variable ia equal to zero.

6
example The following LP is degenerate: max z=5x 1 +2x 2 s.t. x 1 +x 2 ≤6 x 1 -x 2 ≤0(16) x 1,x 2 ≥0 Adding slack variables s 1 and s 2 to the two constraints.

7
example A degenerate LP zx1x1 x2x2 s1s1 s2s2 rhs Basic variable ratio 1-5-2000Z=0 011106S 1 =66 0 ① 010S 2 =00* The basic variable s2=0, thus, (16) is a degenerate LP. Note: any bfs that has at least one basic variable equal to zero( or equivalently, at least one constraint with a zero right-hand side) is a degenerate bfs.

8
example Since -5<-2, we enter x1 into the basis. The winning ratio is 0 in row 2. zx1x1 x2x2 s1s1 s2s2 rhs Basic variable ratio 10-7050Z=0 00 ② 16S 1 =66/2=3* 01010x 1 =0none Our new bfs has the same z-value as the old bfs. In the new bfs, all variables have exactly the same values as they had before the pivot! Thus, our new bfs is also degenerate.

9
example Continuing with the simplex, we enter x 2 in row 1. zx1x1 x2x2 s1s1 s2s2 rhs Basic variable 1003.51.521Z=21 0010.5-0.53x 2 =3 0100.5 3x 1 =3 This is an optimal tableau, so the optimal solution to (16) is z=21, x 2 =3,x 1 =3,s 1 =s 2 =0.

10
In solving a degenerate LP, we arit is possible for a pivot to leave the value of z unchanged. A sequence of pivots like the following may occur: initial bfs(bfs 1):z=20 after first pivot(bfs 2):z=20 after second pivot(bfs 3):z=20 after third pivot(bfs 4):z=20 after fourth pivot(bfs 1):z=20 In this situation, we encounter the same bfs twice. This occurrence is called cycling.

11
If cycling occurs, we will loop forever among a set of basic feasible solutions and never get to the optimal solution. The simplex algorithm can be modified to ensure that cycling will never occur. In practice, cycling is an extremely rare occurrence. If an LP has many degenerate basic feasible solutions (or a bfs with many basic variables equal to zero), the simplex algorithm is often very inefficient.

12
The big M method The simplex algorithm requires a starting bfs. We found a starting bfs by using the slack variables as our basic variables. If an LP has any ≥ or equality constraints, a starting bfs may not be readily apparent. The big M method (or the two-phase simplex method) may be used.

13
Example 4 Bevco manufactures an orange-flavored soft drink called Oranj by combining orange soda and orange juice. Each ounce of orange soda contains 0.5 oz of sugar and 1 mg of vitamin C. each ounce of orange juice contains 0.25 oz of sugar and 3 mg of vitamin C. It costs Bevco 2¢ to produce an ounce of orange soda and 3¢ to produce an ounce of orange juice.

14
Example 4 Bevco’s marketing department has decided that each 10-oz bottle of Oanj must contain at least 20 mg of vitamin C and at most 4 oz of sugar. Use LP to determine how Bevco can meet the marketing department’s requirements at minimum cost.

15
Example 4 Solution Let x 1 =number of ounces of orange soda in a bottle of Oranj x 2 =number of ounces of orange juice in a bottle of Oranj Then the appropriate LP is min z=2x 1 +3x 2 s.t. 1/2x 1 +1/4x 2 ≤4 (sugar constraint) x 1 + 3x 2 ≥20 (vitamin C constraint) (17) x 1 + x 2 =10 (10 oz in bottle of Oranj) x 1,x 2 ≥0

16
Example 4 Put (17) into standard form z -2x 1 -3x 2 =0 1/2 x 1 +1/4x 2 +s 1 =4 x 1 + 3x 2 -e 2 =20 x 1 + x 2 =10 All variables nonnegative

17
Example 4 Search for a bfs In row 1, s 1 =4 could be used as a basic variable In row 2, e 2 =-20 violates the sign restriction. In row 3, there is no readily apparent basic variable.

18
Artificial variables To remedy this problem, we simply “invent” a basic feasible variable for each constraint that needs one. These variables are created by us and are not real variables, we call them artificial variables. If an artificial variable is added to row i, we lable it a i.

19
Example 4 In th current problem, we need to add an artificial variable a2 to row 2 and an artificial variable a3 to row 3. z -2x 1 -3x 2 =0 1/2 x 1 +1/4x 2 +s 1 =4 x 1 + 3x 2 -e 2 +a 2 =20 (18) x 1 + x 2 +a 3 =10 We now have a bfs: z=0,s 1 =4,a 2 =20,a 3 =10

20
There is no guarantee that the optimal solution to (18) will be the same as the optimal solution to (17). In a min problem, we can ensure that all the artificial variables will be zero by adding a term Ma i to the objective function for each artificial variable a i. (in a max problem, add a term –Ma i to the objective function.) Here M represents a “very large” positive number.

21
Example 4 In (18), we could change our objective function to min z=2x 1 +3x 2 +Ma 2 +Ma 3 The row 0 will change to z-2x 1 -3x 2 -Ma 2 -Ma 3 =0 With this modified objective function, it seems reasonable that the optimal solution to (18) will have a 2 =a 3 =0. in this case, the optimal solution to (18) will solve the original problem (17). Some of the artificial variables may assume positive values in the optimal solution. If this occurs, the original problem has no feasible solution.

22
Description of big M method Step 1 Modify the constraints so that the right-hand side of each constraint is nonnegative. Each constraint with a negative right-hand side be multiplied through by -1. if you multiply an inequality by any negative number, the direction of the inequality is reversed. For example, x 1 +x 2 ≥-1 into –x 1 -x 2 ≤1 x 1 -x 2 ≤-2 into -x 1 +x 2 ≥2

23
Description of big M method Step 1’ Identify each constraint that is now an = or ≥ constraint. Prepare for step 3 – which constraint will the artificial variable to be added. Step 2 Convert each inequality constraint to standard form. For ≤ constraint i, we add a slack variable s i ; For ≥ constraint i, we add an excess variable e i ;

24
Description of big M method Step 3 If constraint i is a ≥ or = constraint, add an artificial variable a i, also add the sign restriction a i ≥0. Step 4 Let M denote a vary large positive number. If the LP is a min problem, add (for each artificial variable) Ma i to the objective function. If the LP is a max problem, add (for each artificial variable) - Ma i to the objective function.

25
Description of big M method Step 5 Since each artificial variable will be in the starting basis, all artificial variables must be eliminated from row 0 before beginning the simplex. This ensures that we begin with a canonical form. In choosing the entering variable, remember that M is a very large positive number.

26
Description of big M method For example, 4M-2 is more positive than 3M+900, and -6M-5 is more negative than - 5M-40. Now solve the transformed problem by the simplex. If all artificial variables are equal to zero in the optimal solution, we have found the optimal solution to the original problem. If any artificial variables are positive in the optimal solution, the original problem is infeasible.

27
Example 4 (continued) Solution Step 1 Since none of the constraints has a negative right-hand side, we don’t have to multiply any constraint through by -1. Step 1’ Constraints 2 and 3 will require artificial variables.

28
Example 4 (continued) Step 2 Add a slack variable s1 to row 1 and subtract an excess variable e2 from row 2. min z= 2x 1 + 3x 2 row 1: 1/2x 1 +1/4x 2 +s 1 =4 row 2: x 1 + 3x 2 -e 2 =20 row 3: x 1 + x 2 =10

29
Example 4 (continued) Step 3 Add an artificial variable a2 to row 2 and an artificial variable a3 to row 3. min z= 2x 1 + 3x 2 row 1: 1/2x 1 +1/4x 2 +s 1 =4 row 2: x 1 + 3x 2 -e 2 +a 2 =20 row 3: x 1 + x 2 +a 3 =10 From this tableau, the initial bfs will be s 1 =4,a 2 =20 and a 3 =10.

30
Example 4 (continued) Step 4 For the min problem, we add Ma 2 +Ma 3 to the objective function. The objective function is now min z=2x 1 +3x 2 +Ma 2 +Ma 3

31
Example 4 (continued) Step 5 Row 0 is now z-2x 1 -3x 2 -Ma 2 -Ma 3 =0 To eliminate a 2 and a 3 from row 0, simply replace row 0 by row 0+M(row 2)+M(row 3). This yields Row 0: z- 2x 1 -3x 2 -Ma 2 -Ma 3 =0 M(row 2): mx 1 +3Mx 2 -Me 2 +Ma 2 =20M M(row 3): Mx 1 +Mx 2 +Ma 3 =10M New row 0: z+(2M-2)x 1 +(4M-3)x 2 -Me 2 =30M

32
Example 4 (continued) zx1x1 x2x2 s1s1 e2e2 a2a2 a3a3 rhs Basic variable ratio 12M-24M-30-M0030Mz=30M 0½¼10004s 1 =416 01 ③ 01020a 2 =2020/3* 011000110a 3 =1010 Initial tableau for Bevco Since we are solving a min problem, the variable with the most positive coefficient in row 0 should enter the basis. Since 4M-3>2M-2, variable x 2 should enter the basis. The ratio test indicates that x 2 should enter the basis in row 2.

33
Example 4 (continued) Replace row 2 by 1/3(row 2). The new row 2 is 1/3x 1 +x 2 -1/3e 2 +1/3a 2 =20/3 Eliminate x 2 from row 0 by adding –(4M- 3)(new row 2) to row 0. the new row 0 is z+(2M-3)/3x 1 +(M-3)/3e 2 +(3-4M)/3a 2 =(60+10M)/3 Using ero’s to eliminate x 2 from row 1 and 3.

34
Example 4 (continued) zx1x1 x2x2 s1s1 e2e2 a2a2 a3a3 rhs Basic variable ratio 1(2M- 3)/3 00(M- 3)/3 (3- 4M)/3 0(60+1 0M)/3 z=(60+10 M)/3 05/12011/12-1/1207/3s 1 =7/328/5 01/310-1/31/3020/3x 2 =20/320 02/3001/3-1/3110/3a 3 =10/35* First tableau for Bevco The ratio test indicates that x 1 should enter the basis in the third row of the current tableau.

35
Example 4 (continued) Replace row 3 by 3/2(row 3). The new row 3 is x 1 +1/2e 2 -1/2a 2 +3/2a 3 =5 Eliminate x 1 from row 0 by adding (3- 2M)/3 (new row 3) to row 0. the new row 0 is z-1/2e 2 +(1-2M)/2a 2 +(3-2M)/2a 3 =25 Using ero’s to eliminate x 1 from row 1 and 2.

36
Example 4 (continued) Since all variables in row 0 have nonpositive coefficients, this is an optimal tableau. Since all artificial variables are equal to zero, we have found the optimal solution to the Bevco problem. The optimal solution to the Bevco problem: z=25,x 1 =x 2 =5, s 1 =1/4,e 2 =0. zx1x1 x2x2 s1s1 e2e2 a2a2 a3a3 rhs Basic variable 1000-1/2(1- 2M)/2 (3- 2M)/2 25z=25 0001-1/81/8-5/8¼s 1 =1/4 0010-1/2½ 5x 2 =5 01001/2-1/23/25x 1 =5 Optimal tableau for Bevco

37
Example 4 (continued) Note The a 2 column could have been dropped after a 2 left the basis (at the conclusion of the first pivot), and the a 3 column could have been dropped after a 3 left the basis( at the conclusion of the second pivot).

38
summary If any artificial variable is positive in the optimal Big M tableau, the original LP has no feasible solution. When the Big M method is used, it is difficult to determine how large M should be. Generally, M is chosen to be at least 100 times larger than the largest coefficient in the original objective function.

Similar presentations

OK

MIT and James Orlin © 2003 1 Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.

MIT and James Orlin © 2003 1 Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on famous places in india Ppt on structure of chromosomes in eukaryotes Ppt on model view controller python Ppt on economic order quantity equation Persistence of vision display ppt online Ppt on national education policy 1986 super Ppt on sound navigation and ranging system sensor Ppt on nestle india ltd company Pharynx anatomy and physiology ppt on cells Ppt on chapter 3 atoms and molecules ppt