Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室. Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a.

Similar presentations


Presentation on theme: "The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室. Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a."— Presentation transcript:

1 The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室

2 Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a Tableau

3 Linear Programming Basic Feasible Solutions 大同大學資工所 智慧型多媒體研究室

4 The Goal of the Simplex Algorithm Any LP can be converted into the standard form

5 Convex Polytope defines a convex set F F may be 1.Bounded 2.Unbounded 3.Empty

6 The Basic Idea of Simplex Algorithm basic feasible solution at a corner Finding optimum by moving around the corner of the convex polytope in cost descent sense

7 The Basic Idea of Simplex Algorithm basic feasible solution at a corner Finding optimum by moving around the corner of the convex polytope in cost descent sense How to find an initial feasible solution? How to move from corner to corner?

8 Assumption 1 Assume that A is of rank m. There is a basis Independent has an inverse.

9 Basic Solution The basis solution corresponding to B is: The basis solution may be infeasible.

10 Example x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x7x7

11 x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x7x7 feasible

12 Example x1x1 x2x2 x3x3 x4x4 x5x5 x6x6 x7x7 infeasible

13 Basic Feasible Solution defines an nonempty convex set F If a basic solution is in F, it is called a basic feasible solution (bfs).

14 The Existence of BFS’s F may be 1.Bounded 2.Unbounded 3.Empty If F is nonempty, at least one bfs. defines an nonempty convex set F

15 The Existence of BFS’s F may be 1.Bounded 2.Unbounded 3.Empty If F is nonempty, at least one bfs. How to find it?

16 Assumptions 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. defines an nonempty convex set F

17 Assumptions 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. There exist bfs’s. defines an nonempty convex set F Ensure there is a bounded solution. Are all bfs’s the vertices of the convex polytope defined by F ?

18 The Simplex Alogrithm The Geometry of Linear Programs 大同大學資工所 智慧型多媒體研究室

19 Linear Subspaces of R d S  R d is a subspace of R d if it is closed under vector addition and scalar multiplication. S defined below is a subspace of R d. a set of homogenous linear equations

20 Dimensions

21 Affine subspaces A translated linear subspace. E.g., an affine subspace a set of nonhomogenous linear equations an affine subspace

22 Dimensions an affine subspace

23 Subsets of R d The following subsets are not subspace or affine subspace. A line segment The first quadrant A halfspace

24 Dimensions The following subsets are not subspace or affine subspace. A line segment The first quadrant A halfspace The dimension of any subset of R d is the smallest dimension of any affine subspace which contains it. Dim = 1 Dim = 2

25 The Feasible Spaces of LP 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. 1. A is of rank m. 2. F is nonempty. 3. c ’ x is bounded below for x  F. defines an nonempty convex set F

26 Hyperplane/Halfspace An affine subspace of R d of dimension d  1 is called a hyperplane. A hyperplane defines two closed halfspaces: Fact: Halfspaces are convex.

27 Convex Polytopes The intersection of a finite number of halfspaces, when it is bounded and nonempty is called a convex polytope, or simply a polytope. Fact: Halfspaces are convex.

28 x1x1 x2x2 x3x3 Example     (0, 0, 3) (1, 0, 3) (2, 0, 2) (2, 0, 0) (2, 2, 0)(0, 2, 0) (0, 1, 3) (0, 0, 0)    

29 More on Polytopes Geometric views of a polytope – The convex hull of a finite set of points. – The intersection of a finite number of halfspaces, when it is bounded and nonempty, i.e., defined by The algebraic view of a polytope The feasible space defined by LP (in standard form). Any relation?

30 LP  Polytopes Assume m columns n  m columns x1x1 x2x2 xnmxnm x n  m+1 xnxn A can always be in this form if rank(A)=m. LP

31 LP  Polytopes Assume m columns n  m columns x1x1 x2x2 xnmxnm x n  m+1 xnxn LP

32 LP  Polytopes 00 LP

33 Polytopes  LP m inequalities m equalities

34 Polytopes  LP m inequalities Slack variables

35 Polytopes  LP Slack variables

36 Polytopes and LP Slack variables H I H

37 Polytopes and LP The answer

38 Polytopes and LP The answer

39 Polytopes & F of LP defines a polytope defines a feasible set Are there any relations?

40 Polytopes & F of LP defines a polytope defines a feasible set Some points in P are vertices. Some points in F are bfs’s. Are there any relations?

41 Theorem 1 a convex polytope a feasible set of the corresponding LP is a vertex of P is a bfs.

42 Theorem 1 Pf) “”“” See textbook.

43 Theorem 1 Pf) “”“” Fact:is a vertex, then it cannot be the strict combination of points of P, i.e.,

44 Theorem 1 Pf) “”“” Fact:is a vertex, then it cannot be the strict combination of points of P, i.e.,

45 Theorem 1 Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. We want to show that vectors in B are linearly independent. Suppose not. Then, some d j  0. >0 if  is sufficiently small.

46 Theorem 1 Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. We want to show that vectors in B are linearly independent. Suppose not. Then, some d j  0. >0 if  is sufficiently small. Define  is sufficiently small.

47 Theorem 1 Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. A j are linearly independent. | B |  m.  Since rank(A) = m, we can always augment B to include m linearly independent vectors. Using B to form basic columns renders x a bfs.

48 Discussion Pf) “”“” Fact: Define B = {A j : x j > 0, 1  j  n} Let We want to show at most m nonzero x i ’s. A j are linearly independent. | B |  m.  Since rank(A) = m, we can always augment B to include m linearly independent vectors. Using B to form basic columns renders x a bfs. If | B | < m, there may be many ways to augment to m linearly independent vectors. Two different B and B ’ may corresponds to the same bfs. If | B | < m, there may be many ways to augment to m linearly independent vectors. Two different B and B ’ may corresponds to the same bfs. Two different, their corresponding B and B ’ must be different.

49 Example x1x1 x2x2 x3x3     (0, 0, 3) (1, 0, 3) (2, 0, 2) (2, 0, 0) (2, 2, 0)(0, 2, 0) (0, 1, 3) (0, 0, 0)    

50 Example Corresponding F of LP

51 Example Corresponding F of LP

52 Example Corresponding F of LP B and B ’ determine the same bfs, i.e, x = (2, 2, 0, 0, 0, 3, 0) ’. B and B ’ determine the same bfs, i.e, x = (2, 2, 0, 0, 0, 3, 0) ’.

53 Degeneration A bfs is called degenerate if it contains more than n  m zeros.

54 x x Theorem 2 A bfs is called degenerate if it contains more than n  m zeros. If two distinct bases corresponding to the same bfs x, then x is degenerate. Pf) Let B and B ’ be two distinct bases which determine the same bfs x. B B’B’ 0 0 00 n m m

55 x x Theorem 2 A bfs is called degenerate if it contains more than n  m zeros. Pf) Let B and B ’ be two distinct bases which determine the same bfs x. B B’B’ 0 0 00 n m m 00 x has more than n  m zeros and, hence, is degenerate. If two distinct bases corresponding to the same bfs x, then x is degenerate.

56 Discussion A bfs is called degenerate if it contains more than n  m zeros. If two distinct bases corresponding to the same bfs x, then x is degenerate. Changing basis may keep bfs unchanged.

57 More on Theorem 1 and 2 Vertices of polytopeBfs’s of LP Change vertexChange bfs ? A bfs is determined by a chosen basis. Change verticesChange basis ?

58 Costs ? ? ?

59 Costs constant

60 Theorem 3 There is an optimal bfs in any instance of LP. Furthermore, if q bfs’s are optimal, their convex combinations are also optimal.

61 Theorem 3 There is an optimal bfs in any instance of LP. Furthermore, if q bfs’s are optimal, their convex combinations are also optimal. Let x 0  P be the optimal solution, and let x 1, …, x N be the vertices of P. with Let j be the index corresponding to the vertex with lowest cost. x j is the optimum. Pf) and

62 Theorem 3 There is an optimal bfs in any instance of LP. Furthermore, if q bfs’s are optimal, their convex combinations are also optimal. Assume y 1, …, y q be the optimal vertices. Pf) Let withand

63 Linear Programming Moving from Bfs to Bfs 大同大學資工所 智慧型多媒體研究室

64 Facts The optimal solution can be found from vertices of the corresponding polytope. The bfs’s of LP and the vertices of polytope are close correlated. The algorithm to solve LP: – Move from vertex to vertex; or – Move from bfs to bfs

65 The BFS’s Basis columns Nonbasis columns The bfs is determined from the set of basis columns, i.e., B. Move from bfs to bfs:

66 Move from Bfs to Bfs Let x 0 be the bfs determined by B. Denote the basic components of x 0 as x i0, i = 1, …, m. For any, we have    

67 Move from Bfs to Bfs m + 1 columns are involved. Choose one A j from to enter B. Choose one A B(i) to leave B. Who enters? Who leaves?

68 Move from Bfs to Bfs m + 1 columns are involved. Choose one A j from to enter B. Choose one A B(i) to leave B. Who enters? Who leaves?  must be positive. Make one of them zero, and keep others positive. The one that we want to make zero must have x ij > 0. Why?

69 Move from Bfs to Bfs Suppose that A j wants to enter B. Then, we choose Make one of them zero, and keep others positive.

70 Move from Bfs to Bfs Suppose that A j wants to enter B. Then, we choose Make one of them zero, and keep others positive. 1.How about if x i0 = 0 for some i ? 2.How about if all x ij  0 ? 1.How about if x i0 = 0 for some i ? 2.How about if all x ij  0 ?

71 Example x1x1 x2x2 x3x3     (0, 0, 3) (1, 0, 3) (2, 0, 2) (2, 0, 0) (2, 2, 0)(0, 2, 0) (0, 1, 3) (0, 0, 0)    

72 Example Corresponding F of LP

73 Example Corresponding F of LP 2214   

74 Example Corresponding F of LP 2214    Choosing  =1 makes A 6 leaves B. 

75 Example Corresponding F of LP 224  Choosing  =1 makes A 6 leaves B. 01 11 33 11 00 33   = 0  = 1

76 Linear Programming Organization of a Tableau 大同大學資工所 智慧型多媒體研究室

77 Example Ansx1x1 x2x2 x3x3 x4x4 x5x5 1 3 4 3 5 2 2 1 5 1 1 1 0 1 0 0 0 1 x1x1 x2x2 x3x3 x4x4 x5x5 1 2 3 3 2 11 2 11 3 1 0 0 0 1 0 0 0 1 R1 R2  R1 R3  R1 Elementary Row operations

78 Example Ansx1x1 x2x2 x3x3 x4x4 x5x5 1 2 3 3 2 11 2 11 3 1 0 0 0 1 0 0 0 1 R1 R2  R1 R3  R1 B Suppose that we want to choose A 1 to enter the basis, i.e., choosing A 1 as the pivot column.    1/3 2/2 min

79 Example Ansx1x1 x2x2 x3x3 x4x4 x5x5 1 2 3 3 2 11 2 11 3 1 0 0 0 1 0 0 0 1 R1 R2  R1 R3  R1 B    1/3 2/2 min

80 Example Ansx1x1 x2x2 x3x3 x4x4 x5x5 1 2 3 3 2 11 2 11 3 1 0 0 0 1 0 0 0 1 1/3 2/2 min Ansx1x1 x2x2 x3x3 x4x4 x5x5 1/3 4/3 10/3 1 0 0 2/3  7/3 11/3 1/3  2/3 1/3 0 1 0 0 0 1


Download ppt "The Simplex Algorithm 虞台文 大同大學資工所 智慧型多媒體研究室. Content Basic Feasible Solutions The Geometry of Linear Programs Moving From Bfs to Bfs Organization of a."

Similar presentations


Ads by Google