Sheets 1 - 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Course Code: GN331

Course Title: Optimization Techniques Arab Academy for Science,


Semester: Spring 2023 Technology, and Maritime Transport
Lecturer(s): Dr. Muhammad Saad Collage Artificial Intelligence

Sheet #1
1. If A = 3i + 2j − k and B = 6i + 3k. Find the vectors 4A and A − 2B in R3 .

2. If A = 3i + 2j − k, evaluate A .

3. Find the unit vector in the direction of S = ⟨3, −5, 2⟩.


4. If A = 4i + 2j − k and B = 2i − 5j + 3k, evaluate A · B.

5. Consider the scalar field φ defined by φ(x, y, z) = 3x 2 z 2 + xy3 + 15. Find φ at the points: (a) (0, 0, 0),
(b) (1, −2, 2), (c) (−1, −2, −3).
6. Let A = 2xz 2 i − yzj + 3xz 3 k and φ = x 2 yz. Find A, at the point (1, 1, 1):

7. Evaluate the gradient for φ(x, y, z) = x 2 + sin z ln y at the point 2, 1, π2 .
8. If φ = 3x 2 z − y2 z 3 + 4x 3 y + 2x − 3y − 5, evaluate ∇2 φ at the point (1, 2, 1).
9. Find the unit normal vector to the surface x2 + y2 = 2 cos 2z at the point (1, −1, 0).
10. Find the directional derivative of x 2 yz + 4xz 2 at the point (1, −1, 1) in the direction 2i − j − 2k.

11. Find the directional derivative of φ = 4ex−2y+3z at the point (1, −2, 0) in the direction toward the
point (3, 4, 3).
12. Find the directional derivative of the function F (x, y, z) = 2z 3 − 3(x 2 + y2 )z at he point (1, 1, 1) along
the y-axis and also long the vector a = ⟨1, 2, −2, ⟩.
13. In what direction from the point (1, 2, 3) is the directional derivative of φ = 2xz − y2 maximum? and
what is the magnitude of this maximum?
14. Find the rate of change of the function g(x, y, z) = x 2 yz 3 + 4xz 3 at the point (1, −2, −1) in the
direction of the vector 2i − j − 2k.
15. Find the directional derivative of ψ = xy2 z 3 in the direction of normal vector of the surface x 2 + xy2 +
yz 2 = 7 at the point (1, 2, 1).
16. Find a unit vector that is perpendicular to the surface of the paraboloid of revolution z = x 2 + y2 at
the point (1, 2, 5). P
   
3 2 1 −3 2 −3 7 6
   
17. If A =  2 −4 3 0  and B =  −4 −5 0 −2 , find A + B and A − B.
6 0 −1 5 2 4 −3 5
 
−2 3
 
18. If A =  0 1 , find 2A and −3A.
4 2
   
" # 1 3 5 1 3
1 4 −5    
19. For the matricies A = , B =  8 9 0 , and C =  0 −1 , verifify the existance
1 3 6
1 3 4 1 2
of the mtricies AB, BA, BC , C B, C A, and AC .

1
Course Code: GN331
Course Title: Optimization Techniques Arab Academy for Science,
Semester: Spring 2023 Technology, and Maritime Transport
Lecturer(s): Dr. Muhammad Saad Collage Artificial Intelligence

   
0 1 2 1 0 1
   
20. Let A =  2 3 4  and B =  −3 2 0 . Evaluate the following matrices:
4 5 6 2 −1 1

(a) B − A; (b) 2A + 3B; (c) 3A − 2B; (d) AB; (e) BA.


 
−3 2 −5
 
21. If A =  −1 0 −2 , find AT , adj (A), and A−1 .
3 −4 1
   
1 2 0 1 2 0
   
22. Let A =  0 1 1  and B =  0 1 1 . Find:
0 0 1 1 1 1

(a) the inverse of A.


(b) Find the matrix C such hat AC A − AB = 0.
(c) Find the matrix D such hat AD + B = I.

23. Determine wether each of the following matrices is positive definite, positive semidefinite, negative
definite, negative semidefinite, or indefinit.
" #  
1 2 −2 −1 0
(a) ;  
2 3 (d)  −1 −2 1 ;
0 1 −1
" #  
−4 −5 −1 2 1
(b) ;  
−5 1 (e)  2 1 1 ;
1 1 3
   
1 5 0 −1 2 0
   
(c)  5 1 3 ; (f)  2 1 1 ;
0 3 1 1 1 1

24. Evaluate the Hessian matrix for the following functions at the corresponding points:

(a) f(x, y) = exy + y2 x, (0, −2).


(b) f(x, y, z) = x y − 5x y − y6 z 2 − 3xyz,
3 2 2 2
(2, −1, 3).
(c) f(x1 , x2 , x3 ) = x3 tan(x12 − x22 ) + x1 x2 ln x3 , (2, −2, 3).
cos(x − y) 2 2
(d) f(x, y) = + ex −y ) , (π, π/2)
x
z
(e) f(x, y, z) = xe2y sin , (3, 0, π).
2

2
Course Code: GN331
Course Title: Optimization Techniques Arab Academy for Science,
Semester: Spring 2023 Technology, and Maritime Transport
Lecturer(s): Dr. Muhammad Saad Collage Artificial Intelligence

Sheet #2
1. (a) Sketch (it details) the feasible regions the given linear programming problems, (b) find the extreme
points of the set of feasible solutions, and (b) find the optimal solution(s).
Maximize z= x + 2y Minimize  = 5x − 3y
w

 3x + y ≤ 6 
 x + 2y ≤ 4
(a) 

subject to 3x + 4y ≤ 12 (d) x + 3y ≥ 6 .

 subject to
x, y ≥ 0 
 x1 + x2 ≥ 3

 x, y ≥ 0
Maximize z= 3x + y

 −3x + y ≥ 6 Miximize z= 2x + 3y
(b) .
subject to 3x + 5y ≤ 15 
 3x + y ≥ 0

 

x, y ≥ 0  x +y ≤
 6
(e) .
Maximize z= 2x1 + 5x2 subject to y ≤ 4



 x + 2y ≤ 6

 2x1 + x2 ≥ 2 


 x, y ≥ 0

 x1 + x2 ≤ 8
(c) .
subject to x1 + x2 ≥ 3



 2x1 + x2 ≤ 12

 x1 , x2 ≥ 0

2. A calculator company produces a scientific calculator and a graphing calculator. Long-term projections
indicate an expected demand of at least 100 scientific and 80 graphing calculators each day. Because
of limitations on production capacity, no more than 200 scientific and 170 graphing calculators can
be made daily. To satisfy a shipping contract, a total of at least 200 calculators much be shipped
each day.
3. A company manufactures and sells two models of lamps, L1 and L2. To manufacture each lamp, the
manual work involved in model L1 is 20 minutes and for L2, 30 minutes. The mechanical (machine)
work involved for L1 is 20 minutes and for L2, 10 minutes. The manual work available per month is
100 hours and the machine is limited to only 80 hours per month. Knowing that the profit per unit
is 10 for L1 and L2, respectively, determine the quantities of each lamp that should be manufactured
to obtain the maximum benefit.
4. Let’s say a FedEx delivery man has 6 packages to deliver in a day. The warehouse is located at point
A. The 6 delivery destinations are given by U, V, W, X, Y, and Z. The numbers on the lines indicate the
distance between the cities. To save on fuel and time the delivery person wants to take the shortest
route.

3
Course Code: GN331
Course Title: Optimization Techniques Arab Academy for Science,
Semester: Spring 2023 Technology, and Maritime Transport
Lecturer(s): Dr. Muhammad Saad Collage Artificial Intelligence

Sheet #3
1. Solve the following linear programming problems using the simplex methods:
Maximize z= x1 + 2x2
 3x1 + x2 ≤
 6
(a) .
subject to 3x1 + 4x2 ≤ 12

 x1 , x2 ≥ 0
" #
x1
Maximize z = [2 5]
x2


 x1 ≤ 4
(b) 
 .
x2 ≤ 6
subject to

 x1 + x2 ≤ 8

 x1 , x2 ≥ 0

Maximize  z = 6x1 + 4x2 + 7x3 + 6x4



 x1 + 2x2 + x3 + 2x4 ≤ 20


(c) 7x1 + 4x2 + 3x3 + 2x4 ≤ 100 .
subject to

 3x 1 + 4x2 + 9x3 + 12x4 ≤ 75

 x1 , x2 , x3 , x4 ≥ 0
 
    6
Maximize w (=c x
T
0 2 0 1 7  
     1 
(d) Ax ≤ b , where A =  1 1 0 0 , b =  8 , and c =  .
subject to  4 
x ≥ 0 0 3 1 0 9
5

2. A merchant plans to sell two models of home computers at costs of $250 and $400, respectively. The
$250 model yields a profit of $45 and the $400 model yields a profit of $50. The merchant estimates
that the total monthly demand will not exceed 250 units. Find the number of units of each model that
should be stocked to maximize profit. Assume that the merchant does not want to invest more than
$70,000 in computer inventory.

3. A company has budgeted a maximum of $600,000 for advertising a certain product nationally. Each
minute of television time costs $60,000 and each one-page newspaper ad costs $15,000. Each
television ad is expected to be viewed by 15 million viewers, and each newspaper ad is expected to
be seen by 3 million readers. The company’s market research department advises the company to
use at most 90% of the advertising budget on television ads. How should the advertising budget be
allocated to maximize the total audience?

4. Write a simple Python function that implements the simplex algorithm. The inputs are c, A, b, and v,
where v is the vector of indices of basic columns. Assume that the augmented matrix [A, b] is already
in canonical form. The function should output the final solution and the vector of indices of basic
columns. Test the Python function on the problem in Example 4.

4
Course Code: GN331
Course Title: Optimization Techniques Arab Academy for Science,
Semester: Spring 2023 Technology, and Maritime Transport
Lecturer(s): Dr. Muhammad Saad Collage Artificial Intelligence

Sheet #4
Lecture Problems:
1. Solve the following linear programming problems using the dual simplex methods:
Minimize z= 3x1 + 2x2

 2x1 + x2 ≥ 6
(a) .
subject to x1 + x2 ≥ 4

 x1 , x2 ≥ 0
 
x1
 
Minimize z = [2 10 8]  x2 
x3

(b) 
 x1 + x2 + x3 ≥ 6 .


x2 + 2x3 ≥ 8
subject to

 −x 1 + 2x 2 + 2x3 ≥ 4

 x1 , x2 , x3 ≥ 0
Maximize  z = 3x1 + 2x2 + 4x3

 3x1 + 2x2 + 5x3 ≤ 18


(c) 4x1 + 2x2 + 3x3 ≤ 16 .
subject to

 2x1 + x2 + x3 ≥ 4

 x1 , x2 , x3 ≥ 0
Minimize w = 4x1 + 2x2 + x3

 2x1 + 3x2 + 4x3 ≤ 14


(d) 3x1 + x2 + 5x3 ≥ 4 .
subject to

 x1 + 4x2 + 3x3 ≥ 6

 x1 , x2 , x3 ≥ 0

2. A steel company has two mills. Mill 1 costs $70,000 per day to operate, and it can produce 400
tons of high-grade steel, 500 tons of medium-grade steel, and 450 tons of low-grade steel each day.
Mill 2 costs $60,000 per day to operate, and it can produce 350 tons of high-grade steel, 600 tons
of medium-grade steel, and 400 tons of low-grade steel each day. The company has orders totaling
100,000 tons of high-grade steel, 150,000 tons of medium-grade steel, and 124,500 tons of low-grade
steel. How many days should the company run each mill to minimize its costs and still fill the orders?

3. A warehouse operator has 24,000 square meters of floor space in which to store two products. Each
unit of product I requires 20 square meters of floor space and costs $12 per day to store. Each unit
of product II requires 30 square meters of floor space and costs $8 per day to store. The total storage
cost per day cannot exceed $12,400

You might also like