Gauss-Seidel and Gauss Jacobi method are iterative methods used to find the solution of a system of linear simultaneous equations. Both are based on fixed point iteration method. Whether it’s a program, algorithm, or flowchart, we start with a guess solution of the given system of linear simultaneous equations, and iterate the equations till the desired degree of accuracy is reached.
In Gauss Jacobi method, we assume x1, x2 and x3 as the three initial guesses. To get better values, the approximations in previous iterations are used. In this method, we should see that the variable absolute value coefficient is greater than or equal to sum of the absolute values of the coefficient of the remaining variables.
Guass-Seidel method is very similar to Gauss Jacobi method, and here are simple algorithm and flowchart for Gauss-Seidel and Gauss Jacobi method. In Gauss Seidel method, the most recent values or fresher values are used in successive iterations.
Gauss-Seidel Method Algorithm:
- Start
- Declare the variables and read the order of the matrix n
- Read the stopping criteria er
- Read the coefficients aim as
Do for i=1 to n
Do for j=1 to n
Read a[i][j]
Repeat for j
Repeat for i - Read the coefficients b[i] for i=1 to n
- Initialize x0[i] = 0 for i=1 to n
- Set key=0
- For i=1 to n
Set sum = b[i]
For j=1 to n
If (j not equal to i)
Set sum = sum – a[i][j] * x0[j]
Repeat j
x[i] = sum/a[i][i]
If absolute value of ((x[i] – x0[i]) / x[i]) > er, then
Set key = 1
Set x0[i] = x[i]
Repeat i - If key = 1, then
Goto step 6
Otherwise print results
Gauss-Seidel Method Flowchart:
Gauss Jacobi Method Flowchart:
Also see,
Gauss-Seidel C Program
Gauss Seidel Matlab Program
Programs in any high level programming language can be written with the help of these Gauss-Seidel and Gauss Jacobi method algorithm and flowchart to solve linear simultaneous equations.
This method is fast and easy compared to the direct methods such as Gauss Jordan method, Gauss Elimination method, Cramer’s rule, etc. However, the manual computation of Gauss Seidel/Jacobi method can also be lengthy.