x1 + 2x2 − 3x4 − x5 ≤ 0 − 15x1 + 30x2 − 35x3 + 45x4 + 45x5 ≥ 50

Transcription

x1 + 2x2 − 3x4 − x5 ≤ 0 − 15x1 + 30x2 − 35x3 + 45x4 + 45x5 ≥ 50
APPM 4120/5120, Spring 2015
HW 5
1. (Branch and Bound) Consider the following BIP:
Max Z = 3x1 + 3x2 + 5x3 − 2x4 − x5
subject to
x1 + 2x2 − 3x4 − x5 ≤ 0
− 15x1 + 30x2 − 35x3 + 45x4 + 45x5 ≥ 50
xi ∈ {0, 1}
Use the BIP branch-and-bound algorithm to solve this BIP. You can use Excel to solve the
LP’s that occur during the algorithm. Show the branching tree that results when you perform the algorithm, and clearly label the vertices of the tree with the solution to the corresponding LP and the resulting bound for Z.
2. (Bisection and Newton’s Method) Consider the following problem:
Maximize f ( x ) = x3 + 30x − x6 − 2x4 − 3x2
(a) Apply the bisection method to approximate teh solution to this problem. Use an error
tolerance of 0.07 and find approximate initial bounds by inspection.
(b) Apply Newton’s method with a tolerance of 0.001 and x0 = 1 to this problem.
3. (Convex Analysis)
(a) (Linear combinations of convex functions) Let f 1 ( x ), . . . , f k ( x ) : Rn → R be convex
functions and consider the function f defined by
f ( x ) : = α1 f 1 ( x ) + . . . + α k f k ( x ),
where αi > 0 for all i. Prove that f ( x ) is a convex function.
(b) (Convexity under compositions) Let C ⊂ Rn be convex. Let f = ( f 1 , . . . , f m ) where
f i : C → R are convex functions. Let g : Rm → R be convex and monotonically
nondecreasing. Show that the function h defined by h( x ) = g( f ( x )) is convex on C.
(Hint: Recall the algebra of f , it is linear in its components, for example, ( a f 1 ( x ) +
f (y), . . . , a f m ( x ) + f m (y)) = a( f 1 ( x ), . . . , f m ( x )) + ( f 1 (y), . . . , f m (y)).)
(c) Show the function f ( x ) = || x || p with p ≥ 1 is convex. Hint: Apply the triangle
inequlity on the norm to show its convex and use part (2) for the function f .
(d) Show the function f ( x ) = ag( x ) + b where g : Rn → R is convex and a, b are scalars
with a ≥ 0, is convex.
4. (KKT & Convexity) In class we had an example for the necessary conditions of KKT:
Minimize 6( x1 − 10)2 + 4( x2 − 12.5)2 ,
subject to
x12 + ( x2 − 5)2 ≤ 50
x12 + 3x22 ≤ 200
( x1 − 6)2 + x22 ≤ 37
We showed that x = (7, 6) is a candidate for an optimal solution.
(a) Show that x = (7, 6) is a candidate for an optimal solution, i.e., that it satisfies the
necessary conditions for KKT. (We did this in class, just write it up nicely ©)
(b) Show that the function f ( x1 , x2 ) = α1 ( x1 − a)2 + α2 ( x2 − b)2 + c where a, b, c ∈ R and
α1 , α2 ≥ 0 is convex.
(c) Conclude, using the sufficient KKT theorem from class, that x = (7, 6) is a global
optimum solution.
5. (KKT) Consider the following convex programming problem:
Maximize f ( x ) = 24x1 − x12 + 10x2 − x22 ,
subject to
x1 ≤ 10
x2 ≤ 15
x1 , x2 ≥ 0
Use the KKT conditions for this problem to derive an optimal solution.
6. (KKT) Consider the following problem:
Maximize f ( x ) = ln( x1 + 1) − x22 ,
subject to
x1 + 2x2 ≤ 3
x1 , x2 ≥ 0
Verify this is a convex programming problem. Use the KKT conditions for this problem to
derive an optimal solution.
7. (KKT) Consider the following problem:
Maximize f ( x ) =
x1
,
x2 + 1
subject to
x1 − x2 ≤ 2
x1 , x2 ≥ 0
Use the KKT conditions to demonstrate that (4, 2) is not an optimal solution.
8. Consider the following problem:
Minimize f ( x ) = ( x1 − 9/4)2 + ( x2 − 2)2 ,
subject to
x2 − x12 ≥ 0
x1 + x2 ≤ 6
x1 , x2 ≥ 0
Write down the KKT optimality conditions and verify that these conditions are satisfied at
the point (3/2, 9/4). Present a graphical interpretation of the KKT conditions at (3/2, 9/4).
Show that this is indeed the optimal solution.
9. Just for fun: Run the diet problem spreadsheet but impose the constraint that the decision
variables are integers. Then pure binary. Report the cost comparison for all sheets in the
workbook. (Some may not converge).
5120 Students
1. Consider a 3 × 3 game board
You are required to fill each square with a number between 1 and 9 such that the sum of
the numbers in each row, each column, and each diagonal equals 15. Additionally, the
numbers in all the squares must be distinct.
(a) Formulate an integer program to determine an assignment of numbers to squares.
(Since you are just trying to find a solution, your objective function can be anything.)
(b) Use Excel to solve the program. What is the solution? (When you enter the program
in Excel, you can specify in Solver that the variables need to be AllDifferent, which
will simplify solving the linear program in Excel. However, your answer to part (a)
cannot simply say that the variables are all different; you will need to find a way to
specify that as part of the integer program.)
2. Sudoku is a logic puzzle. In it, you are given a 9x9 grid with some integers 1 to 9 in various
squares. To solve this puzzle, you must fill in the remaining squares so that, in each row,
column, and 3 × 3 block, each number from 1 to 9 appears exactly once. Below is a sample
puzzle.
9
4 3 7
1
4
3
8 7
1
3
2 7
5
6
7 8
1 5
6
4
9
6
9
3
4 7
Unsolved Sudoku
(a) Formulate an integer program that will solve this given puzzle. What is the solution?
What is the objective function? Does it matter?
(b) (Harder) Given the initial solution that we started from, we can try to maximize the
number of those cells in a solution that contain a different number from the number
that occupies the same cell in the initial solution. If this number is zero, it means there
is no other solution than the one we already knew about. If this number is positive,
then our initial solution is not unique. This is clearly a linear objective function, as it
is simply the sum of some of the variables. What is the objective function here?
(c) (Harder still) What is the minimum number of clues we must give to make a Sudoku
problem uniquely solvable. Can you find the statement of the problem that does this?