CombOptim_Ch3
CombOptim_Ch3
CombOptim_Ch3
Complexity
Chris Dickson
CAS 746 - Advanced Topics in Combinatorial
Optimization
2
Review
A subset L of Rn (respectively Qn) is called a linear hyperplane if
L = { x | ax = 0 } for some nonzero row vector a in Rn (Qn).
A set U of vectors in Rn (respectively Qn) is called a linear subspace of Rn
if the following properties hold:
The zero vector is in U
If x U then x U for any scalar
If x,y U then x + y U
Important subspaces
Null Space : null(A) = { x | Ax = 0 }
Image : im(A) = { b | Ax = b for some x in A }
A basis for a subspace L is a set of linearly independent vectors that spans
L
3
Review
Theorem 3.1. Each linear subspace L of Rn is generated by finitely
many vectors and is also the intersection of finitely many linear
hyperplanes
Proof :
If L is a subspace, then a maximal set of linearly independent vectors
from L will form a basis.
Also, L is the intersection of hyperplanes { x | aix = 0 } where the set of
all ai are linearly independent generating L* := { z | zx = 0 for all x in L }
4
Review
5
Review
Proof :
() If Ax=b then when yA = 0 we have yAx = 0 yb = 0.
()Let im(A) = {z | Ax = z for some x }. By Thrm 3.1 there
exists a matrix C such that im(A) = { z | Cz = 0 }. So, CAx = 0
implies that CA is all-zero. Thus:
(yA = 0 yb = 0)
Cb = 0
b im(A)
There is a solution to Ax = b
6
Review
7
Review
Cramer’s Rule: If A is an invertible (n x n)-matrix, the solution to
Ax = b is given by:
x1 = detA1 / detA
…
xn = detAn / detA
8
Review
Example:
5x1 +x2 – x3 = 4
9x1 +x2 – x3 = 1
x1 -x2 +5x3 = 2
9
Sizes and Characterizations
Rational Number: r=p/q (p Z, q N, relatively
prime)
Rational Matrix
10
Sizes and Characterizations
Theorem 3.2. Let A be a square rational matrix of size . Then, the
size of det(A) is less than 2 .
Proof: Let A = (pij/qij) for i,j = 1..n. Let detA = p/q where p,q and
pij ,qij are all relatively prime. Then:
11
Sizes and Characterizations
Noting that |p| = |detA|q, we combine the two formulas to bound p
and q:
Plugging the bounds for p and q into the definition for the size of a
rational number, we get:
12
Sizes and Characterizations
Several important corollaries from the theorem
Corollary 3.2b. If the system Ax=b has a solution, it has one of size
polynomially bounded by the sizes of A and b
Proof: Since A-1 is polynomially bounded, then A-1b is polynomially
bounded.
13
Sizes and Characterizations
What if there isn’t a solution to Ax = b? Is this problem still
polynomially bounded? Yes!
14
Sizes and Characterizations
Corollary 3.2d. Let A be a rational m x n matrix and let b be a
rational column vector such that each row of the matrix [A b] has
size at most . If Ax = b has a solution, then:
15
Gaussian Elimination
Given a system of linear equations:
16
Gaussian Elimination
Operations allowed on matrices:
Adding a multiple of one row to another row
Permuting rows or columns
Forward Elimination: Given a matrix Ak of the form
17
Gaussian Elimination
Back Substitution: After FE stage, we wish to transform the matrix
into the form:
18
Gaussian Elimination
Theorem 3.3. For rational data, the Gaussian elminination method
is a polynomial time method.
proof is found in the book. It is very longwinded!
since operations allowed for GE are polynomially bounded, it only
remains to show that numbers do not grow exponentially.
Corollary of the theorem implies that other operations on matrices
are polynomially solvable as they depend on solving a system of
linear equations.
calculating determinant of a rational matrix
determining the rank of a rational matrix
calculating the inverse of a rational matrix
testing a set of vectors for linear independence
solving a system of rational linear equations
19
Gaussian Elimination
Numerical Considerations
.A naive pivot strategy always uses D11 as the pivot. However, this can
lead to numerical problems when we do not have exact arithmetic. (ie/
floating point numbers).
Partial pivoting always selects the largest element (in absolute value) in
the first column of D as the pivot. (swap rows to make this D 11)
Scaled partial pivoting is like partial pivoting, but it scales the pivot
column and row so that D11 = 1.
Full pivoting uses the largest value in the entire D submatrix as the
pivot. We then swap rows and columns to put this value in D11.
Studies show that full pivoting usually requires more overhead to be
beneficial.
20
Gaussian Elimination
Other methods:
Gauss-Jordan Method: This method combines the FE and BS stages in
Gaussian elimination.
inferior to ordinary Gaussian elimination
LU Decomposition: Uses GE to decompose original matrix A into the
product of a lower and upper triangular matrix.
This is the method of choice when we must solve many systems with the
same matrix A but with different b’s.
We only need to perform FE once, then do back substitution for each right
hand side.
Iterative Methods: Want to solve Ax = b by determining a sequence of
vectors x0 , x1, ... , which eventually converge to a solution x*.
21
Iterative Methods
Given Ax = b and x0, the goal is find a sequence of iterates x1, x2 , ...
, x* such that Ax* = b.
Example:
L D U
22
Iterative Methods
Now, we can define how the iteration proceeds. In general:
23
Iterative Methods
Example: Solve for x in Ax=b using Jacobi’s Method where:
x1 = [ -5 0.667 1.5 ]T
x2 = [ 0.833 -1.0 -1.0]T
.........
x10 = [0.9999 0.9985 1.9977 ]T [ x* = [ 1 1 2] T ]
24
Iterative Methods
Example 2: Solve for x in Ax=b using Jacobi’s Method where:
Using x0 = b, we obtain:
25
Iterative Methods
• .What happened? The sequence diverged!
26
Iterative Methods
Gauss-Sidel Method: Computes the (i+1)th component of xk+1. ie,
where
27
Iterative Methods
Gauss-Sidel Method: Alternatively, if we split A = L+D+U, then we
obtain the iteration:
28
Iterative Methods
Example: Gauss-Sidel Method
29
Iterative Methods
It should also be noted that in both GS and Jacobi Methods, the choice of M
is important.
30
Iterative Methods
Successive Over-Relaxation Method (SOR) Write matrices L and U
(L lower triangular with diagonal) such that:
31
Iterative Methods
Algorithm:
32
Iterative Methods
There are many different choices that can be made for the
relaxation methods
Choice of
= 2, then xk+1 is reflection of xk into xi =
= 1, then x
k+1 is projection of xk onto the hyperplane xi =
Stopping Criteria:
How close is close enough?
33
Iterative Methods
Why use iterative methods?
Sometimes they will be more numerically stable.
Particulary when matrix A is positive-semi-definite and diagonally
dominant. (This is the case for the linear least squares problem)
If an exact solution is not neccessary. Only need to be ‘close enough’.
34
References
Schrijver, A. Theory of Linear and Integer Programming. John
Wiley & Sons, 1998.
35
THE END
36