0% found this document useful (0 votes)
14 views13 pages

Or Midterm Solutions2023

Uploaded by

wonderchess007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views13 pages

Or Midterm Solutions2023

Uploaded by

wonderchess007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Mid-term Exam

Operations Research
Fall 2023
Solutions
General note: if a student does not write Answer (optimal plan and optimal value
of the objective function), full score is not provided. If this student provided full
solution but not the Answer, the score is full score minus 2 points.

Task 1. Graphical Method


F = 10x1+7x2 → max,
3x1+2x2≤22, (1)
5x1+4x2≤39, (2)
x1 ≥ 0, (3)
x2 ≥ 0, (4)
Step 1. We draw graphs of lines. [5 points]

Step 2. We build the feasible solution based on graphs. [5 points]


Step 3. The objective function is F = 10x1+7x2 → max. [5 points]
We draw line F = 10x1+7x2 = 0. The gradient points into direction of maximization of the function.
The vector is (10;7). We move the line (which is perpendicular to the vector) in the direction of the
vector until we touch the last point of the feasible solution.
The line F(x) = const intersects the feasible solution the last time at point C. This point is the point
of intersection of lines (1) and (2):
3x1+2x2=22
5x1+4x2=39
We find the coordinates: x1 = 5, x2 = 3.5
Now, we find the maximum value of the function:
F(x) = 10*5 + 7*3.5 = 74.5

Task 2. Simplex Method


We get the canonical task by introducing new variables to change inequalities to equations:
3x1+2x2+x3 = 22
5x1+4x2+x4 = 39 [1 point. Failing this step leads to 0 points for the whole task]

Matrix A = a(ij) is presented below:


3 2 1 0
A=
5 4 0 1

At first we select x3, x4 as basic variables. We put non-basic variables to 0. The first basic plan is X 0
= (0,0,22,39). Now, we build the simplex table. [2 points]
B x1 x 2 x 3 x4
x3 22 3 2 1 0
x4 39 5 4 0 1
F(X) 0 -10 -7 0 0
This plan is not optimal as there are negative numbers in the last row
We select a new basic variable by choosing the column with the smallest number in the last
row. It corresponds to variable x1. [2 points]
We choose the basic variable to become non-basic calculating divisions and selecting the
minimum value:
min (22 : 3 , 39 : 5 ) = 22/3

Hence, we replace x3 with x1. [2 points]


B x1 x2 x3 x4 min
x3 22 3 2 1 0 22/3
x4 39 5 4 0 1 39/5
F(X) 0 -10 -7 0 0
Now, we recalculate simplex table. [4 points]

We divide the first row by the selected number (3). We apply Gauss-Jordan elimination process to
eliminate x1 from other equations:
B x1 x2 x3 x4
22 : 3 3:3 2:3 1:3 0:3
39-(22*5):3 5-(3*5):3 4-(2*5):3 0-(1*5):3 1-(0*5):3
0-(22*-10):3 -10-(3*-10):3 -7-(2*-10):3 0-(1*-10):3 0-(0*-10):3
We get a new simplex table:
B x1 x2 x3 x4
x1 22/3 1 2/3 1/3 0
x4 7/3 0 2/3 -5/3 1
F(X) 220/3 0 -1/3 10/3 0
This plan is not optimal as there are negative numbers in the last row
We select a new basic variable by choosing the column with the smallest number in the last
row. It corresponds to variable x2. [2 points]
We choose the basic variable to become non-basic calculating divisions and selecting the
minimum value:
min (22/3 : 2/3 , 7/3 : 2/3 ) = 7/2 [2 points]
Hence, we replace x4 with x2.
B x1 x2 x3 x4 min
x1 22/3 1 2/3 1/3 0 11
x4 7/3 0 2/3 -5/3 1 7/2
F(X) 220/3 0 -1/3 10/3 0
Now, we recalculate simplex table. [4 points]
We divide the first row by the selected number (2/3). We apply Gauss-Jordan elimination process to
eliminate x2 from other equations:
B x1 x2 x3 x4
22
/3-(7/3*2/3):2/3 1-(0*2/3):2/3 2
/3-(2/3*2/3):2/3 1
/3-(-5/3*2/3):2/3 0-(1*2/3):2/3
7
/3 : 2/3 0 : 2/3 2
/3 : 2/3 -5
/3 : 2/3 1 : 2/3
220
/3-(7/3*-1/3):2/3 0-(0*-1/3):2/3 -1
/3-(2/3*-1/3):2/3 10
/3-(-5/3*-1/3):2/3 0-(1*-1/3):2/3
We get a new simplex table:
B x1 x2 x3 x4
x1 5 1 0 2 -1
x2 7/2 0 1 -5/2 3/2
F(X) 149/2 0 0 5/2 1/2
As we do not have negative numbers in the last row, this plan is optimal. The optimal plan is
x1 = 5, x2 = 7/2
The maximum value is F(X) = 10*5 + 7*7/2 = 149/2

Task 3. Gomory cuts


We have the same problem to solve for integer values, so, we use the results of the task 2.
We have non-integer values in the optimal plan. We build an extra restriction based on variable x 2,
which has fractional part of 1/2: q2 - q21•x1 - q22•x2 - q23•x3 - q24•x4≤0
7 1
q2 = b2 - [b2] = /2 - 3 = /2
q21 = a21 - [a21] = 0 - 0 = 0
q22 = a22 - [a22] = 1 - 1 = 0
q23 = a23 - [a23] = -5/2 + 3 = 1/2
q24 = a24 - [a24] = 3/2 - 1 = 1/2
The restriction is 1/2-1/2x3-1/2x4 ≤ 0 [6 points]
1 1
We get a new equation: /2- /2x3-1/2x4 + x5 = 0
Now, we add it into simplex table and convert F(x) = -F(X). [4 points for simplex table]
B x1 x2 x3 x4 x5
x1 5 1 0 2 -1 0
x2 7/2 0 1 -5/2 3/2 0
x5 -1/2 0 0 -1/2 -1/2 1
F(X0) -149/2 0 0 -5/2 -1/2 0
We divide row F on x5 to determine the variable to change.
B x1 x2 x3 x4 x5
x1 5 1 0 2 -1 0
x2 7/2 0 1 -5/2 3/2 0
x5 -1/2 0 0 -1/2 -1/2 1
F(X0) -149/2 0 0 -5/2 -1/2 0
-5 -1 -1 -1
θ - - /2 : ( /2) = 5 /2 : ( /2) = 1 -
The smallest value in divisions is in column x 4. [4 points]
We recalculate simplex table using Gauss-Jordan elimination process: [6 points]
B x1 x2 x3 x4 x5
-1 -1 -1 -1 -1 -1 -1 -1
5-( /2*-1): /2 1-(0*-1): /2 0-(0*-1): /2 2-( /2*-1): /2 -1-( /2*-1): /2 0-(1*-1):-1/2
7
/2-(-1/2*3/2):-1/2 0-(0*3/2):-1/2 1-(0*3/2):-1/2 -5
/2-(-1/2*3/2):-1/2 3
/2-(-1/2*3/2):-1/2 0-(1*3/2):-1/2
-1
/2 : -1/2 0 : -1/2 0 : -1/2 -1
/2 : -1/2 -1
/2 : -1/2 1 : -1/2
-149
/2-(-1/2*-1/2):- 0-(0*-1/2):- 0-(0*-1/2):- -5
/2-(-1/2*-1/2):- -1
/2-(-1/2*-1/2):- 0-(1*-1/2):-
1 1 1 1 1 1
/2 /2 /2 /2 /2 /2
We get a new simplex table:
B x1 x2 x3 x4 x5
x1 6 1 0 3 0 -2
x2 2 0 1 -4 0 3
x4 1 0 0 1 1 -2
F(X0) -74 0 0 -2 0 -1
This plan is optimal as it has only integer values in column B. The optimal plan is x 1 = 6, x2 = 2
The maximum value is F(X) = 10*6 + 7*2 = 74.

Task 4. Transportation Problem


At first, we check the conditions of this task being closed.
∑a = 25 + 25 + 25 + 25 = 100
∑b = 23 + 9 + 23 + 22 + 23 = 100
This is closed task. We fill the transportation table.
B1 B2 B3 B4 B5 Supply
A1 10 18 7 16 4 25
A2 5 3 12 19 3 25
A3 3 17 8 9 13 25
A4 21 15 17 10 6 25
Demands 23 9 23 22 23
We will use Vogel’s method to find the first basic plan. [7 points]

Note: Below we show detailed reasoning to find the first basic plan. It was not
required by the task as during lessons we showed how to do this within a limited
space of just two tables. 7 points are granted for any proper first basic plan (not only
obtained using Vogel’s method). The criteria is that the sums in each column and each
row must match supply and demand. If the sum is not equal to the constraint, such
plan is considered wrong and grants 0 points.
1. We find the difference between the minimum and the second minimum numbers in each row and
column;
2. We find the largest value among them.
3. We select the minimum number in the chosen row/column and fill it with maximum possible
plan.
For row N=1 the first minimum is min11 = 4, the second minimum is min21 = 7. Their difference is
d = min21 - min11 = 3.
For row N=2 the first minimum is min12 = 3, the second minimum is min22 = 3. Their difference is
d = min22 - min12 = 0.
For row N=3 the first minimum is min13 = 3, the second minimum is min23 = 8. Their difference is
d = min23 - min13 = 5.
For row N=4 the first minimum is min14 = 6, the second minimum is min24 = 10. Their difference
is d = min24 - min14 = 4.
For column N=1 the first minimum is min11 = 3. the second minimum is min21 5. Their difference
is d = min21 - min11 = 2.
For column N=2 the first minimum is min12 = 3. the second minimum is min22 15. Their difference
is d = min22 - min12 = 12.
For column N=3 the first minimum is min13 = 7. the second minimum is min23 8. Their difference
is d = min23 - min13 = 1.
For column N=4 the first minimum is min14 = 9. the second minimum is min24 10. Their difference
is d = min24 - min14 = 1.
For column N=5 the first minimum is min15 = 3. the second minimum is min25 4. Their difference
is d = min25 - min15 = 1.
We find the largest difference in column (2). In this column the minimum value is in the cell of row
(2) and column (2).
B1 B2 B3 B4 B5 Differences
A1 10 18 7 16 4 25 3
A2 5 3 12 19 3 25 0
A3 3 17 8 9 13 25 5
A4 21 15 17 10 6 25 4
23 9 23 22 23
Differences 2 12 1 1 1

We select c22=3. For this element supply is 25, demand is 9. As the minimum of them is 9, we
subtract this value from both.
x22 = min(25,9) = 9.
10 x 7 16 4 25
5 3 12 19 3 25 - 9 = 16
3 x 8 9 13 25
21 x 17 10 6 25
23 9-9=0 23 22 23

For row N=1 the first minimum is min11 = 4, the second minimum is min21 = 7. Their difference is
d = min21 - min11 = 3.
For row N=2 the first minimum is min12 = 3, the second minimum is min22 = 5. Their difference is
d = min22 - min12 = 2.
For row N=3 the first minimum is min13 = 3, the second minimum is min23 = 8. Their difference is
d = min23 - min13 = 5.
For row N=4 the first minimum is min14 = 6, the second minimum is min24 = 10. Their difference
is d = min24 - min14 = 4.
For column N=1 the first minimum is min11 = 3. the second minimum is min21 5. Their difference
is d = min21 - min11 = 2.
For column N=3 the first minimum is min13 = 7. the second minimum is min23 8. Their difference
is d = min23 - min13 = 1.
For column N=4 the first minimum is min14 = 9. the second minimum is min24 10. Their difference
is d = min24 - min14 = 1.
For column N=5 the first minimum is min15 = 3. the second minimum is min25 4. Their difference
is d = min25 - min15 = 1.
We find the largest difference in row (3). In this row the minimum value is in the cell of row (3) and
column (1).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 25 3
A2 5 3 12 19 3 16 2
A3 3 17 8 9 13 25 5
A4 21 15 17 10 6 25 4
Demand 23 [-] 23 22 23
Differences 2 - 1 1 1

We select c31=3. For this element supply is 25, demand is 23. As the minimum of them is 23, we
subtract this value from both.
x31 = min(25,23) = 23.
x x 7 16 4 25
x 3 12 19 3 16
3 x 8 9 13 25 - 23 = 2
x x 17 10 6 25
23 - 23 = 0 [-] 23 22 23

For row N=1 the first minimum is min11 = 4, the second minimum is min21 = 7. Their difference is
d = min21 - min11 = 3.
For row N=2 the first minimum is min12 = 3, the second minimum is min22 = 12. Their difference
is d = min22 - min12 = 9.
For row N=3 the first minimum is min13 = 8, the second minimum is min23 = 9. Their difference is
d = min23 - min13 = 1.
For row N=4 the first minimum is min14 = 6, the second minimum is min24 = 10. Their difference
is d = min24 - min14 = 4.
For column N=3 the first minimum is min13 = 7. the second minimum is min23 8. Their difference
is d = min23 - min13 = 1.
For column N=4 the first minimum is min14 = 9. the second minimum is min24 10. Their difference
is d = min24 - min14 = 1.
For column N=5 the first minimum is min15 = 3. the second minimum is min25 4. Their difference
is d = min25 - min15 = 1.
We find the largest difference inстроке (2). In this row the minimum value is in the cell of row (2)
and column (5).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 25 3
A2 5 3 12 19 3 16 9
A3 3 17 8 9 13 2 1
A4 21 15 17 10 6 25 4
Demand [-] [-] 23 22 23
Differences - - 1 1 1

We select c25=3. For this element supply is 16, Demand 23. As the minimum of them is 16, we
subtract this value from both.
x25 = min(16,23) = 16.
x x 7 16 4 25
x 3 x x 3 16 - 16 = 0
3 x 8 9 13 2
x x 17 10 6 25
[-] [-] 23 22 23 - 16 = 7

For row N=1 the first minimum is min11 = 4, the second minimum is min21 = 7. Their difference is
d = min21 - min11 = 3.
For row N=3 the first minimum is min13 = 8, the second minimum is min23 = 9. Their difference is
d = min23 - min13 = 1.
For row N=4 the first minimum is min14 = 6, the second minimum is min24 = 10. Their difference
is d = min24 - min14 = 4.
For column N=3 the first minimum is min13 = 7. the second minimum is min23 8. Their difference
is d = min23 - min13 = 1.
For column N=4 the first minimum is min14 = 9. the second minimum is min24 10. Their difference
is d = min24 - min14 = 1.
For column N=5 the first minimum is min15 = 4. the second minimum is min25 6. Their difference
is d = min25 - min15 = 2.
We find the largest difference in row (4). In this row the minimum value is in the cell of row (4) and
column (5).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 25 3
A2 5 3 12 19 3 [-] -
A3 3 17 8 9 13 2 1
A4 21 15 17 10 6 25 4
Demand [-] [-] 23 22 7
Differences - - 1 1 2

We select c45=6. For this element supply is 25, Demand 7. As the minimum of them is 7, we
subtract this value from both.
x45 = min(25,7) = 7.
x x 7 16 x 25
x 3 x x 3 [-]
3 x 8 9 x 2
x x 17 10 6 25 - 7 = 18
[-] [-] 23 22 7 - 7 = 0

For row N=1 the first minimum is min11 = 7, the second minimum is min21 = 16. Their difference
is d = min21 - min11 = 9.
For row N=3 the first minimum is min13 = 8, the second minimum is min23 = 9. Their difference is
d = min23 - min13 = 1.
For row N=4 the first minimum is min14 = 10, the second minimum is min24 = 17. Their difference
is d = min24 - min14 = 7.
Находим Differences.
For column N=3 the first minimum is min13 = 7. the second minimum is min23 8. Their difference
is d = min23 - min13 = 1.
For column N=4 the first minimum is min14 = 9. the second minimum is min24 10. Their difference
is d = min24 - min14 = 1.
We find the largest difference in row (1). In this row the minimum value is in the cell of row (1) and
column(3).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 25 9
A2 5 3 12 19 3 [-] -
A3 3 17 8 9 13 2 1
A4 21 15 17 10 6 18 7
Demand [-] [-] 23 22 [-]
Differences - - 1 1 -

We select c13=7. For this element supply is 25, Demand 23. As the minimum of them is 23, we
subtract this value from both.
x13 = min(25,23) = 23.
x x 7 16 x 25 - 23 = 2
x 3 x x 3 [-]
3 x x 9 x 2
x x x 10 6 18
[-] [-] 23 - 23 = 0 22 [-]

For row N=1 the first minimum is min11 = 16, the second minimum is min21 = 16. Their difference
is d = min21 - min11 = 0.
For row N=3 the first minimum is min13 = 9, the second minimum is min23 = 9. Their difference is
d = min23 - min13 = 0.
For row N=4 the first minimum is min14 = 10, the second minimum is min24 = 10. Their difference
is d = min24 - min14 = 0.
For column N=4 the first minimum is min14 = 9. the second minimum is min24 10. Their difference
is d = min24 - min14 = 1.
We find the largest difference inстолбцу (4). In this column the minimum value is in the cell of row
(3) and column (4).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 2 0
A2 5 3 12 19 3 [-] -
A3 3 17 8 9 13 2 0
A4 21 15 17 10 6 18 0
Demand [-] [-] [-] 22 [-]
Differences - - - 1 -

We select c34=9. For this element supply is 2, Demand 22. As the minimum of them is 2, we
subtract this value from both.
x34 = min(2,22) = 2.
x x 7 16 x 2
x 3 x x 3 [-]
3 x x 9 x 2-2=0
x x x 10 6 18
[-] [-] [-] 22 - 2 = 20 [-]

For row N=1 the first minimum is min11 = 16, the second minimum is min21 = 16. Their difference
is d = min21 - min11 = 0.
For row N=4 the first minimum is min14 = 10, the second minimum is min24 = 10. Their difference
is d = min24 - min14 = 0.
For column N=4 the first minimum is min14 = 10. the second minimum is min24 16. Their
difference is d = min24 - min14 = 6.
We find the largest difference inстолбцу (4). In this column the minimum value is in the cell of row
(4) and column (4).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 2 0
A2 5 3 12 19 3 [-] -
A3 3 17 8 9 13 [-] -
A4 21 15 17 10 6 18 0
Demand [-] [-] [-] 20 [-]
Differences - - - 6 -

We select c44=10. For this element supply is 18, Demand 20. As the minimum of them is 18, we
subtract this value from both.
x44 = min(18,20) = 18.
x x 7 16 x 2
x 3 x x 3 [-]
3 x x 9 x [-]
x x x 10 6 18 - 18 = 0
[-] [-] [-] 20 - 18 = 2 [-]

For row N=1 the first minimum is min11 = 16, the second minimum is min21 = 16. Their difference
is d = min21 - min11 = 0.
For column N=4 the first minimum is min14 = 16. the second minimum is min24 16. Their
difference is d = min24 - min14 = 0.
We find the largest difference inстроке (1). In this row the minimum value is in the cell of row (1)
and column (4).
B1 B2 B3 B4 B5 Supply Differences
A1 10 18 7 16 4 2 0
A2 5 3 12 19 3 [-] -
A3 3 17 8 9 13 [-] -
A4 21 15 17 10 6 [-] -
Demand [-] [-] [-] 2 [-]
Differences - - - 0 -

We select c14=16. For this element supply is 2, Demand 2. As the minimum of them is 2, we
subtract this value from both.
x14 = min(2,2) = 2.
x x 7 16 x 2-2=0
x 3 x x 3 [-]
3 x x 9 x [-]
x x x 10 6 [-]
[-] [-] [-] 2 - 2 = 0 [-]

B1 B2 B3 B4 B5 Supply
A1 10 18 7[23] 16[2] 4 25
A2 5 3[9] 12 19 3[16] 25
A3 3[23] 17 8 9[2] 13 25
A4 21 15 17 10[18] 6[7] 25
Demand 23 9 23 22 23

All calculations can be written in one table:


B1 B2 B3 B4 B5 Supply d1 d2 d3 d4 d5 d6
A1 10 18 7[23] 16[2] 4 25 3 3 3 3 9 0
A2 5 3[9] 12 19 3[16] 25 0 2 9 - - -
A3 3[23] 17 8 9[2] 13 25 5 5 1 1 1 0
A4 21 15 17 10[18] 6[7] 25 4 4 4 4 7 0
Demand 23 9 23 22 23
d1 2 12 1 1 1
d2 2 - 1 1 1
d3 - - 1 1 1
d4 - - 1 1 2
d5 - - 1 1 -
d6 - - - 1 -

We got the basic plan. It is non-degenerate as the number of occupied cells is m + n - 1 = 8. The
value of the objective function is F(x) = 7*23 + 16*2 + 3*9 + 3*16 + 3*23 + 9*2 + 10*18 + 6*7 =
577
Now, we calculate potentials ui, vj. We use ui + vj = cij for only occupied cells and put u1 = 0.

Note: finding potentials is very important. Even though we got some first basic plan,
we cannot claim that this plan is optimal without proper justification. Potentials
provide not only proof for optimal plan but also help to determine where the plan
should be changed to achieve optimality. If potentials were not found, the solution
will get only marks for finding first basic plan if it was found. No more grades are not
granted in case potentials are not calculated. Potentials are found using selected cells’
costs, not the amount of goods transported.
u1 + v3 = 7; 0 + v3 = 7; v3 = 7 [6 points for finding potentials]
u1 + v4 = 16; 0 + v4 = 16; v4 = 16
u3 + v4 = 9; 16 + u3 = 9; u3 = -7
u3 + v1 = 3; -7 + v1 = 3; v1 = 10
u4 + v4 = 10; 16 + u4 = 10; u4 = -6
u4 + v5 = 6; -6 + v5 = 6; v5 = 12
u2 + v5 = 3; 12 + u2 = 3; u2 = -9
u2 + v2 = 3; -9 + v2 = 3; v2 = 12
v1=10 v2=12 v3=7 v4=16 v5=12
u1=0 10 18 7[23] 16[2] 4
u2=-9 5 3[9] 12 19 3[16]
u3=-7 3[23] 17 8 9[2] 13
u4=-6 21 15 17 10[18] 6[7]
The plan is not optimal as there are unoccupied cells where ui + vj > cij:
(1;5): 0 + 12 > 4; ∆15 = 0 + 12 - 4 = 8 > 0
We select the cell with the largest offset (1;5): 4
Now, we build a closed cycle using this cell and some of occupied cells only. We label the selected
cell with «+», then we vary the labels «-», «+», «-» in the following cells along the cycle. [6 points]
1 2 3 4 5 Supply
1 10 18 7[23] 16[2][-] 4[+] 25
2 5 3[9] 12 19 3[16] 25
3 3[23] 17 8 9[2] 13 25
4 21 15 17 10[18][+] 6[7][-] 25
Demand 23 9 23 22 23

The cycle is (1,5 → 1,4 → 4,4 → 4,5).


We select the smallest хij in cells labelled “-“. у = min (1, 4) = 2. We add this value to all cells with
“+” label and subtract it from all cells with “-“ label.
We get a new plan. Now, we calculate new values of potentials:
u1 + v3 = 7; 0 + v3 = 7; v3 = 7 [6 points for finding potentials]
u1 + v5 = 4; 0 + v5 = 4; v5 = 4
u2 + v5 = 3; 4 + u2 = 3; u2 = -1
u2 + v2 = 3; -1 + v2 = 3; v2 = 4
u4 + v5 = 6; 4 + u4 = 6; u4 = 2
u4 + v4 = 10; 2 + v4 = 10; v4 = 8
u3 + v4 = 9; 8 + u3 = 9; u3 = 1
u3 + v1 = 3; 1 + v1 = 3; v1 = 2
v1=2 v2=4 v3=7 v4=8 v5=4
u1=0 10 18 7[23] 16 4[2]
u2=-1 5 3[9] 12 19 3[16]
u3=1 3[23] 17 8 9[2] 13
u4=2 21 15 17 10[20] 6[5]
New plan is optimal as all cells satisfy ui + vj ≤ cij.
The minimum cost of transportation is F(x) = 7*23 + 4*2 + 3*9 + 3*16 + 3*23 + 9*2 + 10*20 + 6*5
= 561

Task 5. Non-linear Programming

We want to minimize function 𝑓(𝑥, 𝑦) = 5𝑥 + 4𝑥𝑦 + 4𝑦 − 26𝑥 − 12𝑦 + 36.


First, we find the gradient of the function: [5 points]
∇𝑓(𝑥, 𝑦) = (10𝑥 + 4𝑦 − 26, 8𝑦 + 4𝑥 − 12)
Now, we calculate the Hessian of the function: [5 points]
𝜕 𝑓 𝜕 𝜕𝑓 𝜕
= = (10𝑥 + 4𝑦 − 26) = 10
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕 𝑓 𝜕 𝜕𝑓 𝜕
= = (8𝑦 + 4𝑥 − 12) = 8
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦
𝜕 𝑓 𝜕 𝜕𝑓 𝜕
= = (8𝑦 + 4𝑥 − 12) = 4
𝜕𝑥𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
10 4
𝐻(𝑓)(𝑥, 𝑦) =
4 8
This matrix is positively defined according to Sylvester’s criteria as 10 > 0 and det H = 80 – 16 = 64
> 0. The minimum point will be a global minima.
Let’s find the point where gradient is equal to zero vector: [5 points]
1
10𝑥 + 4𝑦 = 26 5 + 2𝑦 = 13 15 − 10𝑦 + 2𝑦 = 13 𝑦 =
→ → → 4
4𝑥 + 8𝑦 = 12 𝑥 + 2𝑦 = 3 𝑥 = 3 − 2𝑦 5
𝑥=
2
The point of global minima is ,
The minimum value of the function is 𝑓 =𝑓 , = 2.

You might also like