Exercises — Iterative methods — Jacobi, Gauss-Seidel, convergence
4.8.20 · D4· Maths › Numerical Methods › Iterative methods — Jacobi, Gauss-Seidel, convergence
Poore note mein, woh system hai, -va guess hai, rahega jab tak kuch aur na bataya jaye. Hum parent note wala splitting use karte hain ( = diagonal, = strictly-lower part, = strictly-upper part).
L1 · Recognition
Exercise 1.1 — , , padhna
Diya gaya hai , , aur likhो taaki ho (yaad rakho strictly-lower part hai).
Recall Solution 1.1
Kya karte hain: diagonal mein copy karo, below-diagonal entries (negate karke) mein, aur above-diagonal entries (negate karke) mein. ke below-diagonal entries hain . Kyunki ka strictly-lower part hai, hum set karte hain . Above-diagonal entries hain , toh . Check: ✓
Exercise 1.2 — Kya yeh strictly diagonally dominant hai?
Usi ke liye, decide karo ki yeh strictly diagonally dominant (SDD) hai ya nahi: har row mein.
Recall Solution 1.2
- Row 1: ✓
- Row 2: ✓
- Row 3: ✓ Saari rows pass karti hain, toh SDD hai. Parent ke sufficient condition se, Jacobi aur Gauss-Seidel dono kisi bhi start se converge karte hain.
Exercise 1.3 — Method ko iteration matrix se match karo
Batao ki kis method ka iteration matrix hai aur kis ka , aur ek sentence mein batao ki formulas kya physical difference encode karte hain.
Recall Solution 1.3
Jacobi hai; Gauss-Seidel hai. Difference: Jacobi sirf invert karta hai (saari purani values ek saath use hoti hain); Gauss-Seidel poora lower-triangular invert karta hai, matlab yeh abhi-abhi update hue components ko usi sweep mein absorb karta hai.
L2 · Application
Exercise 2.1 — Do Jacobi sweeps
Solve karo Jacobi se, se start karke. aur 4 decimals tak report karo. (Exact solution hai .)
Recall Solution 2.1
Jacobi har row ko apne variable ke liye rearrange karta hai, sirf purani values use karke:
- ( se): , . Toh .
- ( se): , . Toh . ke aas-paas aa rahe hain.
Exercise 2.2 — Do Gauss-Seidel sweeps (same system)
Exercise 2.1 ko Gauss-Seidel se repeat karo. aur report karo.
Recall Solution 2.2
Gauss-Seidel -equation mein fresh use karta hai:
- : ; phir . Toh .
- : ; phir . Toh . Jacobi ke se compare karo: Gauss-Seidel already ke andar hai — clearly faster.
Exercise 2.3 — Residual compute karo aur stop karna decide karo
Gauss-Seidel iterate use karke, residual aur uska max-norm compute karo. Tolerance ke saath, kya hum stop karein?
Recall Solution 2.3
Yaad karo = sabse bada absolute component = . Kyunki , hum abhi stop nahi karte — ek aur sweep chahiye.
L3 · Analysis
Exercise 3.1 — Eigenvalues se convergence predict karo
ke liye banao, uske eigenvalues aur nikalo, aur batao ki Jacobi converge karta hai ya nahi aur kitni tezi se.
Recall Solution 3.1
, ( ke off-diagonal entries, kyunki ). Yeh eigenvalues kyun hain (characteristic polynomial dikhao): matrix ke liye , set karo: Toh ⇒ converges, aur error har sweep mein factor se shrink hoti hai. Rate as digits per sweep: ek decimal digit matlab error se divide hona; har sweep se multiply karti hai, toh sweeps chahiye jahan , yaani sweeps per digit.
Exercise 3.2 — Ek borderline non-SDD matrix
. Pehle SDD test karo, phir compute karo aur decide karo ki Jacobi converge karta hai ya nahi. Aakhir mein, ek genuinely non-SDD companion matrix do jo phir bhi converge kare, yeh dekhne ke liye ki SDD sirf sufficient hai.
Recall Solution 3.2
Diye gaye par SDD test: Row 1: ✓; Row 2: ✓. Toh yeh strictly diagonally dominant hai (barely, lekin strictly), aur sufficient condition se convergence already guaranteed hai. Diye gaye ke liye compute karo: , toh (off-diagonal entries, ke according negate kiye). Characteristic polynomial: , toh Isliye ⇒ Jacobi converges (error roughly har sweep mein half hoti hai), SDD guarantee ke consistent. Ab "sufficient not necessary" wala point. Genuinely non-SDD companion lo: Row 1 deta hai , toh SDD nahi hai. Iska Jacobi matrix hai , jahan aur toh — SDD fail hone ke baavajood converges. Yahi L3 ka poora lesson hai.
Exercise 3.3 — Divergence forecast karo phir verify karo
. Diagonal dominance se forecast karo, phir compute karke confirm karo, aur ek one-row-swap fix do.
Recall Solution 3.3
Forecast: Row 1: — badly non-dominant, likely diverges. (kyunki ). Yeh eigenvalues kyun hain: , toh Isliye ⇒ diverges. ✓ Fix: do rows swap karo aur milega, jo SDD hai (, ) — ab converge karega.
Teeno L3 cases ek hi picture mein hain. Teal aur orange curves ( aur ) zero ki taraf collapse karti hain — woh convergence hai — jabki plum curve ( wali) plot ke upar se bahar nikal jaati hai: divergence. Dashed line error mark karti hai; ek method converge karta hai exactly tab jab uski bounding curve neeche dive kare aur wahin rahe. Yahi "" ka visual meaning hai.

L4 · Synthesis
Exercise 4.1 — Jacobi vs Gauss-Seidel spectral radii compare karo
ke liye dono aur compute karo, aur model-problem relation verify karo.
Recall Solution 4.1
, , . Jacobi: . Yeh eigenvalues kyun hain: , toh , toh . Gauss-Seidel: , . Yeh eigenvalues kyun hain: upper-triangular hai, toh uske eigenvalues diagonal par baithe hain — aur (formally ). Isliye . Wakai ✓ — Gauss-Seidel yahan do guna tezi se converge karta hai (digits ke terms mein).
Exercise 4.2 — Gauss-Seidel sweep ke liye update banao
Exercise 1.1 ke SDD matrix ke liye ke saath, se ek Gauss-Seidel sweep karo. 4 decimals tak report karo.
Recall Solution 4.2
Rows: , , . Gauss-Seidel, order mein, hamesha newest available use karte hue:
- .
- .
- . Toh .
L5 · Mastery
Exercise 5.1 — Prove karo ki error recurrence geometric decay deta hai
Maano fixed point ke saath. Dikhao kisi bhi induced norm ke liye, aur explain karo kyun sharp condition hai even jab .
Recall Solution 5.1
Fixed-point equation ko iteration se subtract karo: Koi bhi induced (operator) norm lo aur sub-multiplicativity baar baar use karo: Agar toh yeh already force karta hai. Lekin se zyada ho sakta hai jabki iteration phir bhi converge kare: sharp fact yeh hai ki (Gelfand's formula). Isliye , kisi bhi single norm se independent. Norm bound ek convenient sufficient handle hai; exact truth hai.
Exercise 5.2 — SOR ke liye intuition design karo
Successive Over-Relaxation (SOR — Successive Over-Relaxation) purane iterate ko ek Gauss-Seidel step ke saath blend karta hai: . Exercise 4.1 ke model matrix ke liye, Gauss-Seidel ka hai. Qualitatively argue karo kyun ek well-chosen ("over-relaxation") ko beat kar sakta hai, aur woh range of batao jo SOR ko symmetric positive-definite matrix ke liye convergent rakhta hai.
Recall Solution 5.2
Over-relax () kyun? Gauss-Seidel solution ki taraf ek "safe" step leta hai. Agar successive corrections baar baar usi same direction mein point karte hain — jo smooth SPD problems mein hota hai, jahan error ek slowly-decaying eigenvector se dominate hoti hai — toh har safe step systematically bahut chhota hota hai. Correction ko se multiply karna usi consistent direction mein aage extrapolate karta hai, toh hum remaining distance kam sweeps mein cover karte hain. set karne par plain Gauss-Seidel milta hai; ("under-relaxation") step chhota karta hai, sirf tab useful jab Gauss-Seidel overshoot kare. Convergence range (Ostrowski–Reich): symmetric positive-definite ke liye, SOR iteration converge karta hai if and only if Us band ke bahar extrapolation itna zyada overshoot karta hai ki aur error badh'ti hai. Andar ek single optimal hai jo minimize karta hai; 2D model-Laplacian grid ke liye, jaata hai jab mesh refine hoti hai, jo Gauss-Seidel ke upar ek dramatic speedup deta hai. Aisi large sparse systems exactly woh hain jahan iterating Gaussian Elimination ko beat karta hai — unke origin ke liye Finite Difference Methods for PDEs dekho aur per-sweep cost ke paas kyun rehti hai iske liye Sparse Matrices dekho.
Recap
Recall Model matrix
par kaun faster hai, aur kitna? Gauss-Seidel: vs Jacobi , toh — har sweep mein do gune zyada correct digits.
Recall Exact necessary-and-sufficient convergence condition kya hai?
(spectral radius ek se kam); SDD sirf ek sufficient shortcut hai.