Линейное программирование. Ч.1. Учебное пособие для бакалавриата
.pdf
2. Introduction to LinearProgramming
Fig. 1
Remark. A linear equation
a1x1 +a2x2 + +anxn = b
specifies in Rn a hyperplane. A hyperplane is convex. Linear programming problems can be parted on the
following four groups.
1. The infeasible linear programming problems. The constraints are inconsistent.
Example
x1 ≤1,x1 ≥2,x2 ≥0.
There are no solutions to the problem because there are no solutions to the system of constraints (the feasible set is empty)
— 11 —
2.Introduction to LinearProgramming
2.The unbounded linear programming problems.
2. Introduction to LinearProgramming
Theorem. If the feasible set is bounded and not empty, then there exists an optimal solution of the linear programming problem.
Proof. The Weierstrass theorem states that a continuous function defined on closed bounded set assumes the greatest and the least values. Since a linear function is continuous and the feasible set is closed and bounded then there exists an optimal solution of the linear programming problem. +
Remark. The objective function assumes its optimum (maximum or minimum) value at a corner point (vertex) of the feasible set (provided the optimum exists). Occasionally (see 4-th group of the linear programming problems), the optimum occurs along a face (entire edge) of the feasible set, but in this case the optimum occurs at a corner point as well.
Remark. If a linear programming problem possesses several optimal solutions X1*, ,Xk* , then a convex combination of them
Y1* = s1X1* + +skXk*
where
si ≥0 (i =1; k); s1 + +sk =1
is also an optimal solution.
Definition. A linear programming problem is said to be in standard form when it is written as
f = CT X +C0 →max
AX ≤ B,
X ≥0.
and is said to be in canonicals formz if f = CT X +C0 →max
AX = B,
X ≥0.
— 13 —
2. Introduction to LinearProgramming
Remark. Any linear programming problem can be transformed to the canonicals form.
Indeed, a linear programming problem f = CT X →max
AX ≤ B,
DX = Q,
X ≥0.
is equivalent to a problem written in canonicals form f = CT X +C0 →max
AX +Y = B,
DX = Q,
X ≥0,
Y ≥0.
Where
y1
Y = ≥0 ,yn
The variables y1, ,yn are called slack variables. Example. Transform linear programming linear
programming problem to the canonicals form. f =2x1 −x2 −x3 →max
x1 +2x2 −5x3 =3,2x1 −2x2 ≤1,x1 +x2 +x3 ≤2,
x1 ≥0, x2 ≥0, x3 ≥0.
Solution. Using the slack variables y1,y2 we get
— 14 —
2. Introduction to LinearProgramming
f =2x1 −x2 −x3 →max
x +2x −5x =3, |
|||
|
1 |
2 |
3 |
2x1 −2x2 +y1 =1, |
|||
|
|
+x2 +x3 +y2 =2, |
|
x1 |
|||
x ≥0, x ≥0, x ≥0, |
|||
|
1 |
2 |
3 |
y ≥0, y |
≥0. |
||
|
1 |
2 |
|
Remark. If a linear programming problem is written in the canonicals form and the system of basic constraints reduced to the unit basis, then the linear programming problem can be transformed to the standard form.
Example. Transform the linear programming problem to the standard form.
f =2x1 −3x2 +x3 −2x4 →max
x1 +2x2 +x3 =2,2x1 −x2 +x4 =1,
x1 ≥0, x2 ≥0, x3 ≥0, x4 ≥0.
Solution. The system of main constraints is reduced to the unit basis. Moreover, x1, x2 are the free variables and x3, x4 are the basic variables. We have from the main constrains
Substituting expressions for the basic variables x3, x4 into the objective function we get
f =2x1 −3x2 +(2−x1 −2x2) −2(1−2x1 +x2) =5x1 −7x2.
By removing the basic variables x3, x4 from the system of main constraints, we get the linear programming problem written in standard form.
— 15 —
2. Introduction to LinearProgramming
f =5x1 −7x2 →max
x1 +2x2 ≤2,2x1 −x2 ≤1,x1 ≥0, x2 ≥0.
Questions for self-control
1)What is linear programming?
2)Define a linear programming problem.
3)Give the matrix form of a linear programming problem.
4)What is the objective function?
5)What is the optimal solution of a linear programming problem?
6)Whatarethemainconstraintsofalinearprogramming problem?
7)What are the non-negativity constraints of a linear programming problem?
8)What is the feasible solution of a linear programming problem?
9)How is the feasible set of a linear programming problem defined?
10)What is the feasible linear programming problem?
11)How many solutions can a linear programming problem have?
12)What is a convex set?
13)Is the feasible set of a linear programming problem
convex?
14)What is the canonicals form of a linear programming problem?
15)Is it possible to transform a linear programming problem to a canonicals form?
—16 —
2. Introduction to LinearProgramming
16)What is the standard form of a linear programming problem?
17)In which case can a linear programming problem be transformed to a standard form?
Exercises for independent work
1) Transform the linear programming problems to the canonicals form.
f = x1 −5x2 +2x3 →max
x1 −x2 +4x3 =7,
|
−4x2 ≤2, |
|
|
|
|
|
|
|
a) x1 |
|
|
|
|
|
|
||
x |
+2x +3x |
|
≥6, |
|
|
|||
1 |
2 |
3 |
|
|
|
|
|
|
x |
≥0, x |
≥0, x |
|
≥0. |
|
|||
1 |
2 |
|
|
3 |
|
|
|
|
f = x1 +2x2 −x4 →min |
|
|||||||
x +2x −5x |
=3, |
|
|
|
||||
1 |
2 |
3 |
|
|
|
|
|
|
b) 2x1 −2x2 +6x4 ≤1, |
|
|
||||||
x −x +2x −x ≤2, |
|
|||||||
1 |
2 |
3 |
|
4 |
|
|
|
|
x |
≥0, x |
≥0, x |
≥ |
0,x |
≥0. |
|||
1 |
2 |
|
|
3 |
|
|
4 |
|
2) Transform the linear programming problems to the standard form.
f = x1 +3x2 +x3 −x4 →max
a) x1 −x2 +x3 =1,3x1 −2x2 +x4 =5,
x1 ≥0, x2 ≥0, x3 ≥0, x4 ≥ 0. f =2x1 −x2 +x3 →min
b) x1 +2x2 +x3 =1,2x1 −x2 +x4 =5,
x1 ≥0, x2 ≥0, x3 ≥0, x4 ≥ 0.
— 17 —
2. Introduction to LinearProgramming
3) Write the linear programming problem in the matrix form
f = x1 −x2 +2x3 →min
x1 +x2 −2x3 ≤3,
a)x1 −2x2 +4x3 ≤1,x1 −5x2 +2x3 ≤7,
x1 ≥0, x2 ≥0, x3 ≥0,x4 ≥0.
f = x1 −3x2 +x3 +4x4 →min
b)x1 −x2 +3x3 −2x4 =2,x1 −3x2 +4x3 −2x4 =5,
x1 ≥0, x2 ≥0, x3 ≥0, x4 ≥ 0.
— 18 —
3. GEOMETRIC METHOD
This method is used for linear programming problems written in the standard form (all constraints are inequalities) with 2 variables.
Algorithm for finding the feasible region in the case of 2 variables.
1) Find the boundaries of the feasible region.
They are the straight lines given by equations obtained by replacing the inequality sign with an equal sign in the system of constraints. You can build them by finding two points through which this line passes. These points can be obtained by substituting a fixed value of one of the variables into the equation and finding the corresponding value of the other variable.
2) Find the half-planes containing the feasible region. The straight lines of the boundaries divide the plane
into two half-planes. Substituting a test point (for example, a point O(0;0) ), we can determine which half-plane containing the feasible region. If, when substituting the test point into the inequality defining the half-plane of the constraint, we get the correct statement, then the feasible region belongs to the half-plane containing the test point. If, when substituting a test point into an inequality defining a half-plane of the constraint, we get an incorrect statement, then the feasible region belongs to a half-plane that does not contain a test point.
3) Find the intersection of all half-planes containing the feasible region.
— 19 —
3. Geometric Method
Example. The Figure 2 shows the region for the following linear programming problem.
f = x1 +2x2 →max
2x1 +x2 ≤10, |
|||
−6x +5x ≤5, |
|||
|
|
1 |
2 |
|
|
+3x2 ≤18, |
|
2x1 |
|||
x ≤7 |
|
||
|
1 |
|
|
x ≥0, x ≥0. |
|||
|
1 |
|
2 |
Fig. 2
Definition. The vector n =(n1,n2)T is called the gradient vector of the objective function f =n1x1 +n2x2 +n0 .
Definition. The straight line
n1x1 +n2x2 = c
where c is a constant, is called the level line of the function f =n1x1 +n2x2 +n0 .
— 20 —
