Program 3

advertisement
Program 3 Foundations of Computational Math 2 Fall
2016
Due date: via email by 11:59PM on Wednesday, 24 February
Let A ∈ Rn×n be a nonsymmetric and nonsingular matrix with zero/nonzero element
structure that has nonzero elements on the main diagonal, i.e., αi,i = 0, the first superdiagonal, i.e., αi,i+1 = 0, the first subdiagonal, i.e., αi−1,i = 0, the fourth superdiagonal, i.e.,
αi,i+4 = 0, and the fourth subdiagonal, i.e., αi−4,i = 0. For n = 15 this has the form


∗ ∗ 0 0 ∗ 0 0 0 0 0 0 0 0 0 0
∗ ∗ ∗ 0 0 ∗ 0 0 0 0 0 0 0 0 0


 0 ∗ ∗ ∗ 0 0 ∗ 0 0 0 0 0 0 0 0


 0 0 ∗ ∗ ∗ 0 0 ∗ 0 0 0 0 0 0 0


∗ 0 0 ∗ ∗ ∗ 0 0 ∗ 0 0 0 0 0 0


 0 ∗ 0 0 ∗ ∗ ∗ 0 0 ∗ 0 0 0 0 0


 0 0 ∗ 0 0 ∗ ∗ ∗ 0 0 ∗ 0 0 0 0



0
0
0
∗
0
0
∗
∗
∗
0
0
∗
0
0
0
A=


 0 0 0 0 ∗ 0 0 ∗ ∗ ∗ 0 0 ∗ 0 0


 0 0 0 0 0 ∗ 0 0 ∗ ∗ ∗ 0 0 ∗ 0


 0 0 0 0 0 0 ∗ 0 0 ∗ ∗ ∗ 0 0 ∗


 0 0 0 0 0 0 0 ∗ 0 0 ∗ ∗ ∗ 0 0


 0 0 0 0 0 0 0 0 ∗ 0 0 ∗ ∗ ∗ 0


 0 0 0 0 0 0 0 0 0 ∗ 0 0 ∗ ∗ ∗
0 0 0 0 0 0 0 0 0 0 ∗ 0 0 ∗ ∗
Your task is to implement a factorization routine that given A in a suitably efficient
data structure returns the factors L and U where L is unit lower triangular and U is upper
triangular. In order to guarantee that pivoting is not required you may restrict A to be a
diagonally dominant matrix. You must also write routines that solve systems Lv = f and
Uv = f for arbitary vectors v and f and L and U matrices that result from your factorization
routine. Your code must be as efficient as possible in terms of the number of comptuations
and the storage required.
Your solution must include:
1. A discussion of the structure of the factors L and U.
2. A description of your factorization algorithm and triangular system solving algorithms.
3. A derivation of the computational complexity of your algorithms.
4. A description and justification for an efficient data structure to hold A and to return
L and U. Be specific about your data structure’s characteristics and how you access
elements in the data structure that correspond to specific elements in A, L and U.
1
5. A discussion of the design of the experiments to verify the code works correctly. Be
specific about the metrics used to assess the results generated by the code and the way
you generate examples.
6. A discussion of the nonzero patterns of L and U if partial pivoting (in a column) was
introduced to the algorithm and how it would affect your data structure. You do not
have to implement pivoting.
Submission of Results
Expected results comprise:
• A document describing your solutions as prescribed in the notes on writing up a programming solution posted on the class website.
• The source code, makefiles, and instructions on how to compile and execute your code
including the Math Department machine used, if applicable.
• Code documentation should be included in each routine.
• All text files that do not contain code or makefiles must be PDF files. Do not send
Microsoft word files of any type.
These results should be submitted by 11:59 PM on the due date. The preferred option of
submission of results is via FSU Dropbox at https://dropbox.ucs.fsu.edu. Drop the files
off for Joe McKenna, email jmckenna@fsu.edu. You should login to FSU Dropbox using
your MyFSU login. If for some reason you cannot use FSU Dropbox please email the files
to Joe at the email address above.
2
Download