Math 171A Homework 2 Solutions
Instructor: Jiawang Nie February 1, 2012
1. (8 points) Consider the feasible set F defined by the following constraints x1 + x2 4, x1 + 3x2 6, 6x1 - x2 18, 3 x2 6, x1 -1.
(a) Express F in the standard form Ax b. Write down A
Math 140A, Fall 2010, Midterm, 11/8/10
Instructions. Answer all questions. You may use without proof anything which was proved in class. Cite a theorem either by name, if it has one, or by briefly stating what it says. 1. (20 points) Give an example of an
Solution of Linear Programming Problems with Matlab
Notation
The transposition operation is denoted by a superscript T (apostrophe in Matlab),
1
T
[1, 2, 3] = 2 ,
3
T
1
2 = [1, 2, 3],
3
1 2 3
4 5 6
T
1 4
= 2 5 .
3 6
Given two (row or column) vectors a
Math 171A Practice Midterm II
Instructor: Jiawang Nie March 5, 2012
1. Consider the LP of minimizing c 2 3 A = 4 2 3
x subject to Ax b where -15 3 5 -13 4 3 , b = -20 , c = A 5 1 -12 4 4 -13 5 2
0 1 0 . 1 1
Find the minimizer of this LP by using optimali
Recap: Farkas' lemma
Math 171A: Linear Programming
Lecture 15 Testing for Optimality
Philip E. Gill
c 2011
c Tp 0 for all p such that Aa p 0 if and only if c = AT for some 0 a a a
http:/ccom.ucsd.edu/~peg/math171a
Wednesday, February 9th, 2011
UCSD Center
Math 171A: Linear Programming
The simplex method defines a sequence of vertices:
Lecture 16 The Simplex Method
such that Philip E. Gill
c 2011
x0 , x1 , x2 , . . . , x k , . . . ,
vertex number
c Tx0 c Tx1 c Tx2 c Txk For the moment, we assume that a sta
Math 171A: Linear Programming
Recap: the simplex method
Lecture 17 Degenerate Constraints and the Simplex Method
Philip E. Gill
c 2011
One step moves from a vertex to an adjacent vertex. Each step requires the solution of two sets of equations: ATk = c k
Recap: the simplex method
Math 171A: Linear Programming
One step moves from a vertex to an adjacent vertex.
Lecture 18 Finding a Feasible Point
Philip E. Gill
c 2011
Each step requires the solution of two sets of equations: ATk = c k and Ak pk = es
where
Recap: The phase-1 Linear Program
Math 171A: Linear Programming
To find a feasible x for minimize n
xR
c Tx Ax b , x 0
simple bounds
Lecture 19 Finding a Feasible Point II
subject to
general constraints
Solve the linear program: Philip E. Gill
c 2011
mini
Recap: LP formulations
Math 171A: Linear Programming
Problems considered so far: ELP minimize n
xR
Lecture 20 LPs with Mixed Constraint Types
Philip E. Gill
c 2011
c Tx Ax = b c Tx Ax b
subject to LP minimize
x
http:/ccom.ucsd.edu/~peg/math171a
subject to
Recap: Linear programs in standard form
Math 171A: Linear Programming
Lecture 21 Linear Programs in Standard Form
Philip E. Gill
c 2011
minimize n
xR
c Tx Ax = b , x 0
simple bounds
subject to
equality constraints
The matrix A is m n with shape A = We app
Recap
Math 171A: Linear Programming
Lecture 2 Properties of Linear Constraints
Philip E. Gill
c 2011
The lecture slides and homework are posted on the class web-page. http:/ccom.ucsd.edu/~peg/math171a Access to course materials requires a class account an
Recap: Optimality conditions for LP
Math 171A: Linear Programming
Lecture 14 Farkas' Lemma and its Implications
Philip E. Gill
c 2011
LP
minimize
x
c Tx Ax b
subject to
with A an m n matrix, b an m-vector and c an n-vector. The vector x is a solution of L
Recap: convex sets
Math 171A: Linear Programming Definition (Convex set)
Lecture 13 Optimality Conditions for LP
A set S is convex if, for every x, y S, it holds that z = (1 - )x + y S Note that for all 0 1
Philip E. Gill
c 2011
z = (1 - )x + y = x + (y -
Recap: a linear inequality constraint
x2
Math 171A: Linear Programming
Lecture 3 Geometry of the Feasible Region
Philip E. Gill
c 2011
aT x > b aT x = b aT x < b
http:/ccom.ucsd.edu/~peg/math171a
Friday, January 7th, 2011
x1
UCSD Center for Computational
Recap: Properties of linear constraints
Math 171A: Linear Programming
constraint #1: constraint #2: constraint #3: constraint #4: constraint #5: constraint #6:
The constraints may be infeasible
Lecture 4 Properties of the Objective Function
Philip E. Gill
Recap: basic properties of an LP
Math 171A: Linear Programming
Lecture 5 Review of Linear Equations I
Philip E. Gill
c 2011
An LP is either infeasible, unbounded or has an optimal solution. An optimal solution always lies on the boundary of the feasible r
Recap: Two fundamental subspaces
Math 171A: Linear Programming
range(A)
= =
cfw_y : y = Ax
for some x Rn
Lecture 6 Full-Rank Systems of Linear Equations
Philip E. Gill
c 2011
range(AT ) The set range(A)
cfw_x : x = AT y for some y Rm
"lives" in Rm , i.e
Math 171A: Linear Programming
So far, we have focused on compatible equations Ax = b. i.e., equations Ax = b with b range(A).
Lecture 7 Properties of Incompatible Systems
Question
Philip E. Gill
c 2011
Given A Rmn , how do we characterize vectors b Rm suc
Math 171A: Linear Programming
Class Announcements
Lecture 8 Linear Programming with Equality Constraints
Philip E. Gill
c 2011
1
The midterm will be held in class next Wednesday, January 26. The midterm is based on material covered in Homework Assignments
Math 171A: Linear Programming
Recap: LP with equality constraints
Lecture 9 Optimality Conditions for LP with Equality Constraints
Philip E. Gill
c 2011
Linear programming with equality constraints: ELP minimize n
xR
c Tx Ax = b
subject to http:/ccom.ucsd
Recap: Optimality conditions for ELP
Math 171A: Linear Programming
Linear programming with equality constraints: ELP minimize n
xR
Lecture 10 Feasible Directions and Vertices
Philip E. Gill
c 2011
c Tx Ax = b
subject to A point x is optimal if and only if
Recap: computing the step to a constraint
Math 171A: Linear Programming
Lecture 11 Vertices
Philip E. Gill
c 2011
http:/ccom.ucsd.edu/~peg/math171a
The step to the constraint aiTx bi from a feasible point x along a nonzero p is: ri (x) if aiTp = 0 -aTp i
Recap: Vertices (aka corner points)
Math 171A: Linear Programming
Lecture 12 Finding a Vertex
Philip E. Gill
c 2011
A vertex is a feasible point at which there are at least n linearly independent constraints active. i.e., the active-constraint matrix Aa h
Recap: Simplex method for LPs in standard form
Math 171A: Linear Programming
Lecture 22 The Simplex Method for Standard Form
Philip E. Gill
c 2011
minimize n
xR
c Tx Ax = b , x 0
simple bounds
subject to
equality constraints
We apply "mixed-constraint" si
Recap: Choice of the generic form
Math 171A: Linear Programming
minimize d Tw n
w R
subject to Gw f ,
w 0
Lecture 23 Linear Programming Duality
Convert to all-inequality form if m > n, i.e.,
G= Philip E. Gill
c 2011
http:/ccom.ucsd.edu/~peg/math171a
Conve
5
Flows and cuts in digraphs
Recall that a digraph or network is a pair G = (V, E) where V is a set and E is a multiset
of ordered pairs of elements of V , which we refer to as arcs. Note that two vertices can
be joined by many arcs in either direction. I
Note Eulerian tours
jacques@ucsd.edu
An eulerian tour in a graph is a closed walk which passes exactly once through every
edge of the graph. A graph is eulerian if it has an eulerian tour. A fundamental question
is, given a graph G, how can we tell if it
Examples Connectivity
jacques@ucsd.edu
Example 1. For each of the graphs below, find
(u, v), (u, v), (G ), (G ), (G )
v
u
v
u
Tree of triangles
u
KN
KN
v
Tree
Tree of KN
Solution.
For the first graph, u and v can be separated by removing all other vertic