hw2-answers

hw2-answers - IE426 Problem Set #2 Answers Prof Jeff...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
IE426 Problem Set #2 – Answers Prof Jeff Linderoth IE 426 – Problem Set #2 — Answers 1 LP Knowledge For each of the problems in this section, you should determine which of the characterizations below best describes the linear program. The linear program may fall into more than one category, in which case write all characterizations that apply. A Unique Optimal B Multiple Optima C Infeasible D Unbounded E Degenerate 1.1 Problem min - x 1 - x 2 s.t. 6 x 1 + 2 x 2 8 - x 1 + x 2 0 x 1 0 x 2 0 Answer: D. Unbounded. 1.2 Problem max 3 x 1 + x 2 s.t. 6 x 1 + 2 x 2 8 - x 1 + x 2 0 x 1 0 x 2 0 Answer: D. Unbounded. 1.3 Problem min x 2 Problem 1 Page 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
IE426 Problem Set #2 – Answers Prof Jeff Linderoth s.t. x 1 1 6 x 1 + 2 x 2 8 - x 1 + x 2 0 x 1 0 x 2 0 Answer: A. and E. It is a unique optimum and degenerate 2 Least “Squares.” Warning. It is likely that you will need the XPRESS keyword is free . The set of six equations in four variables (1)—(6) does not have a unique solution. 1 8 x 1 - 2 x 2 + 4 x 3 - 9 x 4 = 17 (1) x 1 + 6 x 2 - x 3 - 5 x 4 = 16 (2) x 1 - x 2 + x 3 = 7 (3) x 1 + 2 x 2 - 7 x 3 + 4 x 4 = 15 (4) x 3 - x 4 = 6 (5) x 1 + x 3 - x 4 = 0 (6) For each equation i , and values of variables x = ( x 1 ,x 2 ,x 3 ,x 4 ) , let e i be the absolute difference (error) between the left hand side and the right hand side. For example, for i = 2 and x = ( - 5 , 3 , 1 , 4) , the error is e 2 = | (1)( - 5) + 6(3) - (1)(1) - 5(4) - 16 | = | - 24 | = 24 . 2.1 Problem Write a linear programming instance that will minimize the total absolute error: e 1 + e 2 + e 3 + e 4 + e 5 + e 6 Answer: min p 1 + n 1 + p 2 + n 2 + p 3 + n 3 + p 4 + n 4 + p 5 + n 5 + p 6 + n 6 1 Most six equations with four variables don’t. Problem 2 Page 2
Background image of page 2
IE426 Problem Set #2 – Answers Prof Jeff Linderoth s.t. 8 x 1 - 2 x 2 + 4 x 3 - 9 x 4 - 17 = p 1 - n 1 x 1 + 6 x 2 - x 3 - 5 x 4 - 16 = p 2 - n 2 x 1 - x 2 + x 3 - 7 = p 3 - n 3 x 1 + 2 x 2 - 7 x 3 + 4 x 4 - 15 = p 4 - n 4 x 3 - x 4 - 6 = p 5 - n 5 x 1 + x 3 - x 4 = p 6 - n 6 p 1 ,n 1 ,p 2 ,n 2 ,p 3 ,n 3 ,p 4 ,n 4 ,p 5 ,n 5 ,p 6 ,n 6 0 x 1 ,x 2 ,x 3 ,x 4 FREE 2.2 Problem Create the instance you wrote down for Problem 2.1 in the Mosel modeling language, and solve it. What is the minimum total error that can be achieved? What are the values for x ? Answer: Killing two birds with one stone, I simply wrote a general model for this problem. The data for the instance in Problem 2.1 is in the file ’ls-1.dat’. Here is the general model: ! ! A Least "Squares" model ! ! Author: Jeff Linderoth model "ls" uses "mmxprs" declarations NV: integer ! Number of variables NE: integer ! Number of equations end-declarations initializations from ’ls-1.dat’ NV NE end-initializations declarations N = 1. .NV M = 1. .NE a: array(M,N) of real b: array(M) of real end-declarations initializations from ’ls-1.dat’ a b end-initializations declarations x: array(N) of mpvar ! Values of x d: array(M) of mpvar ! Deviation Problem 2 Page 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

hw2-answers - IE426 Problem Set #2 Answers Prof Jeff...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online