Solutions for Homework 1, 550.361 Optimization, Fall 2013
Problem 1: Write a MATLAB function that minimizes f (x) = (x1)2 sin x subject to a x b,
where a and b are user input; your MATLAB function should be called yournameMinimizef.m,
and its rst line sho
Homework 6, 550.361 Optimization, Fall 2013
Problem 1: Recall that, by strong duality, there are exactly four possibilities for any linear
program LP and its dual DP. Namely, i) LP and DP are both feasible and have equal optimal
objective function values,
550.361 Optimization, Fall 2013, Hw2 Solutions
Problem 1: Geometrically solve the following LP:
x1 2x2
min
x1 x2 4
s.t.
3x1 2x2 18
3x1 + x2 9
x1 , x2 0
Again geometrically solve for each of the LPs with the same feasible region as above but with
respectiv
Homework 8, 550.361 Optimization, Fall 2013
Problem 1 Consider the following network, where each arc might or might not be operational;
the number next to each arc is the probability that the arc is indeed operational, independent of
the rest of the arcs.
function [solution,optimalobjfunct]=EmilyRamosMinimizef(a,b,h)
h = .001;
%my_x = a
my_min = 10^10
a= -1
b =3
for i =a:h:b
f= (i-1)^2)*sin(i);
if f < my_min
my_min = f;
end
end
[optimalobjfunct,p]=min(f);
solution=i(p);
end
function [m,xsolu,ysolu] = EmilyRamos(x,y)
xsolu=0;
ysolu=0;
m = -inf;
for x = 0:.001:6
for y = 0:.001:6
if y >= log(x)
if x + y <= 6
f= 1 + (x^2)*(y-1)^3)*exp(-x-y);
if f > m;
m = f;
xsolu= x;
ysolu= y;
end
end
end
end
end
end
%EmilyRamos
%ans =
%1.2677
function [solution,optimalobjfunct]=EmilyRamosMinimizef(a,b,h)
x=[a:h:b]; %contrained values for x
f=(x-1).^2.*sin(x); 0unction being minimized
[optimalobjfunct,p]=min(f); %minimizing f
solution=x(p);
end
%[solution,optimalobjfunct]=EmilyRamosMinimizef(-3
Homework 1, 550.361 Optimization, Fall 2011
You only need to do one of Problem 3 and Problem 7 (your choice); the other is extra
credit in the amount of 10% of the assignment. (Everyone should do Problems 1,2,4,5,6.)
All of what you submit should be your
Homework 3 Solutions, 550.361 Optimization, Fall 2011
Problem 1: Consider the linear program (LP) min cT x such that Ax = b, x 0 where
A=
1
2 1 1
b=
1
1
2
3
3
c = 4
5
a) Find all basic feasible solutions. (There are three possibilities, two of which are
550.361 Optimization, Fall 2011, Hw2 Solutions
Problem 1: Geometrically solve the following LP:
x1 2x2
min
x1 x2 4
s.t.
3x1 2x2 18
3x1 + x2 9
x1 , x2 0
Again geometrically solve for each of the LPs with the same feasible region as above but with
respectiv
Homework 3 Solutions, 550.361 Optimization, Fall 2012
Problem 1: Consider the linear program (LP) min cT x such that Ax = b, x 0 where
A=
1
2 1 1
b=
1
1
2
3
3
c = 4
5
a) Find all basic feasible solutions. (There are three possibilities, two of which are
Homework 3, 550.361 Optimization, Fall 2015
Problem 1: Consider the linear program (LP) min cT x such that Ax = b, x
2
A=4
1
2
1
1
1 1
3
5
2
b=4
2
3
3
5
2
6
6
4
c=6
3
0 where
3
7
7
4 7
5
5
a) Find all basic feasible solutions. (There are three possibiliti
Homework 3 Solutions, 550.361 Optimization, Fall 2013
Problem 1: Consider the linear program (LP) min cT x such that Ax = b, x 0 where
A=
1
2 1 1
b=
1
1
2
3
3
c = 4
5
a) Find all basic feasible solutions. (There are three possibilities, two of which are
Homework 5, 550.361 Optimization, Fall 2014
Problem 1: Write a MATLAB function that implements the Simplex Method. The first line of
your .m file should read as follows:
function [xsol,optimalobjective,basisfinal]=simplexYOURNAME(A,b,c,BAS)
and it should
Homework 3, 550.361 Optimization, Fall 2014
Problem 1: Consider the linear program (LP) min cT x such that Ax = b, x 0 where
A=
1
2 1 1
b=
1
1
2
3
3
c = 4
5
a) Find all basic feasible solutions. (There are three possibilities, two of which are basic feas
Homework 4, 550.361 Optimization, Fall 2014
You should do all of the work indicated in this hw and either write out your steps or do it in
MATLAB and make a MATLAB diary to submit. For now, you dont need to write a MATLAB
function. you may just do it inte
Homework 9, 550.361 Optimization, Fall 2014
Problem 1: Give an example of a shortest path instance with no negative length cycles (albeit,
with negative length edges) such that Dijkstras Algorithm fails to give the correct shortest paths.
Be sure to clear
Homework 6, 550.361 Optimization, Fall 2014
Problem 1: Recall that by strong duality there are exactly four possibilities for any linear
program LP and its dual DP. Namely, i) LP and DP are both feasible and have equal optimal
objective function values, i
Homework 7, 550.361 Optimization, Fall 2014
Problem 1 Recall that for a linear program in canonical form the condition of complimentary
slackness is that two particular pairs of vectors are complimentary to each other, in contrast to a
linear program in s
550.361 Optimization, Fall 2014, Homework 2
Problem 1: Geometrically solve the following LP:
x1 2x2
min
x1 x2 4
s.t.
3x1 2x2 18
3x1 + x2 9
x1 , x2 0
Again geometrically solve for each of the LPs with the same feasible region as above but with
respective o
Homework 1, 550.361 Optimization, Fall 2014
You may discuss mathematics ideas and MATLAB commands and strategies with others in the
class prior to writing up your solutions, but when you write up the solutions they should be
entirely your own, and they sh
Homework 8, 550.361 Optimization, Fall 2014
Problem 1: Consider the following network, where each arc might or might not be operational;
the number next to each arc is the probability that the arc is indeed operational, independent of
the rest of the arcs
Homework 5, 550.361 Optimization, Fall 2016
Problem 1: Write a MATLAB function that implements the Simplex Method. The first line of
your .m file should read as follows:
function [xsol,optimalobjective,basisfinal]=simplexYOURNAME(A,b,c,BAS)
and it should
Homework 1, 550.361 Optimization, Fall 2016
You may discuss mathematics ideas and MATLAB commands and strategies with others in the
class prior to writing up your solutions, but when you write up the solutions they should be
entirely your own, and they sh