.. Pvotng Tchnqus n Gussn Elmnton Lt us consr gn th st row oprton n Gussn Elmnton, whr w strt wth th orgnl ugmnt mtrx o th systm... N... N (A,... N (..- : : : : : N N N... NN N n prorm th ollowng row oprton, (A (,, (, ( - λ : N ( - λ : N ( - λ : N (..-............ ( N - λ N N : NN N ( λ : N To plc zro t th (, poston s sr, w wnt to n λ λ (..- ut wht hppns? > lows up to ±! λ Th tchnqu o prtl pvotng s sgn to vo such prolms n mk Gussn Elmnton mor roust mtho. s
Lt us rst xmn th lmnts o th st column o A, A(:, (..-4 : : N Lt us srch ll th lmnts o ths column to n th row #j tht contns th vlu wth th lrgst mgntu,.. or ll k,,..., N (..- j k or j mx k [,N] { k } (..- Snc th orr o th qutons os not mttr, w r prctly r to xchng rows # n j to orm th systm j j j... jn j... N ( A,... N : : : : : N N N... NN N row # j row # (..-7 Now, s long s ny o th lmnts o th st column o A r non-zro, j s non-zro n w r s to gn lmntng th vlus low th gonl n th st column. I ll th lmnts o th st column r zro, w mmtly s tht no quton n th systm mks rrnc to th unknown x, n so thr s no unqu soluton. W thror stop th lmnton procss t ths pont n gv up.
Th row-swppng procur outln n (..-, (..-, (..-7 s known s prtl pvotng oprton. For vry nw column n Gussn Elmnton procss, w st prorm prtl pvot to nsur non-zro vlu n th gonl lmnt or zrong th vlus low. Th Gussn Elmnton lgorthm, mo to nclu prtl pvotng, s For,,, N- % trt ovr columns slct row j > such tht mx {,,..., } j j, j, no unqu soluton xsts, STOP j, ntrchng rows n j N, For j,,, N % rows n column low gonl n n > λ j For k,,, N % lmnts n row j rom lt rght > jk jk - λ k n > j j - λ Bckwr susttuton thn procs, n th sm mnnr s or. Evn rows must swpp t ch column, computtonl ovrh o prtl pvotng s low, n gn n roustnss s lrg!
To monstrt how Gussn Elmnton wth prtl pvotng s prorm, lt us consr th systm o qutons wth th ugmnt mtrx (A, pvot (..-8 7 4 Frst, w xmn th lmnts n th st column to s tht th lmnt o lrgst mgntu s oun n row #. W thror prorm prtl pvot to ntrchng rows n. A, ( (..-9 4 7 W now prorm row oprton to zro th (, lmnt λ (..- 4 7, (A (, (, 4 (..- W now prorm nothr row oprton to zro th (, lmnt λ (, (, (..-
4 - - - - -, (A (, (, - - (..- W now mov to th n column, n not tht th lmnt o lrgst mgntu pprs n th r row. W thror prorm prtl pvot to swp rows n., (A -(, -(, - - (..-4 W now prorm row oprton to zro th (, lmnt. λ (..-, (A (, (, ( - -- - -
- 4 (..- Atr th lmnton mtho, w hv n uppr trngulr orm tht s sy to solv y ckwr susttuton. W wrt out th systm o qutons, x x x x x x 4 Frst, w n Thn, rom th n quton, (..-7 x 8 (..-8 ( x x 7 (..-9 An nlly rom th st quton x ( x x 9 (..- Th soluton s thror 9 x 7 8 (..-
Not tht n our prtl pvotng lgorth m, w swp rows to mk sur tht th lrgst mgntu lmnt n ch column t n low th gonl s oun n th gonl poston. W o ths vn th gonl lmnt s non-zro. Ths my sm lk wst ort, ut thr s vry goo rson to o so. It rucs th "roun-o rror" n th nl nswr. To s why, w must consr rly how numrs r stor n computr's mmory. I w wr to look t th mmory n computr, w woul n t rprsnt gtlly s squnc o ' n 's,.. ----------- ------------- yt # yt # To stor rl numr n mmory, w n to rprsnt t n such ormt. Ths s on usng lotng pont notton. Lt rl numr tht w wnt to stor n mmory. W o so y rprsntng t s som vlu Tht w wrt s ± [... t t ] t mchn prcson (..- Ech or An so s rprsnt y on t n mmory. s n ntgr xponnt n th rng L U L unrlow lmt U ovrlow lmt (..- s lso stor s nry numr, or xmpl w lloct yt (8 ts to storng, thn ± 7 4
Th lrgst s whn For whch So, sy n gnrl (..-4&(..- 4 4... mx 4 k k (..- mx k Whr k pns on numr o ts lloct to stor. (..-7 7
For th lrgst mgntu vrl tht cn stor n mmory, M M 8 7 4 ± 4 ± (..-4 [ ] 8 7 4 M (..- (..- so (..-7 rl, or mchn prcson t n, whr 4 t 9 8 k k.87x M k, In gn t t t U U U U M (..-8 W now us th ntty or gomtrc progrsson x, x x N N ] t (..- x (..-9 to wrt U [ t U M 4 t, or gvn t n k (.. how much mmory w wsh to lloct to storng ch numr, thr s mxmum n mnmum mgntu to th rl numrs tht cn rprsnt. W s th M m For t 8, or vrous k, U k, w hv th ollowng m n M, k U k -L m L- M U (- -t 4 7.x -.x 4 4.7x -.84x 9 8 4.x -78.x 77
Th typcl rprsntton on -t mchn s /- 8 t xponnt /- t mntss totl ts or ch rl numr Th mportnt pont to not s tht whn w wsh to stor rl numr n mmory, n gnrl cnnot xctly rprsnt y nt st o ts n lotng pont notton; crtnly ths s tru or, π,. Inst, w rprsnt t wth th closst possl vlu t [... ] ± t (..-, rpt so tht th rnc twn th tru vlu o n th rprsnt vlu s cll th roun-o rror, r( r( (..-4 For nry rprsntton o numr wth m M, rom (..-, w s tht th mgntu o th roun-o rror s t t r( ( ps (..-4 whr w n th mchn prcson s (ps -t, s MATLAB commn ps (..-4
Lt us wrt r( r (psx (..-44 Whr r s som numr o O( (.. s on th orr o xponnt o W wrt Thn, m x, whr m mntss o, lso O( (..-4 r( r r (psx (ps (..-4 m m F or ps <<, r( << (..-47 So, whn w ntlly ssgn vlu n mmory, th roun-o rror my smll. W wnt to mk sur tht ths ntl smll rror, s t propgts through our lgorthms, os not low up to com lrg. For xmpl, lt us tk th rnc o two clos, lrg numrs. x g. 9x (..-48 -g. so g <<, g (..-49 I so r(, g g r(g (..- g g [r( r(g ] (..- r(-g r ( r(g (..-
Lt us wrt r( r (psx, r(g r g (psx g (..- m x, g m g x g (..-4 thn g r( g g r (ps rg (ps (..- g m m g Lt us now tk th cs o numrs lk. x g. 9x (..-48, rpt or whch, n nry or cml notton, g n m m g << Thn g r( g ( r r m g m (ps g (..- s (r-r g O( m m g <<, w s tht compr to r( r m r( g g (ps r( r(g >>, g (..-4, rpt (..-7 Tkng th rnc twn two lrg, smlr numrs thror s, rom th vw o propgton o rror, snc th ccumult roun-o rror n th rsult s much lrgr thn t shoul rom rct ssgnmnt.
W wsh to sgn, n oprt, our lgorthms so tht th ccumult roun-o rrors o not grow lrgr, n lly cy to zro. I rror lows up, th rrors com lrgr n mgntu thn th vlus tht w r tryng to rprsnt, n w gt nstlty tht crshs th progrm. For xmpl, lt us sy tht w wsh to prorm th oprton λ (..-8 W rlly prorm th oprton on thr lotng pont rprsnttons Snc λ (..-9 r(, w sutrct ths qutons r ( r( λ λ nw (..- I λ λ, w cn wrt r ( r( λr( (..- I λ >, ny roun-o rror n s mgn urng ths oprton, ut λ <, thn rror ccumult to t y s crs s t s pss to th nw vlu o. In Gussn lmnton, w prorm numr o oprtons By prormng prtl pvotng, w nsur vorl rror propgton chrctrstcs. jk jk k nw j λ, λ (..- >, so λ < n th lgorthm hs j
W cn urthr nhnc ths vorl proprty o rror propgton y prormng complt, or ull, pvotng. In complt pvotng, on srchs or th mxmum mgntu lmnt not only n th currnt column, ut n othrs s wll. Th pvotng nvolvs not mrly ntrchng o rows, ut lso o columns. Ths mks th ook kpng mor complx s column ntrchng mpls n ntrchng o th vlus o th unknowns n thr poston n th so luton vctor x. Whl ull pvotng mprovs th ccurcy o clculton, y mor rply cyng th roun-o rror, t s not strctly ncssry or systms tht r wll-.. ll lmnts long ny gvn row,, N r ll o th sm orr o lnc, mgntu. W thror o not scuss ths tchnqu urthr. W now not tht wth th ton o prtl pvotng, Gussn lmnton provs roust mtho o solvng lnr qutons tht s sly mplmnt y computr. It thr rturns soluton to th lnr systm, or, no non-zro pvot lmnt oun, t rcognzs tht thr s no unqu soluton n STOP s. W thror hv pnl mtho tht cn us n hghr-lvl lgorthms to solv non-lnr lgrc qutons, prtl rntl qutons, tc. Frst, w must xmn n closr tl th xstnc n unqunss o solutons.