Department of Computer Science

Numerical Calculus

Spring Semester 2012

Dr. Maury Eggen

Homework three involves iterative methods for the solution of systems of linear equations.

We will write programs for each of Jacobi iteration and Gauss-Seidel iteration.

You may assume that the coefficient matrix is in a file, and that it also contains the constant column in the equation Ax = b. (An n x (n+1) array)

You must attempt to rearrange the rows to achieve something close to diagonal dominance (which may not be achievable). Thus, you should include an iteration count and stop if your program does not achieve a solution in an appropriate number of iterations. (However, you realize that even the small 3x3 example in class required over 30 iterations to achieve a solution). You may want to calculate the determinant of the coefficient matrix ahead of time to make sure it is not zero, otherwise you have no hope of convergence.

As with the last exercise, you should check the input file to make sure the data is "good."

Compare convergence rates and summarize your findings. Of course, this depends on several things: the value of epsilon, the arrangement of the rows, the size of the coefficient matrix, etc.

Due Date: 13 Feb 2012

If you have any questions, please contact Dr. Eggen.