Docsity

Optimization Methods Online Midterm Examination with Answers, Exams of Nursing

Toggle sidebar
bg1
FTEC 2101-ESTR2520 Optimization Methods
Online Midterm
Examination with Answers
Policy:
•Full marks will be given for completely solved problem with well justification. You
will receive partial mark if you demonstrate sufficient understanding of the
question and its solution, otherwise you will receive zero
mark .
•The examination is open book and open notes, however, it must be done on your
own. You should write your original solution, without soliciting any help from a
third party. To ask for clarification on the midterm questions, please ‘raise your
hand’ in Zoom.
Problem 1. (25%) Consider the following linear programming problem in standard form:
max
x1,x2,x
3
−x
1
+ 2x
2
+ 3x
3
set −x
1
+ x
2
≤ 3
−x
2
+
2x
3
≤ 2
x1 −
3x3 ≤ 6,
x
1
,
x
2
, x
3
≥ 0.
Apply the simplex method to find an optimal solution to the
LP
problem or to show
that the
LP
problem is unbounded. You may initialize the simplex method with a
solution satisfying (x
1
, x
2
, x
3
)
=
(0, 0, 0).
Solution. We begin by introducing the slack variables and rewriting the problem
in the canonical form:
max z
x1,x2,x3,s1,s2,s3,z
set z + x
1
− 2x
2
− 3x
3
= 0
−x
1
+
x
2
+
s
1
=
3
−x
2
+ 2x
3
+ s
2
= 2
x
1
− 3x
3
+ s
3
= 6,
x
1
, x
2
, x
3
, s
1
, s
2
, s
3
≥ 0.
It is clear that we can take s1, s2, s3 as the initial basis which will lead to a feasible
CPF solution. We
thus form the simplex table:
B
V
z
x
1
x
2
x
3
s
1
s
2
s
3
RH
S
z
1 1
-2 -3
0 0 0 0
s
1
0
-1
1 0 1 0 0 3
s
2
0 0
-1
2 0 1 0 2
s
3
0 1 0
-3
0 0 1 6
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Optimization Methods Online Midterm Examination with Answers and more Exams Nursing in PDF only on Docsity!

FTEC 2101-ESTR2520 Optimization Methods Online Midterm

Examination with Answers

Policy:

- Full marks will be given for completely solved problem with well justification. You will receive partial mark if you demonstrate sufficient understanding of the

question and its solution, otherwise you will receive zero mark.

- The examination is open book and open notes, however, it must be done on your own. You should write your original solution, without soliciting any help from a

third party. To ask for clarification on the midterm questions, please ‘raise your hand’ in Zoom.

Problem 1. (25%) Consider the following linear programming problem in standard form:

max x 1 ,x 2 ,x 3

− x 1 + 2x 2 + 3x 3

set − x 1 + x 2 ≤ 3 − x 2 + 2x 3 ≤ 2 x 1 − 3x 3 ≤ 6, x 1 , x 2 , x 3 ≥ 0.

Apply the simplex method to find an optimal solution to the LP problem or to show

that the LP problem is unbounded. You may initialize the simplex method with a

solution satisfying (x 1 , x 2 , x 3 ) = (0, 0, 0).

Solution. We begin by introducing the slack variables and rewriting the problem

in the canonical form: max z x 1 ,x 2 ,x 3 ,s 1 ,s 2 ,s 3 ,z set z + x 1 − 2x 2 − 3x 3 = 0 − x 1 + x 2 + s 1 = 3 − x 2 + 2x 3 + s 2 = 2 x 1 − 3x 3 + s 3 = 6,

x 1 , x 2 , x 3 , s 1 , s 2 , s 3 ≥ 0.

It is clear that we can take s 1 , s 2 , s 3 as the initial basis which will lead to a feasible

CPF solution. We thus form the simplex table:

B

V

z x 1 x 2 x 3 s 1 s 2 s 3 RH S z 1 1 -2 -3 0 0 0 0 s 1 0 -1 1 0 1 0 0 3 s 2 0 0 -1 2 0 1 0 2 s 3 0 1 0 -3 0 0 1 6

  

2

1 − 5 / 2 0 0 7 / 2 3 / 2 0 27 / 2 

R 2 +R 1 /2 → R 2

0 0 − 1 / 2 1 0 1 / 2 0 1 R 3 + 3 

R

1 / 2 → R 3 0 1 − 3/2 0 0 3/2 1 9 R 0 +7R 1 /2 → R (^0)  0 − (^1 1 0 1 0 0 3)  −→ 0 − 1/2 0 1 1/2 1/2 0 5/

0 − 1/2 0 0 3/2 3/2 1 27/

Notice that the 2nd column consists of only negative coefficients. Thus the LP problem is

unbounded.

Problem 2. (25%) Answer the following questions:

(a) (5%) Draw (or sketch) the feasible set for the following linear optimization:

max x 1 ,x 2 ∈ R

x 1 + x 2 s.t. x 1 ≥ 0, x 2 ≥ 0, max { x 1 , x 2 } ≤ 1.

Find all the optimal solutions to the above LP using the graphical method.

(b) (10%) Draw (or sketch) the feasible set for the following linear optimization:

max x 1 ,x 2 ∈ R

x 1 +

x 2

s.t.

x 1

x 2

r x 1

√ x

Find all the optimal solutions to the above problem using the graphical method.

2

{ } ≤ ≤ ≤

2

x 1 ,x 2 ∈R

1

1 2 2

2

(c) (10%) Draw (or sketch) the feasible set for the following linear optimization:

max x +

x

s.t.

x

x

≥ 0 , min max { x , x } ,

r x 1

x ≤ 1.

Find all the optimal solutions to the above problem using the graphical method.

Solution:

(a) Notice that the constraint max x 1 , x 2 1 is equivalent to x 1 1,

and x 2 1 simultaneously. The feasible region is thus

sketched as:

Applying the graphical method shows that the only optimal solution is (1, 1) with

an optimal objective value of 2.

(b) The feasible region is sketched as:

Applying the graphical method shows that the only optimal solution is (2, 0) with

an optimal objective value of 2.

(c) Notice that satisfying the constraints min max { x 1 , x 2 } ,

x 1

x 2

≤ 1, x 1 ≥

0, x 2 ≥ 0 is

2

1 2

— −

! (^)!

2

−

Applying the graphical method shows that there are two optimal solutions: (1, 1)

AND (2, 0). Both have an optimal objective value of 2.

Problem 3. (25%) Answer the following question on convex functions.

(a) (5%) Let a ∈ R and b ≥ 0 be given. Consider the following set

X = { x, y ∈ R : y > 0 }

Consider the function f : X

→ R ,

f (x, y)

=

(x − a)

2

b y

Evaluate the gradient vector ∇ f (x, y) and the Hessian matrix ∇

2 f (x, y).

(b) (10%) Show that f (x, y) in part (a) is a convex function for all (x, y) ∈ X.

(c) (10%) Set b > 0 and consider the function g : X → R ,

x 2 g(x, y) = −^ b y

Show that g(x, y) is not a convex function. (Hint: check the non-PSD-ness of the

Hessian matrix by fixing (x, y).)

Solution.

(a) The gradient and Hessian are given as:

2(x − a) y (^2 2) y^ − 2(xy − a)

∇ f (x, y)

(x a)^2 +b y^2

, ∇ f (x, y) = − 2(x − a)y

2((x a)^2 +b)

y^3

(b) Our idea is to check the PSD-ness of ∇ 2 f (x, y). Observing that

2 2 y

2 − y(x − a) 0 0 ∇ f (x, y) = y

3

2

− y(x − a) (x − a)

2 +^

0 2b/y

3

(a) (5%) You want to formulate an optimization problem to design your study plan,

i.e., amount of time spent on studying each course, with the following

specifications:

- The objective is to maximize the GPA. - You spend less than or equal to 30 hours per week on studying.

1 The above setting is almost identical to the Problem 2 of HW1.

0

- The grade point for the course FCEC2101 has to be greater than or

equal to 3.0. Formulate an optimization problem to achieve the above

goal.

(b) (10%) Rewrite the optimization problem formulated in (a) as a linear program in

standard form.

(c) (10%) We consider a different case where the grade point for the courses is calculated according to a quantized system. In particular, suppose you spend xA

hours per week on course A, then the grade point of course A is given by Q (xA)

such that

4xA if 1 > difficulty of course A

0, then Q (xA

4xA if 2 > difficulty of course A

1, then Q (xA

4xA if 3 > difficulty of course A

2, then Q (xA

4xA if 4 > difficulty of course A

3, then (^) Q (xA

4xA if difficulty of course A

4, then (^) Q (xA

Formulate a mixed-integer optimization problem to design your study plan such

that

- The objective is to maximize the GPA. - You spend less than or equal to 30 hours per week on studying.

Hint: You may first formulate the problem while keeping the Q ( · ) notation; also,

observe that

Q (xA) = 0 or 1 or · · · or 4.

You are not required to solve any of the optimization problems formulated in the above.

Solution.

(a) The decision variables are:

5 {

zC ≥ 0 ,

z

C ≤ min

12 ,

12 xC 5

.

2

Thus, the overall optimization problem is given as:

max x A ,x B , x C

min 16,

4x 10 A

} + min

{ 12, 4xB }^ +^ min^ 12,^

12xC

s.t. xA + xB + xC ≤ 30, xA ≥ 0, xB ≥ 0, xC ≥ 0, xC ≥ 15/4.

(b) To rewrite the above optimization problem, we introduce the slack variables zA, zB,

zC and observe the following equivalent form

1 ma x x A ,x B ,x C ,z A ,z B ,z C

(zA + zB + zC)

s.t. xA + xB + xC ≤ 30, xA ≥ 0, xB ≥ 0, xC ≥ 0, xC ≥ 15/ zA ≥ 0, zA ≤ min { 16,

4xA } , zB ≥ 0, zB ≤ min

{ 12, 4xB } ,

Replacing zA ≤ min { 16, 4xA } by zA ≤ 16, zA ≤ 4xA, ..., lead to 1 ma x x A ,x B ,x C ,z A ,z B ,z C

(zA + zB + zC)

s.t. xA + xB + xC ≤ 30, xA ≥ 0, xB ≥ 0, xC ≥ 0, xC ≥ 15/ zA ≥ 0, zA ≤ 16, zA ≤ 4xA, zB ≥ 0, zB ≤ 12, zB ≤ 4xB,

zC ≥ 0, zC (^) ≤ 12,

zC

12xC

≤ 5

This is a standard form LP as desired.

(c) We set the following as decision variables:

xA – amt. of time on EGGG3100, xB – amt. of time on FCEC1200, xC – amt. of time

on FCEC

zA – GP of EGGG3100, zB – GP of FCEC1200, zC – GP of FCEC

The objective is thus to maximize:

The constraints

are: and

(4zA + 3zB + 3zC)

xA + xB + xC ≤ 30, xA ≥ 0, xB ≥ 0,

xC ≥ 0. zA = Q (xA), zB = Q (xB), zC =

3

Q (xC).

Overall, we have the optimization problem:

1 max x A ,x B ,x C ,z A ,z B ,z C 10

(4zA + 3zB + 3zC)

s.t. xA + xB + xC ≤ 30, xA ≥ 0, xB ≥ 0, xC ≥ 0, zA = Q (xA), zB = Q (xB), zC = Q (xC).