uwhpsc-2016 / homework1

Homework #1
1 stars 1 forks source link

Gauss-Seidel: Strict Dominance vs. Dominance #32

Open alyfarahat opened 8 years ago

alyfarahat commented 8 years ago

For the Jacobi method to converge, we must guarantee strict diagonal dominance of the input matrix. As mentioned in the problem statement, Gauss-Seidel only requires diagonal dominance. Should we reject input matrices with only dominant -- but not strictly dominant -- diagonals in Gauss-Seidel?

cswiercz commented 8 years ago

Good question. Looking at the homework assignment I see that I hadn't requested that the jacobi_iteration or gauss_seidel_iteration functions check if the input matrix is SDD or DD. Therefore, your implementations of these functions need not perform the check before iteration to a solution, x.

That being said, the tests we perform will be using matrices that satisfy the necessary conditions for convergence.

From a practical standpoint, it might be preferred in this case for the "user" to ensure that the input matrix satisfies the required conditions before calling jacobi_iteration, etc. (Imagine you're writing a linear algebra library for other people to use.) If A is huge it takes a good O(n^2) work just to verify SDD/DD. However, depending on the problem such a check might be mission critical.

In this homework assignment, this check is not mission critical.