7
Modifying Pivot Elemen ts in Gaussian Elimina tiom Name YI-JHOU LIN Life-time Distinguished P rofessor Jeng-Tzong Chen

Modifying Pivot Elements in Gaussian Eliminatiom

Embed Size (px)

DESCRIPTION

Modifying Pivot Elements in Gaussian Eliminatiom. Name : YI-JHOU LIN Life-time Distinguished Professor : Jeng-Tzong Chen. outline. LU decomposition: Modifying Pivot Elements 高斯消去法流程圖 數值計算的問題. Introduction. LU decomposition:. Modifying Pivot Elements. Start. Input A(N,N+1). - PowerPoint PPT Presentation

Citation preview

Modifying Pivot Elements in Gaussian Eliminatiom

Name : YI-JHOU LIN

Life-time Distinguished Professor :Jeng-Tzong Chen

outline

• LU decomposition:

• Modifying Pivot Elements

• 高斯消去法流程圖• 數值計算的問題

Introduction

LU decomposition:

Modifying Pivot Elements

bBy

bAx1

1

111 )( TeeB

Exchange I-th and K-th Lines

Output: SingularMatrix

Start

Input A(N,N+1)

DO I=1,N

A(I,I)=0

DO J≠I

A(J,K)=A(J,K)-A(I,K)/A(I,I)

DO K=1,N+1

NO

I=N?

Exist K>I suchThat A(K,I)≠0?

NO

YES

YES

STOP

YES

NO

Final Output

高斯消去法流程圖

當 aii=0 時• 由於在消去的過程中,我們會用到 ajk – aik/aii ,要是 aii = 0 時,該

如何處置?• 只要找到第 k 列的 aki 不為零,與第 i 列對調,即可得到新的不為

零的 aii

• 但在有限精度下可能產生的問題 :• 理論上高斯消去法可以精確地解出任何聯立線性方程式之解,然而電

腦的精確度有限,在某些情況下可能會發生問題• 由於在對第 k 列做第 i 列高斯消去法時必須用到 mki=aki/aii ,當

軸元素( pivot element, 即 aii )為零而造成發散的情形,我們已經以列交換的方式處理了

• 然而當 aii 雖然不為零,但是非常小時,小到接近電腦精確度時, mki 會變得非常大,這時候可能也會有誤差發生