CS 525 - Spring 2011 -Final Examination
Sunday, May 8, 2011, 7:45am-9:45am
Each question is worth 10 points. You may bring on standard-size sheet of paper, handwritten on both sides into the exam. No other electronic devices, notes, or books allowed.
You
Midterm Examination
CS 525 - Fall 2010
Thursday, October 28, 2010, 7:15-9:15pm
Each question is worth the same number of points.
No electronic devices, notes, or books allowed, except that you may bring
one standard-size sheet of paper, handwritten on bot
function [sol,cost] = my_simplex(A,b,c)
% My_simplex : solve LP using simplex method
%
input A : m x n matrix
%
input b : m x 1 vector
%
input c : n x 1 vector
%
output [sol,cost] : optimal solution & optimal cost
% written by Sujee Lee
% Oct 24, 2016
% P
% (a)
A = [3,-1,-2,5,4,0,3;
2,1,-1,-3,-3,-1,3;
4,0,-2,1,-2,1,3;
3,2,-1,-6,-9,0,3];
b = [-1;7;3;11];
c = [4;1;2;-2;3;4;3];
disp('PROBLEM A')
[sol_a,cost_a] = my_simplex(A,b,c);
if ~isnan(sol_a)
disp('optimal solution is : '); disp(sol_a'); disp('optimal co
echo on;
% hwk6q4.He.XY
type hwk6q4.m;
load ex4-2-2
T = totbl(A,b,p);
T = dualbl(T);
T = addcol(T,[0 1 0 0]','x0',4);
T = addrow(T,[0 0 0 1 0], 'z0', 5);
T = ljx(T,2,4);
T = ljx(T,2,1);
T = delcol(T,'x0');
T = delrow(T,'z0');
hwk6q4
load ex4-2-2
T = totbl
MATH 525 HW # 11
Sujee Lee
#1
I used GAMS as a programming language to solve this IP problem :
set i /1*5/;
variable obj;
integer variable v(i);
parameter c(i) / 1 1.2, 2 1.5, 3 2, 4 2.9, 5 4.7/;
parameter a(i) / 1 12, 2 14, 3 19, 4 27, 5 45/;
parameter b
function [final_tableau, final_basis] =
my_tableau_simplex(init_tableau,init_basis,phase)
% My_tableau_simplex : Applying the simplex method using given tableau
% until it terminates.
%
input init_tableau, init_basis : first full tableau and first basis.
3235MATH 525 HW # 7
SUJEE LEE
PROBLEM 1
RESULT :
PROBLEM A
optimal solution is :
0
4
0
0
0
0
1
optimal cost is :
7
PROBLEM B
TERMINATED : Cost is negative infinity
PROBLEM C
TERMINATED : This problem is infeasible
PROBLEM D
TERMINATED : Cost is negative i
Homework 1
CS 525
The data for this problem, namely
1 2 1
1 4
1 3 2
A=
, B = 3 2 1 , C = 2 1 ,
0 2 1
1
1 0
2 5
1
1
2
3
2
0
3
x = , y = , b = 1 , = 2,
1
0
0
3
2
2
1
can be loaded from hwk1.mat by issuing within MATLAB the load hwk1 command in
CS 525 - Fall 2015 - Homework 4
assigned 9/21/15 - due 9/30/15
Hand in Matlab / CVX program files and output files, and written answers.
1. Do Exercise 3-2-1.
2. Do Exercise 3-3-2. (The data for this problem can be loaded using
load ex3-3-2. Do this probl
CS 525 - Fall 2015 - Homework 5
assigned 9/27/15 - due 10/7/15
Hand in hard copy of your code (annotated by hand where necessary)
and written answers.
1. Do Exercise 3-4-3.
2. Do Exercise 3-4-4.
3. Do Exercise 3-5-3.
4. Do Exercise 3-5-4.
Must be submitte
CS 525 - Fall 2015 - Homework 6
assigned 10/5/15 - due 10/14/15
Generate MATLAB output as outlined in the MATLAB setup sheet
and submit this along with your written answers. Hard copy due in class on
due date.
1. Do Exercise 3-6-6.
2. Do Exercise 3-6-9. Y
CS 525 - Fall 2015 - Homework 10
assigned 11/13/15 - due in class Friday 11/20/15
1. Do Exercise 6-4-4, but use the simplified phase I technique that we
learned in class to find a value of t for which this problem is feasible,
not the formulation (6.9).
2
CS 525 - Fall 2015 - Homework 2
assigned 9/6/15 due 9/16/15
1. A baker can make three types of products: cream buns, chocolate
eclairs, and snack-sized chocolate tarts. He wants to figure out how
much of each item to make to optimize his operations.
Each
CS 525 - Fall 2015 - Homework 8
assigned 10/19/15 - due 10/30/15
Generate MATLAB output as outlined in the MATLAB setup sheet
(where necessary) and submit this along with your written answers. Hard
copy due in class on due date.
1. Do Exercise 4-6-2.
2. D
CS 525 - Fall 2015 - Homework 1
assigned 9/2/15 due 9/9/15
Refer to the MATLAB Primer and other documentation for MATLAB,
linked to from the class web site, for information about how to use these
MATLAB commands.
The data for this problem, namely
1 3 5
1
CS 525 - Fall 2015 - Homework 7
assigned 10/12/15 - due 10/21/15
Generate MATLAB output as outlined in the MATLAB setup sheet
and submit this along with your written answers. Hard copy due in class on
due date.
1. Do Exercise 4-1-3.
2. Let x be a solution
CS 525 - Fall 2015 - Homework 3
assigned 9/13/15 due 9/23/15
1. Given simple examples of linear systems Ax = b (where A is an m n
matrix, for some m, n) with the following properties. You simply need
to come up with appropriate values of A and b in each c
CS 525 - Spring 2015 - Homework 9
assigned 11/4/15 - due in class Friday 11/13/15
1. We see in the book how to express the assignment problem (in which
we seek the optimal matching between two sets of objects N1 and N2 of
equal size) as a linear program.
echo on;
% hwk6q3.He.XY
type hwk6q3.m;
A = [1 0 1; -1 0 2];
b = [3,6];
p = [2;1;-3];
T = totbl(A,b,p);
T = ljx(T,1,1);
T = delcol(T,'x4');
neg = [0 1 0]';
T = addcol(T,neg,'x0',3);
T = addrow(T,[0 0 1 0],'z0',4);
T = ljx(T,2,3);
T = ljx(T,2,2);
T = delcol
cvx_begin
%let x be the number of cream buns that sold.
%let y be the number of chocolate eclairs that sold.
%let z be the number of chocolate tarts that sold.
%let a be the amount of sugar that used.
%let b be the amount of flour that used.
%let c be the
Midterm Examination
CS 525 - Fall 2009
Monday, October 26, 2009, 7:15-9:15pm
Each question is worth the same number of points.
No electronic computing devices, notes, or books allowed, except that you
may bring one standard-size sheet of paper, handwritte
CS 525 - Spring 2011 -Midterm Examination
Tuesday, March 8, 2011, 2:30-3:45PM
1. For the following choice of A and b solve the system of equations Ax = b. If there
are multiple solutions, describe the full solution set. If there are linear dependence
rela