MTP290 Tut5
MTP290 Tut5
1. Write a MATLAB script for implementing the Gauss-Jacobi method to solve the system
Ax = b, where A is a non-singular matrix.
2. Solve the following linear system by Gauss-Jacobi method, with tolerance = 10−4 in the l∞
norm. Choose initial guess as x1 = 1/2 = x2
10x1 + x2 = 11
x1 + 10x2 = 11.
3. Solve the following linear system by Gauss Jacobi method and choose initial guess as x1 =
x2 = x 3 = 0
4x1 + x2 − x3 = 3
2x1 + 7x2 + x3 = 19
x1 − 3x2 + 12x3 = 31.
4. Use Gauss-Jacobi Method to solve (Generate any initial guess in your programme)
5x1 − 2x2 + 3x3 + 6x5 = −1
−3x1 + 9x2 + x3 − 2x4 + 7.4x5 = 2
2x1 − 1x2 − 7x3 + x4 + 6.7x5 = 3
4x1 + 3x2 − 5x3 + 7x4 + 9x5 = 0.5
2x1 + 3.5x2 + 6.1x3 − 4x4 − 8.1x5 = 3.1.
1
9. Show that the complexity of algorithm for Gaussian Elimination method is O(n3 ).
3
10. Show that the Gauss-Jordan method requires ( n2 + n2 − n2 ) multiplications/divisions and
3
( n2 − n2 ) additions/subtractions.
11. Show that complexity of Gauss-Jacobi algorithm is O(n2 ).
12. Show that complexity of Gauss-Seidel algorithm is O(n2 ).