Quadratic Programming Problem
Quadratic Programming Problem
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 1
the convex combination algorithm, the method was originally proposed by Marguerite Frank and Philip
Wolfe in 1956.
Question: Describe Wolf’s method for solving Q.P.P.
Or, Describe Wolf’s modified simplex method for solving Q.P.P.
Answer: Let us consider the Q.P.P.
1
Optimize 𝑓(𝑥) = 𝑐𝑥 + 2 𝑥 𝑇 𝐷𝑥
𝑖. 𝑒. 𝑐𝑗 − ∑𝑛𝑘=1 𝑥𝑘 𝑎𝑖𝑗 − ∑𝑚
𝑖=1 𝜆𝑖 𝑎𝑖𝑗 + 𝜇𝑗 = 0; 𝑗 = 1, 2, … … 𝑛.
(ii) −2𝜇𝑠 = 0 or 𝜇𝑗 𝑥𝑗 = 0; 𝑗 = 1, 2, … . . 𝑛.
(iii) −2𝜆𝑦 = 0 or 𝜆𝑖 𝑦𝑖2 = 0 or 𝜆𝑖 [∑𝑛𝑖=1 𝑎𝑖𝑗 𝑥𝑗 − 𝑏𝑖 ] = 0; 𝑖 = 1, 2, … … . 𝑛
(iv) 𝐴𝑥 + 𝑦 2 − 𝑏 = 0 or 𝐴𝑥 ≤ 𝑏.
(v) −𝑥 + 𝑠 2 = 0 or 𝑥 ≥ 0
(vi) 𝜆𝑖 , 𝜇𝑗 , 𝑥𝑗 , 𝑦𝑗 , 𝑠𝑗 ≥ 0 ; 𝑖 = 1, 2, … … . 𝑚 and 𝑗 = 1, 2, … … . , 𝑛.
Step 4: We introduce the non-negative artificial variables 𝑎𝑖 (𝑖 = 1, 2, … . . 𝑛) in the Kuhn-Tucker
conditions (𝑖) and to construct an objective function 𝑧 = 𝑎1 + 𝑎2 + ⋯ … . . +𝑎𝑛 .
Step 5: We obtain an initial basic feasible solution to the L.P.P.:
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = 𝑎1 + 𝑎2 + ⋯ … . . +𝑎𝑛 .
Subject to the constraints: ∑𝑛𝑘=1 𝑥𝑘 𝑑𝑗𝑘 + ∑𝑚
𝑖=1 𝜆𝑖 𝑎𝑖𝑗 + 𝜇𝑗 + 𝑎𝑗 = 𝑐𝑗 ; 𝑗 = 1, 2, … … 𝑛.
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 2
Step 7: Thus the optimum solution obtained in step 6 is an optimum solution to the given quadratic
programming problem.
Problem: Solve the following quadratic programming problem using Wolf’s method.
Maximize 𝒛 = 𝟐𝒙𝟏 + 𝟑𝒙𝟐 − 𝟐𝒙𝟐𝟏
Subject to the constraints: 𝒙𝟏 + 𝟒𝒙𝟐 ≤ 𝟒
𝒙𝟏 + 𝒙𝟐 ≤ 𝟐
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution: The given quadratic programming problem is rewritten as 1
𝑥1 1 4 0 𝑥1 𝑧 = 𝑐𝑥 + 𝑥 𝑇 𝐷𝑥
Maximize 𝑧 = (2 3) (𝑥 ) − 2 (𝑥1 𝑥2 )( )( ) 2
2 0 0 𝑥2
𝑠/𝑡: 𝐴𝑥 ≤ 𝑏
1 4 𝑥1 4
Subject to the constraints: ( ) (𝑥 ) ≤ ( )
1 1 2 2
and 𝑥1 ≥ 0 and 𝑥2 ≥ 0 𝐷𝑥 + 𝐴𝑇 𝜆 − 𝜇 = 𝑐 𝑇
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 3
Table for phase-I:
𝑐𝑗 0 0 0 0 0 0 0 0 -1 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜆2 𝜇1 𝜇2 𝑦1 𝑦2 𝑎1 𝑎2 b ratio
-1 𝑎1 (4) 0 1 1 -1 0 0 0 1 0 2 1∗
2
-1 𝑎2 0 0 4 1 0 -1 0 0 0 1 3
0 𝑦1 1 4 0 0 0 0 1 0 0 0 4 4
0 𝑦2 1 1 0 0 0 0 0 1 0 0 2 2
𝑧𝑗∗ − 𝑐𝑗 −4 ↑ 0 -5 -2 1 1 0 0 0 0 𝑧 ∗ = −5
Here 𝑧3∗ − 𝑐3 = −5 is the most negative. But 𝑦1 present in the basic so 𝜆1 cannot enter the basis, next
most negative is 𝑧1∗ − 𝑐1 = −4, 𝑥1 can enter the basis since 𝜇1 = 0. Hence 𝑥1 is entering variable and 𝑎1
is departing variable.
First iteration:
𝑐𝑗 0 0 0 0 0 0 0 0 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜆2 𝜇1 𝜇2 𝑦1 𝑦2 𝑎2 b ratio
0 𝑥1 1 0 1/4 1/4 -1/4 0 0 0 0 1/2
-1 𝑎2 0 0 4 1 0 -1 0 0 1 3
0 𝑦1 0 (4) -1/4 -1/4 1/4 0 1 0 0 7/2 7∗
8
0 𝑦2 0 1 -1/4 -1/4 1/4 0 0 1 0 3/2 3/2
𝑧𝑗∗ − 𝑐𝑗 0 0↑ -4 -1 0 1 0 0 0 𝑧 ∗ = −3
Here 𝑧3∗ − 𝑐3 = −4 and 𝑧4∗ − 𝑐4 = −1 But 𝜆1 and 𝜆2 cannot enter the basis, since 𝑦1 and 𝑦2 present in
the basis. Let 𝑥2 is entering variable and 𝑦1 is departing variable.
Second iteration:
𝑐𝑗 0 0 0 0 0 0 0 0 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜆2 𝜇1 𝜇2 𝑦1 𝑦2 𝑎2 b ratio
0 𝑥1 1 0 1 1 1/2 0 0 0 0 1
-1 𝑎2 0 0 (3) 1 0 -1 0 0 1 1 1∗
3
0 𝑥2 0 1 2/3 -2/3 1/3 0 1/3 0 0 4/3 4/3
0 𝑦2 0 0 -1/2 -1/2 2/3 0 -1/3 1 0 2/3 2
𝑧𝑗∗ − 𝑐𝑗 0 0 −3↑ -1 0 1 0 0 0 𝑧 ∗ = −1
Here 𝑧3∗ − 𝑐3 = −3 is the most negative and 𝑦1 = 0 so 𝜆1 can enter the basis and 𝑎2 is departing variable.
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 4
Final iteration:
𝑐𝑗 0 0 0 0 0 0 0 0 Constant
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜆2 𝜇1 𝜇2 𝑦1 𝑦2 b
Problem: Use Wolf’s method in solving the following quadratic programming problem.
Minimize 𝒛 = 𝟔 − 𝟔𝒙𝟏 + 𝟐𝒙𝟐𝟏 − 𝟐𝒙𝟏 𝒙𝟐 + 𝟐𝒙𝟐𝟐
Subject to the constraints: 𝒙𝟏 + 𝒙𝟐 ≤ 𝟐
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution: The given quadratic programming problem is rewritten as
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 ∗ = −6 + 6𝑥1 − 2𝑥12 + 2𝑥1 𝑥2 − 2𝑥22
Subject to the constraints: 𝑥1 + 𝑥2 ≤ 2
𝑥1 , 𝑥2 ≥ 0
𝑥1 1 4 −2 𝑥1
⇒ Maximize 𝑧 ∗ = (6 0) (𝑥 ) − 2 (𝑥1 𝑥2 ) ( ) (𝑥 )
2 −2 4 2
𝑥1
Subject to the constraints: (1 1) (𝑥 ) ≤ 2
2
and 𝑥1 , 𝑥2 ≥ 0
∴ The Khun-Tucker condition are
4 −2 𝑥1 1 𝜇1 6
( ) (𝑥 ) + ( ) (𝜆1 ) − (𝜇 ) = ( )
−2 4 2 1 2 0
𝑥1
and (1 1) (𝑥 ) + (𝑦1 ) = (2)
2
Where 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0 and 𝑥1 , 𝑥2 , 𝜆1 , 𝜇1 , 𝜇2 , 𝑦1 ≥ 0
4𝑥1 − 2𝑥2 + 𝜆1 − 𝜇1 = 6
⇒ −2𝑥1 + 4𝑥2 + 𝜆1 − 𝜇2 = 0} … … … . (∗)
𝑥1 + 𝑥2 + 𝑦1 = 2
𝑥1 , 𝑥2 , 𝜆1 , 𝜇1 , 𝜇2 , 𝑦1 ≥ 0 and 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0
Now introducing artificial variables 𝑎1 ≥ 0 and 𝑎2 ≥ 0 the given Q.P.P. is equivalent to
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑎1 + 𝑎2
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 5
Subject to the constraints:
4𝑥1 − 2𝑥2 + 𝜆1 − 𝜇1 + 𝑎1 = 6
−2𝑥1 + 4𝑥2 + 𝜆1 − 𝜇2 + 𝑎2 = 0
𝑥1 + 𝑥2 + 𝑦1 = 2
𝑥1 , 𝑥2 𝑦1 , 𝑦2 , 𝜆1 , 𝜆2 , 𝜇1 , 𝜇2 , 𝑎1 , 𝑎2 ≥ 0 and 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0
Thus the auxiliary linear programming problem for phase-I is
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 ∗ = −𝑎1 − 𝑎2
Subject to the constraints:
4𝑥1 − 2𝑥2 + 𝜆1 − 𝜇1 + 0. 𝜇2 + 0. 𝑦1 + 𝑎1 + 0. 𝑎2 = 6
−2𝑥1 + 4𝑥2 + 𝜆1 + 0. 𝜇1 − 𝜇2 + 0. 𝑦1 + 0. 𝑎1 + 𝑎2 = 0
𝑥1 + 𝑥2 + 0. 𝜆1 + 0. 𝜇1 − 0. 𝜇2 + 𝑦1 + 0. 𝑎1 + 0. 𝑎2 = 2
𝑥1 , 𝑥2 𝑦1 , 𝑦2 , 𝜆1 , 𝜆2 , 𝜇1 , 𝜇2 , 𝑎1 , 𝑎2 ≥ 0 and 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0
The simplex iteration leading to the optimum solution are
Table for phase-I
𝑐𝑗 0 0 0 0 0 0 -1 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 𝑎1 𝑎2 b ratio
-1 𝑎1 (4) -2 1 -1 0 0 1 0 6 3∗
2
-1 𝑎2 -2 4 1 0 -1 0 0 1 0
0 𝑦1 -1 1 0 0 0 1 0 0 2 2
𝑧𝑗∗ − 𝑐𝑗 −2 ↑ -2 -2 1 1 0 0 0 𝑧 ∗ = −6
Here 𝑧1∗ − 𝑐1 = −2 = 𝑧2∗ − 𝑐2 = 𝑧3∗ − 𝑐3 is the most negative and 𝜆1 cannot enter the basis because 𝑦1
present in the basis 𝑥1 and 𝑥2 can enter the basis. Let 𝑥1 is entering variable and 𝑎1 is departing variable.
First iteration:
𝑐𝑗 0 0 0 0 0 0 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 𝑎2 b ratio
0 𝑥1 1 -1/2 1/4 -1/4 0 0 0 3/2
-1 𝑎2 0 3 3/2 -1/2 -1 0 1 3 1
0 𝑦1 0 (3/2) -1/4 1/4 0 1 0 1/2 1∗
3
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 6
𝑐𝑗 0 0 0 0 0 0 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 𝑎2 b ratio
0 𝑥1 1 0 1/6 -1/6 0 1/3 0 5/3 10
-1 𝑎2 0 0 (2) -1 -1 -2 1 2 1∗
0 𝑥2 0 1 -1/6 1/6 0 2/3 0 1/3
𝑧𝑗∗ − 𝑐𝑗 0 0 -2 1 1 2 0 𝑧 ∗ = −2
Here 𝜆1 is the most negative. Thus 𝜆1 can enter the basis since 𝑦1 = 0 and 𝑎2 leave the basis.
Final iteration:
𝑐𝑗 0 0 0 0 0 0 Constant
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 b
0 𝑥1 1 0 0 -1/12 1/12 1/2 2/3
0 𝜆1 0 0 1 -1/2 -1/ -1 1
0 𝑥2 0 1 0 1/12 2/9 1/2 1/2
𝑧𝑗∗ − 𝑐𝑗 0 0 0 0 0 0 𝑧∗ = 0
Since all 𝑧𝑗∗ − 𝑐𝑗 ≥ 0 and 𝑧 ∗ = 0 all artificial variables leave the basis. Hence the optimality conditions
2 1 11
are satisfied and optimum solution is 𝑥1 = 3 , 𝑥2 = 2 , 𝑀𝑎𝑥 𝑍 ∗ = 2
2 1 11
∴ 𝑥1 = , 𝑥2 = , 𝑀𝑖𝑛 𝑍 = −
3 2 2
Problem: Solve the following quadratic programming problem using Wolf’s method:
Minimize 𝒛 = 𝒙𝟐𝟏 − 𝒙𝟏 𝒙𝟐 + 𝟑𝒙𝟐𝟐 − 𝟒𝒙𝟐 + 𝟒
Subject to the constraints: 𝒙𝟏 + 𝒙𝟐 ≤ 𝟏
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution: Convert the objective function to maximization type we get
Maximize 𝑧1∗ = −𝑥12 + 𝑥1 𝑥2 − 3𝑥22 + 4𝑥2 − 4
Subject to the constraints: 𝑥1 + 𝑥2 ≤ 1
𝑥1 , 𝑥2 ≥ 0
Matrix form except the constant term -4 of objective function because it has no effect on finding the
solution.
Maximize 𝑧 ∗ = −𝑥12 + 𝑥1 𝑥2 − 3𝑥22 + 4𝑥2 − 4
Subject to the constraints: 𝑥1 + 𝑥2 ≤ 1
𝑥1 , 𝑥2 ≥ 0
𝑥1 𝑥
1
⇒ Maximize 𝑧 = (0 4) (𝑥 ) − 2 (𝑥1 𝑥2 ) (−2 1 ) ( 1 )
2 1 −6 𝑥2
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 7
𝑥1
Subject to the constraints: (1 1) (𝑥 ) ≤ (1) and 𝑥1 , 𝑥2 ≥ 0
2
Where 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0 and 𝑥1 , 𝑥2 , 𝜆1 , 𝜆2 , 𝜇1 , 𝜇2 , 𝑦1 , 𝑦2 ≥ 0
2𝑥1 − 𝑥2 + 𝜆1 − 𝜇1 = 0
⇒ −𝑥1 + 6𝑥2 + 𝜆1 − 𝜇2 = 4} … … … . (∗)
𝑥1 + 𝑥2 + 𝑦1 = 1
𝑥1 , 𝑥2 , 𝜆1 , 𝜆2 , 𝜇1 , 𝜇2 , 𝑦1 , 𝑦2 ≥ 0 and 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0
Now introducing artificial variables 𝑎1 ≥ 0 and 𝑎2 ≥ 0 the given Q.P.P. is equivalent to
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑎1 + 𝑎2
Subject to the constraints:
2𝑥1 − 𝑥2 + 𝜆1 − 𝜇1 + 𝑎1 = 0
−𝑥1 + 6𝑥2 + 𝜆1 − 𝜇2 + 𝑎2 = 4
𝑥1 + 𝑥2 + 𝑦1 = 1
𝑥1 , 𝑥2 𝑦1 , 𝑦2 , 𝜆1 , 𝜇1 , 𝜇2 , 𝑎1 , 𝑎2 ≥ 0
Thus the auxiliary linear programming problem for phase-I is
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 ∗ = −𝑎1 − 𝑎2
Subject to the constraints:
2𝑥1 − 𝑥2 + 𝜆1 − 𝜇1 + 0. 𝜇2 + 0. 𝑦1 + 𝑎1 + 0. 𝑎2 = 0
−𝑥1 + 6𝑥2 + 𝜆1 + 0. 𝜇1 − 𝜇2 + 0. 𝑦1 + 0. 𝑎1 + 𝑎2 = 4
𝑥1 + 𝑥2 + 0. 𝜆1 + 0. 𝜇1 + 0. 𝜇2 +𝑦1 + 0. 𝑎1 + 0. 𝑎2 = 1
𝑥1 , 𝑥2 𝑦1 , 𝑦2 , 𝜆1 , 𝜇1 , 𝜇2 , 𝑎1 , 𝑎2 ≥ 0 and 𝜆1 𝑦1 = 𝜇1 𝑥1 = 𝜇2 𝑥2 = 0.
The simplex iteration leading to the optimum solution are
Table for phase-I
𝑐𝑗 0 0 0 0 0 0 -1 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 𝑎1 𝑎2 b ratio
-1 𝑎1 2 -1 1 -1 0 0 1 0 0
-1 𝑎2 -1 6∗ 1 0 -1 0 0 1 4 2∗
3
0 𝑦1 1 1 0 0 0 1 0 0 1 1
𝑧𝑗∗ − 𝑐𝑗 -1 −5 ↑ -2 1 1 0 0 0 𝑧 ∗ = −4
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 8
Here 𝑧2∗ − 𝑐2 = −5 is the most negative, so 𝑥2 can enter the basis since 𝜇2 = 0. Hence 𝑥2 is entering
variable and 𝑎2 is departing variable.
First iteration:
𝑐𝑗 0 0 0 0 0 0 -1 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 𝑎1 𝑎2 b ratio
-1 𝑎1 11/6 0 7/6 -1 -1/6 0 0 1 2/3 4/11
0 𝑥2 -1/6 1 1/6 0 -1/6 0 0 0 2/3
0 𝑦1 (7/6) 0 -1/6 0 1/6 1 1 0 1/3 2/7∗
𝑧𝑗∗ − 𝑐𝑗 −11/6 ↑ 0 -7/6 1 1/6 0 0 0 𝑧 ∗ = −4
11
Here 𝑧1∗ − 𝑐1 = − is the most negative, so 𝑥1 can enter the basis because 𝜇1 = 0, so 𝑦1 leave the basis.
6
Second iteration:
𝑐𝑗 0 0 0 0 0 0 -1 Constant Min
𝑐𝐵 basis 𝑥1 𝑥2 𝜆1 𝜇1 𝜇2 𝑦1 𝑎1 b ratio
Since all 𝑧𝑗∗ − 𝑐𝑗 ≥ 0 and 𝑧 ∗ = 0 all artificial variables leave the basis. Hence the optimality conditions
3 7 29
are satisfied and optimum solution is 𝑥1 = 10 , 𝑥2 = 10 , 𝑀𝑎𝑥 𝑍 ∗ = 20
29 51
𝑀𝑎𝑥 𝑧1∗ = −𝑥12 + 𝑥1 𝑥2 − 3𝑥22 + 4𝑥2 − 4 = 20 − 4 = − 20
51
∴ 𝑀𝑖𝑛. 𝑍 = 20
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 9
Question: What is Beale’s method?
Answer: In 1959, E.M.L. Beale has developed a technique of solving the quadratic programming
problem that does not use the Kuhn-Tucker conditions in achieving the optimum solution. His technique
involves partitioning of the variable into basic and non-basic ones and using classical calculus results.
At each iteration, the objective function is expressed in terms of only the non-basic variables.
Question: Describe Beale’s method for solving quadratic programming problem.
Answer: Let us consider the Q.P.P.
1
Optimize 𝑓(𝑥) = 𝑐𝑥 + 2 𝑥 𝑇 𝐷𝑥
𝜕𝑓(𝑥)
And ( ) = 0 for each 𝑖
𝜕𝑢𝑖 𝑥𝑁𝐵=0
𝑢=0
Then choose most positive one. The corresponding non-basic variable will be basic.
𝜕𝑓(𝑥)
(iii) If (𝜕𝑥 ) < 0 for each ℎ = 1, 2, … … . , 𝑛 − 𝑚.
𝑁𝐵𝐾 𝑥𝐵𝑁=0
𝑢=0
𝜕𝑓(𝑥)
but ( ) ≠ 0 for same 𝑖 = 𝑟
𝜕𝑢𝑖 𝑥𝑁𝐵=0
𝑢=0
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 10
and treat 𝑢𝑟 as a basic variable (to be ignored later). Go to step-3.
Step-5: Let 𝑥𝑁𝐵𝑖 = 𝑥𝑘 be the entering variable identified in step 4(ii). Compute the minimum ratios.
𝛼 𝛾
𝑀𝑖𝑛 {|𝛼ℎ0 | . |𝛾𝑘0 |}
ℎ𝑘 𝑘𝑘
For all basic variables 𝑥ℎ , where 𝛼ℎ0 is the constant term and 𝛼ℎ𝑘 is the co-efficient of 𝑥𝑘 , in the
expression of basic variable 𝑥ℎ , when expressed in terms of the non-basic variables and 𝛾𝑘0 is the
𝜕𝑓(𝑥)
constant term and 𝛾𝑘 is the co-efficient of 𝑥𝑘 in .
𝜕𝑥𝑘
𝛼ℎ0
(i) If the minimum ratio occurs for some , the corresponding basic variable 𝑥𝑘 , will leave
|𝛼ℎ0 |
1 𝜕𝑓(𝑥)
called free variable defined by 𝑢𝑗 = 2 , 𝑢𝑗 is unrestricted in sign.
𝜕𝑥𝑘
Step-6: Go to step-3 and repeat the procedure until an optimal basic solution is obtained.
Step-7: Determine the value of original objective function 𝑓(𝑥) at 𝑥𝐵 and 𝑥𝑁𝐵 = 0 in their expression
obtained in step-3.
Problem: Solve the following quadratic programming problem using Beale’s method.
𝑴𝒂𝒙𝒊𝒎𝒊𝒛𝒆 𝒇(𝒙) = 𝟒𝒙𝟏 + 𝟔𝒙𝟐 − 𝒙𝟐𝟏 − 𝟑𝒙𝟐𝟐
Subject to: 𝒙𝟏 + 𝟐𝒙𝟐 ≤ 𝟒
𝒙 𝟏 , 𝒙𝟐 ≥ 𝟎
Solution: Introducing slack variable 𝑥3 ≥ 0, the standard form of the problem become
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑓(𝑥) = 4𝑥1 + 6𝑥2 − 𝑥12 − 3𝑥22
Subject to: 𝑥1 + 2𝑥2 + 𝑥3 = 4
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Let 𝑥3 be the initial basic variable, with 𝑥3 = 4, 𝑥1 = 𝑥2 = 0.
∴ Basic variable 𝑥𝐵 = (𝑥3 ) and Non-basic variables 𝑥𝑁𝐵 = (𝑥1 , 𝑥2 )
Expressing basic variables 𝑥𝐵 and object function 𝑓(𝑥) entirely interms of 𝑥𝑁𝐵 .
We get, 𝑥3 = 4 − 𝑥1 − 2𝑥2
and 𝑓(𝑥) = 4𝑥1 + 6𝑥2 − 𝑥12 − 3𝑥22
𝜕𝑓
(𝜕𝑥 )𝑥1 =0 = (4 − 2𝑥1 )𝑥 1=0 = 4
1 𝑥2 =0
𝑥2 =0
𝜕𝑓
(𝜕𝑥 )𝑥1 =0 = (6 − 2𝑥2 )𝑥 1=0 = 6
2 𝑥2 =0
𝑥2 =0
Since both the partial derivatives are positive at 𝑥𝑁𝐵 = 0, the current solution is not optimum. The most
𝜕𝑓
positive partial derivative gives by 𝜕𝑥 , 𝑥2 must enter the basis.
2
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 11
Now to determine the leaving basic variable, we compute the ratios:
𝛼 𝛾 𝛼 𝛾 4 6
𝑀𝑖𝑛 {|𝛼ℎ0 | . |𝛾𝑘0 |} = 𝑀𝑖𝑛 {|𝛼30 | , 𝛾20 } = 𝑀𝑖𝑛 {|−2| , |−6|} = min{2,1} = 1.
ℎ𝑘 𝑘𝑘 32 22
[ Where 𝛼ℎ0 is the constant term and 𝛼ℎ𝑘 is the co-efficient of new basic 𝑥2 of 𝑥3 = 4 − 𝑥1 − 2𝑥2 . Also
𝜕𝑓
𝛾𝑘0 and 𝛾𝑘𝑘 are the constant term and co-efficient of 𝑥2 in = 6 − 6𝑥2 ]
𝜕𝑥2
𝛾
Which occurs for |𝛾𝑘0 | ; and therefore we introduce a free variable 𝑢1 in 𝑥𝑁𝐵 defined by
𝑘𝑘
1 𝜕𝑓 1
𝑢1 = 2 𝜕𝑥 ⇒ 𝑢1 = 2 (6 − 6𝑥2 ) = 3 − 3𝑥2
2
1
= 3 + 4𝑢1 − 𝑥12 − 3 𝑢12
𝜕𝑓
Since 𝜕𝑥 > 0, 𝑥1 must enter the basis to determine the leaving basic variable, we compute
1
𝛼 𝛼 𝛾 1 2 4 1
𝑀𝑖𝑛 {|𝛼20 | , |𝛼30 | , 𝛾20 } = 𝑀𝑖𝑛 {0 , |−1| , |−2|} = min {0 , 2, 2} = 2.
21 31 11
𝛾10
Since minimum ratio occurs for , we have to introduce another non-basic free variable 𝑢2 defined
|𝛾11 |
1 𝜕𝑓 1
by 𝑢2 = = (4 − 2𝑥1 )
2 𝜕𝑥1 2
∴ Set of basic variables, 𝑥𝐵 = (𝑥2 , 𝑥3 , 𝑥1 ) and set of non-basic variables 𝑥𝑁𝐵 = (𝑢1 , 𝑢2 )
Expressing the basic variables 𝑥𝐵 and objective function 𝑓(𝑥) entirely in terms of 𝑥𝑁𝐵 , we have
𝑥1 = 2 − 𝑢2
1
𝑥2 = 1 − 3 𝑢1
2 2
𝑥3 = 2 − (2 − 𝑢2 ) + 3 𝑢1 ⇒ 𝑥3 = 𝑢2 + 3 𝑢1
1 1
And 𝑓(𝑥) = 3 + 4(2 − 𝑢2 ) − (2 − 𝑢)2 − 3 𝑢12 = 3 + 8 − 4𝑢2 − 4 + 4𝑢2 − 𝑢22 − 3 𝑢12
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 12
1
= 7 − 𝑢22 − 3 𝑢12
𝜕𝑓 2
Now (𝜕𝑢 )𝑢1 =0 = (− 3 𝑢1 ) =0
1 𝑥 1=0
𝑢2 =0 𝑢1 =0
𝜕𝑓
(𝜕𝑢 )𝑢1 =0 = (−2𝑢2 )𝑥 1=0 = 0
2 𝑢1 =0
𝑢2 =0
𝜕𝑓
Since all 𝜕𝑢 = 0, the current solution is optimal. Hence the optimal solution to the given problem is (by
1
Since both the partial derivatives are positive at 𝑥𝑁𝐵 = 0, the current solution is not optimum. The most
𝜕𝑓
positive partial derivative gives by 𝜕𝑥 , 𝑥2 must enter the basis.
2
𝛼
Which occurs for |𝛼30 | ; 𝑥3 will leave the basis, we have
32
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 13
Expressing the new basic variable 𝑥𝐵 = (𝑥2 ) and 𝑓(𝑥) in terms of new non basic 𝑥𝑁𝐵 = (𝑥1 , 𝑥3 )
1 1 𝑥1 𝑥3 𝑥1 3
𝑥2 = 1 − 2 𝑥1 − 2 𝑥3 and 𝑓 = 2𝑥1 + 3 (2 − − ) − 𝑥12 = 6 + − 2 𝑥3 − 𝑥12
2 2 2
𝜕𝑓 2 3
(𝜕𝑥 )𝑥1 =0 = (− 3) = −2
3 𝑥 1=0
𝑥3 =0 𝑥3 =0
𝜕𝑓 𝜕𝑓
Since 𝜕𝑥 > 0, the current solution is not optimal and 𝑥1 must enter the basis as 𝜕𝑥 is most positive. To
1 1
1 𝜕𝑓 1 1 1
𝑢1 = 2 𝜕𝑥 = 2 (2 − 2𝑥1 ) = 4 − 𝑥1
1
∴ New basic variables, 𝑥𝐵 = (𝑥1 , 𝑥2 ) and set of non-basic variables 𝑥𝑁𝐵 = (𝑥3 , 𝑢1 )
Expressing the basic variables 𝑥𝐵 and objective function 𝑓(𝑥) entirely in terms of 𝑥𝑁𝐵 , we have
1
𝑥1 = 4 − 𝑢1
1 1 1 1 15 1 1
𝑥2 = 2 (4 − 𝑥1 − 𝑥3 ) = 2 − 2 (4 − 𝑢1 ) − 2 𝑥3 = + 2 𝑢1 − 2 𝑥3
8
1 15 1 1 1 2 97 3 1
And 𝑓(𝑥) = 2 (4 − 𝑥1 ) + 3 ( 8 + 2 𝑢1 − 2 𝑥3 ) − (4 − 𝑢1 ) = 16 − 2 𝑥3 − 3 𝑢12
𝜕𝑓
(𝜕𝑢 )𝑥3 =0 = (−2𝑢1 )𝑥3 =0 =0
1 𝑢1 =0
𝑢1 =0
𝜕𝑓
Since all ≤ 0, for all 𝑥𝑗 ∈ 𝑥𝑁𝐵 , the current solution is optimal. Find the solution putting 𝑥3 = 𝑢1 = 0
𝜕𝑥𝑗
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 14
Subject to: 𝒙𝟏 + 𝟐𝒙𝟐 ≤ 𝟒
𝒙 𝟏 + 𝒙𝟐 ≤ 𝟐
𝒙 𝟏 , 𝒙𝟐 ≥ 𝟎
Solution: Introducing slack variable 𝑥3 ≥ 0, 𝑥4 ≥ 0 in the 1st and 2nd constraints, the standard form of
the problem become
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑓(𝑥) = −2𝑥1 + 3𝑥2 − 2𝑥22
Subject to: 𝑥1 + 2𝑥2 + 𝑥3 = 4
𝑥1 + 𝑥2 + 𝑥4 = 2
𝑥1 , 𝑥2 , 𝑥3 𝑥4 ≥ 0
Let arbitrarily basic variable 𝑥𝐵 = (𝑥3 𝑥4 ) and Non-basic variables 𝑥𝑁𝐵 = (𝑥1 , 𝑥2 ) initial
∴ 𝑥3 = 4, 𝑥4 = 2 𝑎𝑛𝑑 𝑥1 = 𝑥2 = 0.
Expressing basic variables 𝑥𝐵 and object function 𝑓(𝑥) entirely interms of 𝑥𝑁𝐵 .
We get, 𝑥3 = 4 − 𝑥1 − 4𝑥2
𝑥4 = 4 − 𝑥1 − 𝑥2
and 𝑓(𝑥) = 2𝑥1 + 3𝑥2 − 2𝑥22
𝜕𝑓
(𝜕𝑥 )𝑥1 =0 = (−2)𝑥 1=0 = −2
1 𝑥2 =0
𝑥2 =0
𝜕𝑓
( ) = (3 − 4𝑥2 )𝑥 1=0 = 3
𝜕𝑥2 𝑥1 =0 𝑥2 =0
𝑥2 =0
𝜕𝑓
Here at least one derive is positive and 𝜕𝑥 is most positive. So 𝑥2 must enter the basis.
2
variable defined by
1 𝜕𝑓 1 3
𝑢1 = 2 𝜕𝑥 = 2 (3 − 4𝑥2 ) = 2 − 2𝑥2
2
∴ 𝑠𝑒𝑡 𝑜𝑓 𝑏𝑎𝑠𝑖𝑐 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑥𝐵 = (𝑥3, 𝑥4, 𝑥2 ) and set of non-basic variable 𝑥𝑁𝐵 = (𝑥1 , 𝑢1 )
Expressing the new basic variable 𝑥𝐵 = (𝑥3, 𝑥4, 𝑥2 ) and 𝑓(𝑥) in terms of new non basic 𝑥𝑁𝐵 = (𝑥1 , 𝑢1 )
3 1 1
𝑥2 = 4 − 2 𝑢1 − 2 𝑥3
3 1
𝑥3 = 4 − 𝑥1 − 4 (4 − 2 𝑢1 ) = 1 − 𝑥1 + 2𝑢1
4 1 5 1
𝑥4 = 2 − 𝑥1 (3 − 2 𝑢1 ) = 4 − 𝑥1 + 2 𝑢1
3 𝑢1 3 𝑢1 2 9 3 9 3 𝑢12
and 𝑓 = −2𝑥1 + 3 (4 − ) − 2 (4 − ) = −2𝑥1 + 4 − 2 𝑢1 − 2 (16 − 4 𝑢1 + )
2 2 4
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 15
9 1
= 8 − 2𝑥1 − 2 𝑢12
3 5 9
𝑥2 = 4 , 𝑥3 = 1, 𝑥4 = 4 , 𝑥1 = 0 and 𝑓(𝑥) = 8
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 16
𝜕𝑓
Here 𝜕𝑥 is most positive. So 𝑥1 must enter the basis.
1
𝜕𝑓 3 1
(𝜕𝑥 )𝑥2 =0 = (−1 + 2 𝑥2 − 2 𝑥3 ) = −1
3 𝑥 2=0
𝑥3 =0 𝑥3 =0
𝜕𝑓
Since at least one > 0 , the current solution is not optimal and it can be improved clearly 𝑥2 will
𝜕𝑥𝑁𝐵
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 17
𝜕𝑓 3 3 18 6 1
(𝜕𝑥 )𝑥3 =0 = [13 − 1 + 26 (2 − 4𝑢1 ) + 26 𝑥3 − 52 (2 + 3𝑥3 − 4𝑢1 ) − 2 𝑥3 ]𝑥 2=0
3 𝑥3 =0
𝑢1 =0
10 6 12 9
=− + 26 − 52 = − 13
3
𝜕𝑓 4 12 8 4 4
(𝜕𝑢 )𝑥3 =0 = [− 13 − 26 𝑥3 + 52 (2 + 3𝑥3 − 4𝑢1 )] = − 13 + 13 = 0
1 𝑥 3=0
𝑢1 =0 𝑢1 =0
𝜕𝑓
Since 𝜕𝑥 ≤ 0 for 𝑥𝑗 ∈ 𝑥𝑁𝐵 . so the current solution is optimal. The optimum solution is
𝑗
38 2 116
𝑥1 = 13 , 𝑥2 = 13 and 𝑓(𝑥) = 13
𝜕𝑓(𝑥)
and ( ) = 0 for each 𝑖
𝜕𝑢𝑖 𝑥𝑁𝐵=0
𝑢=0
𝜕𝑓(𝑥)
but ( ) ≠ 0 for same 𝑖 = 𝑟 ;then introduce a new non-basic variable 𝑢𝑗 , defined by
𝜕𝑢𝑖 𝑥𝑁𝐵=0
𝑢=0
1 𝜕𝑓(𝑥)
𝑢𝑗 = 2 𝜕𝑢𝑟
#### Solve the auxiliary L.P.P by simplex method until either of the following tree cases do arise:
(i) 𝑀𝑎𝑥 𝑧 ∗ < 0 and at least one artificial variable appears in the optimum basis at positive level.
(ii) 𝑀𝑎𝑥 𝑧 ∗ = 0 and at least one artificial variable appears in the optimum basis at zero level.
(iii) 𝑀𝑎𝑥 𝑧 ∗ = 0 and no artificial variable appears in the optimum basis
In case (i) given L.P.P. does not possesses any feasible solution whereas in cases (ii) and (iii) we proceed
on to phase II. ]
Dr.Md. Syful Islam, Assistant Professor, Dept. of Statistics, Chittagong College (01718558010) 18