Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/August 2008

From testwiki
Jump to navigation Jump to search

Problem 1

Let Am×n,bm, and pn, with m>n, and let δ be a scalar. Show how the constrained least squares problem,


minimize bAx2 subject to pTx=δ


can be reduced to solving a related unconstrained least squares problem. The algorithm should start by finding a Householder transformation H such that

Hp=p2e1


and setting

y=Hx

Solution 1

Since Householder Matrices are orthogonal and hermitian (i.e. symmetric if the matrix is real), we have


y=Hxx=HTy=Hy


Then the constraint can be written


pTx=δpT(HTy)=δ(Hp)Ty=δ(p2e1)Ty=δp2e1Ty=δy1=δp2


Hence, the first entry of the column vector y, y1(a scalar), represents our constraint.


Now we want to show that we can write Axb2 as a related unconstrained problem. Substituting for x in Ax we get,


Ax=AHy


Let AH=B=[B1B^] where B1 is the first column of B and B^ are the remaining columns.

Since,


y=[y1y^]


block matrix multiplication yields,


AHy=By=[B1B^][y1y^]=y1B1+B^y^


So minybAHy2=miny^by1B1B^y^2 , which is unconstrained.

Problem 2

Prove or disprove the following interpolants exist for all values of y1,y2,y3 and all distinct values of x1,x2,x3.

Problem 2a

a.yi=c1+c2xi+c3xi2

Solution 2a

Substituting into this equation the pairs xi,yi,i=1,2,3, gives rise to the following matrix equation:


[y1y2y3]=[1x1x121x2x221x3x32]A[c1c2c3]


Where A is the Vandermonde matrix, which is know to be non-singular. This proves existence and uniqueness of the coefficients c1,c2,c3.

Problem 2b

b.yi=c1+c2xi2+c3xi4

Solution 2b

Now, substituting the pairs xi,yi,i=1,2,3, gives:


[y1y2y3]=[1x12x141x22x241x32x34][c1c2c3]


Consider the unique set of points x1=1, x2=1, x3=0. 

The system reduces to


[y1y2y3]=[111111100]A[c1c2c3]

Here, the matrix A is clearly singular.

More generally, the determinant of the matrix A is given by

|1x12x141x22x241x32x34|=(x22x12)(x32x12)(x32x22)=0 if xj=xi for any ij

Problem 3

Consider the linear system of equations Ax=b where A is a symmetric positive definite matrix of order n. The conjugate gradient method (CG) for solving this system is

Choose x0, compute r0=bAx0
 Set p0=r0
 for k=0 until convergence
 αk=(rk,rk)/(pk,Apk)
 xk+1=xk+αkpk
 rk+1=rkαkApk
 <Test for Convergence>
 βk=(rk+1,rk+1)/(rk,rk)
 pk+1=rk+1+βkpk
end

where (v,w)=i=1nviwi is the Euclidean inner product.

Let Q be some other symmetric[1] positive-definite matrix of order n. We know that the forms

v,wA(Av,w)v,wQ(Qv,w)

are inner products on Rn. In addition, a matrix M is symmetric with respect to the Q inner product ,Q if Mv,wQ=v,MwQ for all v,w in Rn, and M is positive definite with respect to ,Q if Mv,vQ>0 for all nonzero v

Problem 3a

Show that Q1A is symmetric and positive-definite with respect to the Q-inner product.

Solution 3a

Q1Av,wQ=(QQ1Av,w)=(Av,w)v,Q1AwQ=(Qv,Q1Aw)=(QTQv,Aw)=(Q1Qv,Aw)=(v,Aw)=(ATv,w)=(Av,w)Q1Av,vQ=(QQ1Av,v)=(Av,v)>0

Problem 3b

In light of this fact, CG can be used to solve the system Q1Ax=Q1b in an appropriate manner. Specify this algorithm and identify any extra costs required that would not be present with Q=I.

Solution 3b

Choose x0
r0=bAx0
r~0 :  solve Qr~0=r0
p0=r~0
for k=0,1,2,... until convergence
 αk=(rk,r~k)/(pk,Apk)
 xk+1=xk+αkpk
 rk+1=rkαkApk
 <Test for Convergence>
 r~k+1 :  solve Qr~k+1=rk+1
 βk=(rk+1,r~k+1)/(rk,r~k)
 pk+1=r~k+1+βkpk
end


One additional cost is computing Q1.

Another one-time cost is multiplying Q1A which has cost n3 and Q1b which has cost n2.

Problem 3c

Use any facts you know about the conjugate gradient method to identify properties of Q that would be desirable for computing the solution x efficiently.

Solution 3c

We want Q1A to have eigenvalues whose values are close together. This accelerates convergence. Furthermore, if there are only k distinct eigenvalues, the algorithm will terminate in k steps.

Notes

Template:Reflist

Template:BookCat

  1. Omitted on the actual exam. This made the problem ambiguous and the word symmetric should have been included. (Howard Elman, 12/16/08)