CS 421: Fall 2003

| News | General Information | Syllabus | Assignment and Solutions | 

|Exams and Solutions | CVL Home |

News

Dec 19. The final (ps/pdf) is graded (ps/pdf). You can pick up your exam after the break in 4130. If you initialed your exam so that I can send you your grade by email, then you should send me your email address so that I can do it.

Dec 11. There is a room change for the final. The new room is Upson B-17. The time is the same: 3:00-5:30pm, Tuesday, December 16.

Dec 11. A6 is available for pick up in 4130. The solutions are available.

Dec 9. An old 421 final should give you an idea what to expect. (PS/PDF).

Dec 8. Please submit all regrade requests by today. They will be processed and available beginning Wednesday at noon.

Dec 8. Latest that you can submit a course eval is WED DEC 10, MIDNIGHT. Do it!

Dec 8.  

Office Hours:
         Monday    Dec 8   4-5
         Tuesday    Dec 9   2-3
         Wednesday Dec 10 2-3
         Thursday  Dec 11  3-4:30
         Friday     Dec 12  2-3
         Monday     Dec 15  1-3



Final Exam: Tuesday, Dec 16, 3:00-5:30pm, Olin 165.

A6 Pick-Up in 4130 Upson, beginning Thursday, Dec 11, noon

Review Questions from the book:

1.1-1.10, 1.42
2.1-2.27, 2.61, 2.63, 2.66, 2.70, 2.76
3.1-3.8, 3.27, 3.32, 3.34
4.1-4.6, 4.15, 4.43, 4.44, 4.57
5.1-5.6, 5.17, 5.19
6.1-6.4, 6.8, 6.23, 6.28, 6.34, 6.35
9.1-9.4, 9.19, 9.34

More review problems soon. Still thinking about whether a review session is possible.

Dec 3. Altho A6 is due Friday Dec 5, Monday Dec 8 is OK. 

Dec 3. FYI, if 

                                       [t,Y] = ode23(...), 

then Y(length(t),:)'  houses and approximation of the solution at   tFinal 

 

Nov 26. In the A6 handout the rhs in the second displayed equation on page two is missing a minus sign. It should be -h^2*F(P). 

Nov 26. For P1 in A6, use the second order Runge-Kutta method to carry out the first step in AB2Orbit. You'll find it described on page 405 of the book. In terms of the output you submit for that problem, you will find that after the test script runs three figures remain. Turn those in.

Nov 26. Here is a handout with some facts and hints that pertain to A6.(PS/PDF). The A6 scripts are also ready.

Nov 25. A6 has been distributed. A5 has been graded. The take-home prelim has been graded. You may pick these items  up in Upson 4130 or wait until the next class, Monday, Dec 1.

Nov 24. Take Home Prelim results.

Nov 17. Hint for P2. Suppose C is "almost" symmetric. Sometimes it is possible to find a diagonal matrix D so that D^{-1}CD = C_tilde is symmetric. Thus, an almost symmetric eigenproblem C*x = lambda*x transforms to a symmetric eigenproblem C_tilde*y = lambda*y where Dy = x.

Nov 16. There is a missing plus-sign in problem 4. The fitting function is

                                  (a1 + a2*t + a3*t^2) + exp(a4*t)

not

                                   (a1 + a2*t + a3*t^2)* exp(a4*t).

Nov 14. The Take-Home exam will be distributed today in  lecture or by pick-up in 4130 Upson. There  are some short test scripts.

Nov 14. A4 solutions available.

Nov 11. In P3, since n = 2 there is no efficiency reason to develop an O(n^2) Broyden step as outlined in class. (The updating J = QR business.) So just just compute the new Jacobian in the Broyden style, i.e., J+ = Jc + rank-1, and use backslash to solve the linear systems.

Nov 10. Clarification of problem P2 in A5. It is clearer to define r(rho) as the largest possible positive number so that

                                             | z+  -  1 | <=   rho | zc - 1 | 

for all zc that satisfy |zc - 1| < = r(rho). This ensures that the error in the Newton iterates goes to zero at least as fast as rho^k for all initial guesses that are inside the circle with center 1 and radius r(rho).

 

Nov 7. To get started in P1, assume the orbits are perfect circles. In that case you can work out the next transit time in closed form. Appreciate that this can then be used to help deduce initial bracketing intervals.

Nov 7. Some typos. In the A5 handout, a "Y_{1}" should be a "Y_{2}" in the second displayed equation. If you downloaded the scripts very early (11/5) there is a parenthesis pair in P1 that should have been a curly bracket. It is easiest just to download P1 again since it is corrected. Finally, there is a stray "z" in the expression for g_{r}(theta) on the second page of the A5 handout. Just get rid of it.

Nov 5. A5 scripts are available.

Oct 27.  When you implement Sturm there comes a time when you must decide whether or not two numbers have opposite sign. There are a couple of ways to do this...


    Method 1: x*y < 0
    Method 2: sign(x)*sign(y) < 0
    Method 3: sign(x) ~= sign(y
)

The results you get in the second part of P1 depend upon the style you use. Why?

Oct 27 Assignment A4 scripts are  available.

Oct 26. Here is a result about eigenvalue location: All the eigenvalues of an n-by-n symmetric matrix A are in the union of the intervals  [A(i,i) - r(i) ,  A(i,i) + r(i)], i=1:n where 

                               r(i) = |A(i,1)| +... + |A(i,i-1)| + |A(i,i+1)| + ... +|A(i,n)|

Oct 24 Assignment A4 scripts are partly available.

Oct 22. Prelim 1 solution/grading guide  is available.

Oct 22. A4 is available.

Oct 17. A3 solutions (without partial credit guide) is available.

Oct 17. In-class 60 minute, closed book, prelim on Monday Oct 20. Syllabus = material associated with the first three assignments. Special Monday office hours: 10:30-noon.

Oct 15. Special Office Hours, Thursday, Oct 16: 11:30-12:30. Regular 2:30-4 hours cancelled because of the inauguration.

Oct 8. A2 Solutions available

Oct 7. A3 scripts available.

Oct 1.    P4 screw-up, convert as follows        

( x , y , z ) =  R*( - cos(theta)*sin(phi) , - cos(theta)*cos(phi) , sin(theta) )

Please submit by Friday lecture. Sorry about that.

 

Sept 26. Assignment 2 comments, 

 

P1. The specification for sigma in StatVec1 is wrong. Should read

   % sigma is the column n-vector of the singular values of I - P(theta)

 

P3. Here is how to think about vectorization in this problem and when you have "done enough." Assume that m>>n. Your algorithm should require  m(2/3n^3) + O(mn^2) flops. The number of flops that occur as part of a length-m vector operation should also be m(2/3n^3) + O(mn^2). I.e., all but a low order fraction of work consists of length-m vector operations.

P4. Refer to the Sept 22 hint below about P4. Tetra can assume that any triplet of tangent planes intersects at just one point. As a result you may assume that the 3-by-4 matrix in the hint has a 1-dimensional nullspace. If anyone (including me!) has a simple proof of this I'll post it on the website!

Sept 24. Comments on Assignment 2.  For P3, be careful about extracting from a 3D array what you may think is a vector. If A = rand(3,4,2) and v = A(1,2:,:), then v is a 1-by-1-by-2 array, not a column 2-vector or a row 2-vector. (I.e., not a 2-by-1 or 1-by-2 array.) Use the reshape function to establish the right orientation. Thus the script

   A = rand(3,4,2)  % A is a 3-by-4-by-2 array
   B = [];
   for k=1:3
      B = [B ; reshape(A(k,k,:),1,2)]
   end
 
establishes B as [A(1,1,1) A(1,1,2); A(2,2,1) A(2,2,2) ; A(3,3,1) A(3,3,2)].

Sept 23. Solutions for Assignment 1 are available.

Sept 22. Assignment 2 scripts are available. Some comments on P4. First, the latitude/longitude conversion to Cartesian coordinates is wrong. Let theta be latitude and phi be longitude. We then have

            ( x , y , z ) =  R*( - sin(theta)*sin(phi) , - sin(theta)*cos(phi) , cos(theta) )

Next, although you have to solve many 3-by-3 linear systems in this problem, you do not have to use the function Solve from P3.

Finally, here is how you can check if the four points that define a tetrahedron circumscribe the sphere. If A (3-by-4) has a non-trivial non-negative vector in its null space, then zeros(3,1) is a convex combination of the four columns. (I.e., we can find a vector alfa with nonnegative entries that sum to one so that

                           alfa(1)A(:,1)   +   alfa(2)A(:,2)   +   afa(3)A(:,3)   +   alfa(4)A(:,4)  = 0

If those columns are the vertices of a tetrahedron whose faces are tangent planes to a sphere, then this means that the tetrahedron circumscribes the sphere. (I think!)

Sept 10. In P3, it is possible to get a flop efficient algorithm that involves no loops. Strive for this. Remember, that if Algorithm 1 requires (say) 10n^3 + 20n^2 flops and Algorithm 2 requires 10n^3 +2n^2 flops, then they are equally flop-efficient. We only care about the lead coefficient. 

Sept 9 In the statement of P2, it should be  e <= 2^{64-t} - 1

Sept 9 Assignment 1 scripts available.

Sept 1. Some suggested matrix algebra/linear algebra texts include Steve Leon (Linear Algebra with Applications), Gil Strang (Introduction to Linear Algebra), David Lay (Linear Algebra and Its Applications), and Carl Meyer (A Course in Applied Linear Algebra). See also Chapter two of Golub and Van Loan (Matrix Computations).

 

General Information

The course requirements for CS 421 include six problem sets, two prelims, and a final exam. The problem sets will be part written exercises and part programming. The written exercises will involve design and analysis of algorithms and will require mathematical proofs in some cases. The programming will be in Matlab on either Unix or Windows workstations. Matlab is a high-level language for numerical computation. Prior knowledge of Matlab is not a prerequisite of the course.

Meeting Times: MWF 1:25-2:15, Hollister 401

InstructorProfessor Charles Van Loan, 4130 Upson Hall, 255-5418, cv@cs.cornell.edu . I have walk-in office hours.

TA:  Gun Srijuntongsiri ( Rhodes 427, gs61@cornell.edu, 255-3864) has office hours TW 11:30-12:30.

Text: Scientific Computing, An Introductory Survey by M. Heath.

Grading: Six Matlab assignments (35%), In-Class Prelim (15%), take-home prelim (20%) and a Final Exam (30%).

 Top

Syllabus

Date

Topic

Reading

Events

 Fri     Aug 29 Num Lin Algebra    
 Mon   Sep 1 " 1.2  
 Wed  Sep 3 " 1.3  
 Fri    Sep 5 " 2.3 A1 Out
 Mon  Sep 8 Linear Systems 2.1  
 Wed  Sep 10 " 2.2  
 Fri      Sep  12 " 2.3  
 Mon  Sep 15 " 2.4  
 Wed  Sep 17 " 2.5 A1 Due
 Fri     Sep 19 Least Squares 3.1-3.3 A2 Out
 Mon  Sep 22 " 3.4-3.5  
 Wed  Sep 24 " 3.6  
 Fri   Sep 26 " 3.7  
 Mon  Sep 29 Singular Values 4.7
 Wed  Oct 1 " 4.7 A2 Due
 Fri   Oct 3 Symm Eigenvalues 4.1  
 Mon Oct 6  " 4.2 A3 Out
 Wed Oct 8 " 4.3  
 Fri  Oct 10 " 4.4  
 Mon Oct 13 Fall Break    
 Wed Oct 15 " 4.5  
 Fri    Oct 17 Nonlinear Equations 5.1-5.2 A3 Due
 Mon Oct 20 "   Prelim I
 Wed Oct 22 " 5.3-5.5 A4 Out
 Fri Oct 24 " 5.6  
 Mon Oct 27 Optimization 6.1-6.2  
 Wed Oct 29 " 6.3   
  Fri Oct 31 " 6.4  A4 Due,A5 Out
  Mon Nov 3 " 6.5  
  Wed Nov 5 " 6.6  
  Fri Nov 7 " 6.7  
  Mon Nov 10 Initial Value Prob. 9.1  
 Wed Nov 12 " 9.2  A5 Due
 Fri Nov 14 " 9.3  PreII Out
 Mon Nov 17 " 10.1-10.2  Pre II  Due
 Wed Nov 19      
 Fri  Nov 21 " 10.3-10.4  A6 Out
 Mon Nov 24 " 10.5-10.6  
  Thanksgiving    
 Mon Dec 1 Applications    
 Wed Dec 3 "    
 Fri Dec 5 "    A6 Due
 Tue Dec 16 3:00-5:30 PM   Final Exam

 

 Top

 

Assignments and Solutions

Assignment 1 (PS/PDF) Scripts Solution  Med = 16/20
Assignment 2 (PS/PDF) Scripts Solution  Med = 17/20
Assignment 3 (PS/PDF) Scripts Solution  Med = 19/20
Assignment 4 (PS/PDF) Scripts Solution  Med = 18/20
Assignment 5 (PS/PDF) Scripts Solution  Med = 15/20
Assignment 6 (PS/PDF) Scripts Solution  Med = 15/20

 

Top

Exams and Solutions

Prelim 1 (PS/PDF) Solution (PS/PDF) Med = 23/30
Prelim2  (PS/PDF) Solution (PS/PDF) Med = 34/40
Final      (PS / PDF) Solution (PS/PDF) Med = 65/100

 Top

 

 

Academic Integrity

Academic integrity Students are allowed to collaborate on the problem sets to the extent of formulating ideas as a group. Each student is expected to write up the problem set by himself or herself. Students must not hand in homework that represents somebody else's ideas entirely. Students should do the coding for programming questions by themselves---no program code should be shared. No collaboration of any kind is allowed on the take-home prelim. Students are permitted to consult outside published material for the homework and take-home prelim, although the homework and prelim will be fully based on lecture notes and the textbook. If a student consults a source other than the lecture notes and textbook, he or she must cite the source---failure to cite the source will be considered cheating. The penalty for cheating will range from a negative score on an assignment to an F for the course, following a hearing with the instructor as spelled out in the academic integrity manual. In extreme circumstances the instructor will in addition bring the case before the university's academic integrity board.