






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







1. (15 points) Formulate the following problem as a linear program. Your inequalities should be preceded by a definition of the variables in clear concise English.
Suppose that a farmer has a piece of farm land, say L km^2 , to be planted with either wheat or barley or some combination of the two. The farmer has a limited amount of fertilizer, F kilograms, and insecticide, P kilograms. Every square kilometer of wheat requires F 1 kilograms of fertilizer, and P 1 kilograms of insecticide, while every square kilometer of barley requires F 2 kilograms of fertilizer, and P 2 kilograms of insecticide. Let S 1 be the selling price of wheat per square kilometer, and S 2 be the price of barley. How many square kilometers of the area of land should the farmer plant with wheat and barley in order to maximize the profit?
Solution:
If we denote the area of land planted with wheat and barley by x 1 and x 2 respectively, this problem can be formulated as:
2. (15 points) Formulate the Knapsack Problem.
Solution:
We have n kinds of items, 1 through n. Each kind of item i has a value v (^) i and a weight wi. Assume that all values and weights are nonnegative. The maximum weight that we can carry in the bag is W.
Let x (^) i be the decision variable whether the i th^ item is chosen ( xi = 1) or not ( x (^) i = 0). The knapsack problem can be formulated as:
max
s.t.
x
3. (50 points) Consider the following linear programming problem P1: max s. t.
J = − x 1 − 4 x 2 x 2 ≥ x 1 + 1
P1:
x 2 ≥ − x 1 + 3 x 2 ≤ 6 x 2 ≥ 0 x 1 ≤ 10
3.1. (10 points) Solve this problem graphically in Figure 1. Give the optimal cost as well as the point ( x 1 , x 2 ) at which it is obtained.
7 6 5 4 3 2 1 0
-4 -2 0 2 4 6 8 10 x
Figure 1
(Please look at “MidtermSolu3.1”, found below)
3.4. (10 points) Shade in Figure 2 the feasible set of the MILP P3 in 3.3:
x
7 6 5 4 3 2 1 0
-4 -2 0 2 4 6 8 10 x
Figure 2
(Please look at “MidtermSolu3.4,” found below)
x
3.5. (10 points) Solve the MILP P3 in 3.3. Explain your reasoning, you can illustrate on Figure 3.
7 6 5 4 3 2 1 0
-4 -2 0 2 4 6 8 10 x
Figure 3
(Please look at “MidtermSolu3.5,” found below )
Change variable back, so the maximum is 1, which is obtained at
⎢ (^) ( 2 k + (^1) )θ (^) ( 2 k + (^1) )θ ⎢ (^) π ⎢ cos^ +^ 3,^ sin^ +^2 ⎢ , where k = 0, 1, 2, ..., 7, and^ θ^ =^. ⎢ 2 2 ⎢ 4 Numerically, they are (3.9239, 2.3827) (3.3827, 2.9239) (2.6173, 2.9239) (2.0761, 2.3827) (2.0761, 1.6173) (2.6173, 1.0761) (3.3827, 1.0761) (3.9239, 1.6173)
10/24/
3. (50 points) Consider the following linear programming problem PI: max J =-xi 4x:
X (^) " > + PI: .r" S 6 ;::: XI s 10
3.1. (10 points) Solve this problem graphically in Figure 1. Give the optimal cost as well as the point (XI ,x::) at which it is obtained.
I
6 5·
4
3 C\Jx (^2)
1 c-
O
I
I S'J I.(.1 (
f
i "^ , \I 4-. I_
, - -4)
L' f 1 \ 'Y"\ Cl ( <' I + __ ')
(1 (^) )
J
6
7
10/
3.5. (10 points) Solve the MILP P3 in 3.3. Explain your reasoning, you can illustrate on Figure 3.
6 iI 7, /,' /'
" ,:, (/
'.< /
C\J x 2
0 -1 ,
i
-. I "-- .....-~ -4 -2 0 2 4 6 8 10 x Figure 3
c, I . (^) Ii JILl) ') c·, ,,," '.. '1 .' ,
.\ , i.">
: ~t^ L'^ ..J.....^ Cft'l",l..tC(^ L~^ C;^ t^ '-'^ .;^ ^ ')^ i^ ,"'>^ '>
-,
-,