CS 6210: Fall 2010

| News | General Information | Syllabus | Assignment and Solutions

  |CVL Home | Problem of the Day  |

 

News 

Dec 13. Here are the final exam test scripts which run your codes and compare with my codes: P1, P2, P3. The mean scores on the three problems were 7.3/10, 9.1/10, and 8.1/10. You can pick up your graded exam in January. Course grades via the registrar or via email after this Tuesday.

Dec 9. The requirement "use Jacobi's method for the B(theta) eigenproblems" means that you can use either classical or cyclic Jacobi. Whatever you think is best.

Dec 7. Two clarifications. In problem 2, the set of indices S is what you would see if you type E = E. And do not assume that E is skew-symmetric. In problem 1, you are not allowed to use schur or eig. This means that you will have to write a 2-by-2 Hermitian schur decomp. It will involve some complex arithmetic. If you cannot figure it out, use Matlab's schur function. The 2-by-2 is a fairly small part of the overall problem so don't lose too much sleep over it.

Dec 6  There was a mistake in Problem 1 in the final. You will find a correct modified version here. I also clarified the definition of the set S in problem 2.

Dec 3. Below are Study week office hours. A8 will be graded and ready for pick up on Tuesday. Email if you have questions about the take-home final. Or come in for discussion. Here is a handy guide to all of Matlab's Krylov Ax=b solvers..

Tuesday      Dec 7:     2:15-3:00
Wednesday Dec 8:     1:30-2:30
Friday         Dec 10:   10:00-12:00, 3:00-4:30

Nov 24. 'Real" data is available if you would like to test your PageRank function on some interesting examples. There are three examples and each involves two text files. One encodes the link structure and one encodes the associated urls. Here they are:

 BBallAdj_List, BBall_Nodes, NatParks_Adj_List, NatParks_Nodes, Movies_Adj_List, Movies_Nodes.  

Put these in the same directory as the supplied function  GetWebData.

A call of the form [G,c] = GetWebData('BBall') will set up a sparse link matrix G and a cell array c that houses the names of the associated urls that make up a basketball "baby web."

Nov 24. Course evaluations are critical and the window for online submission is Nov 29 through December 8.While I (of course) do not have access to the anonymous results until the term is over, I do have a way of checking who responded before final grades are submitted. Failure to submit a course evaluation will result in a 5 percent reduction in your final exam score. This rule is in effect to promote a high response rate.

Nov 24. A script that illustrates the use of the Matlab eigs function is available here.

Nov 9. Assignment 7 P1 Hint. [Q1,H] = hess(A) produces the decomposition Q1'*A*Q1 = H where H is upper Hessenberg and Q1(:,1) = I(:,1) = e1. Feel free to use the function house that is provided.

Nov 9. Assignment 7 P2 Hint. Suppose  T = [ T11 T12 ; 0 T22] where T11 is either 1-by-1 or 2-by-2. Block             F = exp(T) = [F11 F12 0 F22] the same way. Note that F11 = exp(T11) is small and easy. (You are required to work out the 2-by-2 case. Not allowed to use expm.) Compute F22 recursively. Then use the provided function TinySylvester to solve T11*F12 - F12*T22 =  F11*T12 - T12*F22 for F12.

Nov 9. Assignment 7 P3 Hint. Compute y'*T0 = T0(1,1)*y' and think about computing an orthogonal matrix Q so that Q*y = I(:,3). Might be useful to look at the proof of the Schur decomposition.

Nov 9. Assignment 7 C7 Hint. Make effective use of the Matlab function qz. You are not allowed to use eig except for 2-by-2 problems.

 

Oct 22. Final Exam Announcement. Instead of an in-class final I have decided on a code-based take-home. You will be asked to submit Matlab solutions to 4-5 problems which I will then proceed to check using my own test scripts. More later. You will be given the exam during the last day of class (Dec 3) and have to turn it in Dec 10, the scheduled date of our final.

Oct 22  Assignment 6 has been revised including the due date. You will want to print it out.

Oct 18 Extra office hours Tuesday Oct 19:1-2pm..

Oct 14 A function for doing Givens rotations is available.

Oct 14. Problem 3 hints.

(1) If Q*R = [C d] and C has rank n, , then |R(n+1,n+1)| = min norm(Cx-d,2).

(2) Let C = [A b] and assume that you have Q*R = C( i : i+p-1, : ). Modify Q and R so that you get a QR factorization of C( i+1 : i+p-1),:, i.e., delete row i.. Then modify again to get QR factorization of C( i+1:i+p, :), i.e., add a row.

Oct 6 Reread the Oct 5 and Oct 4 notes below, the original versions  had some typos.

Oct 5. Slight change in the challenge problem C4. Instead of

                  x = LSviaGS(A,b,itMax)

have

                                                 x = LSviaGS(A,b,itMax,x0)

where x0 is an optional argument. If your implementation has the fragment

if nargin > 3
   x = x0;
else
   x = zeros(n,1);
end

  then you can either default to a zero starting vector or pass in a better initial guess. Note. Your implementation should work if either A is sparse or full and it should NOT form A'*A.  That matrix can be full

Oct 4. Type "help svd" and "help qr" in Matlab and notice that it is possible to get selected portions of these factorizations. When you use these factorizations in a solution, "take only what you need." For example, [Q,R] =qr(A) is O(m^2n) flops while qr(A,0) is  O(mn^2 ). Big difference if m>>n.

Oct  4 In Assmt 4, Problem 3,  B is m-by-m and X is n-by-n

Sept 29 Assignment 4 write-up available.

Sept 22. Advice for problem P1. If (A+E)*xhat = b then relerr is approximately

                                  cond(A)*(norm(E)/norm(A))*unitroundoff.

You will need rough estimates of the "players". Order-of magnitude rules and the estimates involve matrices with narrow band.  It is fine to use the approximation  Anynorm(narrow band A) = max(max(abs(A)).

Hint for problem P2. If B is a symmetric 2-by-2 matrix with one negative eigenvalue, and [Q,lambda] = eig(B), then either Q(:,1)'*B**Q(:,1) < 0  or  Q(:,2)'*B**Q(:,2) < 0.

Sept 14   I moved my Monday office hours from 2:15-2:45 to 12:30-1:15. This Friday only: instead of  1-2 office hours will be from 9 to10.

Sept 13. In A1 P3, there is a typo. Should be A21./A11 not A12./A11. Under the given rules of the game a ray can intersect a vertex and never enter the polygon. In that remote situation, the number of intersection points is odd and zero is the length of that portion of the ray inside the polygon. Let's ignore that case.

Sept 9. A1 is graded. Notes on how to solve the challenge problem in O(nk) are here.

Sept 2. Regarding the GVL text, I ordered about 20 copies through the campus store. So if you don't order online you have an on-campus alternative. 

Sept 2. Two hints for Problem 2. (i) (f + g)(p + q) = (f + g)p + fq + gq. (ii) M + wz' + st' = M + [w s]*[z t]'

Aug 27.  Assignment 1 is out and due in one week.

Aug 25. Worried about your linear algebra and/or Matlab background?

Some Linear Algebra References:  Matrix Analysis and Applied Linear Algebra (C. Meyer), Linear Algebra and its Applications (G. Strang)

Some Matlab References: Insight Through Computing: A Matlab Introduction to Computational Science and Engineering (Van Loan and Fan), Getting Started with Matlab 7  (Pratap), Matlab: An Introduction with Applications (Gilat), Mastering Matlab7 ( Hanselman & Littlefield)

 

General Information

Meeting Time and Place: MWF 11:15-12:05,  Phillips 307.

InstructorProfessor Charles Van Loan, 5153 Upson Hall, 255-5418, cv@cs.cornell.edu

Office Hours: Office Hours are posted here. There will be exceptions and I'll tell you in class. There will be extra times and I will tell you in class. And you can always schedule a special time by sending me email. Randy Hess is my administrative assistant.

Text:  Selected Chapters from the 4th edition of Matrix Computations by G.H. Golub and C. Van Loan will be distributed over the semester. The 3rd Edition is the base text.

Grading: Eight Matlab assignments (40%), best three challenge problems (30%) and a Final Exam (30%).

 

Syllabus

Date

Topic

Reading

Events

Wed Aug 25 Fundamentals  Chapter 1  
Fri Aug 27 "  "  
Mon  Aug 30  "  "  
Wed  Sept 1  "  Chapter 2  
Fri     Sept 3  "     Due: Assignment 1
Wed  Sept 8 Dense Ax = b  Chapter 3  
Fri    Sept  10          "              
Mon  Sept 13 "    
Wed  Sept 15   Special Ax = b       Chapter 4  
Fri     Sept 17 "    Due: Assignment 2
Mon  Sept 20 "    
Wed  Sept 22       "           
Fri   Sept 24 Classical Iterations   10.1  
Mon  Sept 27     "         Due: Assignment 3
Wed  Sept 29 Least Squares  Chapter 5  
Fri  Oct 1  "    
Mon Oct 4      "        
Wed Oct 6  "    
Fri Oct 8 Special Least Squares  12.1-12.3  Due: Assignment 4
Wed Oct 13 "    
Fri Oct 15   "    
Mon Oct 18  Symmetric Eigenproblem Chapter 8  
Wed Oct 20 "   Due: Assignment 5
Fri Oct 22 "    
Mon Oct 25 "    
Wed Oct 27 "    
Fri  Oct 29  Unsymmetric Eigenproblem  Chapter 7  
Mon Nov 1  "    
Wed Nov 3 "   Due: Assignment 6
Fri Nov 5 "    
Mon Nov 8 Functions of Matrices Chapter 11   
Wed Nov 10  "    
Fri Nov 12 Methods for Sparse Eigenproblems Chapter 9  
Mon Nov 15 "   Due: Assignment 7
Wed Nov 17 "    
Fri Nov 19 "    
Mon Nov 22 Methods for Sparse Linear Systems  Chapter 10  
Wed  Nov 24  "    
Mon  Nov 29   "    
Wed  Dec 1   "   Due: Assignment 8
Fri   Dec 3  "    
       
Fri, Dec 10 Take-Home Final Exam     Due at 2PM

 

 Top

 

Assignments and Solutions

Handout Test Scripts Solutions (Mean scores in parens)
Assignment 1      P1, P2, P3, C1, MatrixProdSlow MatrixProdFast (5.0), CorrectionTerm (2.9), PolyVec (4.3), PropSProd, C1 Discussion
Assignment 2   P1, P2, P3 ProdTriSol, (3.5) MakeSingular (3.8), InsideDist (4.7), SigmaMinEst, C2, C2_Output
Assignment 3    P1, P2, P3, C3 iSkewSolve(4.7), FindNegVec(4.7), CholDiag (4.9), CholBlockDiag
Assignment 4     P1, P2, P3, C4  Nearest(4.2), TrigLS(4.8), MatLS(4.7), LSviaGS
Assignment 5 P1, P2, P3, C5, Givens  LowRankLS (4.4), WindowLS (4.7), MinPhi (4.7) , pTLS
Assignment 6   P1, P2, P3, C6  SkewReduce (3.9), OrthoEig(4.7), DomArrow(4.9),CentroSym
Assignment 7 P1, P2, P3, C7, House, TinySylvester Swap3 (4.9), MyExpM (4.9), SpecialHess(4.6), GenEig
Assignment 8 P1, P2, P3, C8  MakeTriDiag (4.9), PageRank (3.4) , ProdEig (4.8). NearestKP

 Top