HomeWork2

 

 

Home News Lecture Outline Lecture Notes HomeWorks Project Quiz Miscellanea

©2000
Ting-Yuan Wang

 

Due date: next Wednesday (9/20) before the class

Problems: 

A. Implement Gaussian Elimination with partial and full Pivoting 

B. Implement LU Decomposition without concerning about the pivoting.(Chapter3.2-3.3, p50-p58)

Description: 

1. In order to test your codes and see if it works correctly. Please
write a sub-routine codes to read the input file. The file format is like:
sample1.txt

3 <--- size of the matrix is 3x3, RHS vector is 3x1

5 <--- RHS vector 3x1
8
7

1 2 1
<---- matrix 3x3
1 1 3
4 1 1


The first line n=3 means that the size of matrix is nxn=3x3 and vector is nx1=3x1.
The following n lines are the entries of the RHS vector.
Next n lines are the entries of the matrix with size nxn.

2. In your codes, make sure it can read the input file format described
above and print out the results of L, U, and solution of x. Since you will change the order of rows and columns, please remember to make yourself clear about solution x.
ex.
the solution of x=(x1,x3,x2)=(1,2,3).

We don't have to concern about the problem may caused by RHS vector as described in textbook p62.

3. In your program, it is better to have the following steps:

a) read input file
b) two sub-routine( partial and full pivoting ) methods for Gaussian Elimination 
c) regular LU decomposition without concerning about the pivoting problem 
d) print out the results of L, U, and x for each method

4. You don't have to hand in the figure of run time v.s. size. 

Submission:

    Please submit a paper version( before class )  and electronic version( by e-mail ) to TA.

 

Home ] News ] Lecture Outline ] Lecture Notes ] HomeWorks ] Project ] Quiz ] Miscellanea ]

Electrical and Computer Engineering ~ University of Wisconsin-Madison ~ 1415 Engineering Drive Madison, WI 53706-1691 ~ Tel: 608/262-3840 ~ Fax: 608/262-1267
Last modified: 10/16/99 04:22 PM by Ting-Yuan