- 2073 Magh · 4+4 marks
CG algorithm; Gauss-Seidel numerical
Short answer
CG repeats: alpha = r^T r/(d^T A d), x = x + alpha d, r = r - alpha A d, beta = r_new^T r_new/(r^T r), d = r + beta d, until the residual is small. Gauss-Seidel with newest values converges to x1 about 0.62, x2 about -0.76, x3 about 0.03.
Write down the algorithm for the conjugate gradient method. Consider the system
Solve the above system by using Gauss-Seidel iteration starting with .
Algorithm for the conjugate gradient method
- Choose a starting vector (usually ). Compute the residual and set the first search direction .
- For repeat:
- Step length:
- Update the solution:
- Update the residual:
- Check convergence: stop if tolerance.
- Direction factor:
- New direction:
- The last is the solution.
The method needs a symmetric positive definite matrix and gives the exact solution in at most steps.
Gauss-Seidel solution
The matrix is diagonally dominant (, , ), so Gauss-Seidel converges. Rewrite the equations:
Start with and use the newest values at once.
| Iteration | |||
|---|---|---|---|
| 1 | 1.0000 | -0.8333 | -0.1875 |
| 2 | 0.5833 | -0.8264 | 0.0234 |
| 3 | 0.5868 | -0.7567 | 0.0479 |
| 4 | 0.6217 | -0.7543 | 0.0313 |
| 5 | 0.6228 | -0.7600 | 0.0286 |
| 6 | 0.6200 | -0.7605 | 0.0298 |
| 7 | 0.6198 | -0.7600 | 0.0301 |
| 8 | 0.6200 | -0.7600 | 0.0300 |
Example of iteration 1: ; ; .
Answer: .
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Conjugate gradient numerical (3,0,2 system) · Computational Techniques in Civil Engineering, chapter 2 · asked 2×
- Conjugate gradient numerical (5 iterations) · Computational Techniques in Civil Engineering, chapter 2
- Direct, iterative methods; Gauss-Seidel numerical · Computational Techniques in Civil Engineering, chapter 2
- Conjugate gradient numerical (2,-1 system) · Computational Techniques in Civil Engineering, chapter 2 · asked 2×
- Conjugate gradient method and algorithm · Computational Techniques in Civil Engineering, chapter 2 · asked 2×
- Conjugate gradient three iterations (10,-6,0) · Computational Techniques in Civil Engineering, chapter 2
- Gauss-Seidel: four unknowns · Numerical Method, chapter 3
- Gauss-Seidel: 10x+y-z=11.19 · Numerical Method, chapter 3
- Gauss-Seidel: 20x+y-2z=17 · Numerical Method, chapter 3
- Line flows by G-S after one iteration · Power System Analysis II, chapter 2
All Computational Techniques in Civil Engineering chapter 2 questions →