Sale!

ESO 208A Computer Assignment-2 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (2 votes)

Write a computer program for solving a system of linear equations Ax b  . The program should
have the following features:
Input: The program should read the following inputs from a text file – (i) the number of
equations (n), (ii) elements of the augmented matrix. [Please see an example of input data file
below].
Options: The user should have the option of selecting one of the following methods–
a. Gauss elimination (GE; without pivoting)
b. GE (with pivoting)
c. GE (with scaling and pivoting)
d. LU decomposition by using GE (without pivoting)
e. LU decomposition by using GE (with pivoting)
f. LU decomposition by using Crout method (without pivoting)
g. Cholesky decomposition (for symmetric positive definite matrix)
Output: The output from the program should be written in a text file. This file should contain
the following results for different methods–
a. GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of
U
b. LU by GE: the unknowns x, the permutation matrix (if pivoting is done), and the
elements of L and U
c. LU by Crout method: the unknowns x and the elements of L and U
d. Cholesky decomposition: the unknowns x and the elements of Cholesky factor, LC .
Submission
Make a single zip folder with all your program file(s) name it roll number_CA1.zip (e.g., If your
roll number is 123456, the folder name should be ‘123456_CA1.zip’). The folder should include –
(i) All the computer program file(s), input file(s) and output file(s)
(ii) A PDF file of the plots and the solution of the test cases given in this assignment.
Upload the zip file on mooKIT. In case of any difficulties with mooKIT upload, you may email
the solution to eso208.sec*@gmail.com, where * is section number 1-10. Example: for section
J5, it is eso208.sec5@gmail.com; for section J10, it is eso208.sec10@gmail.com. The subject
line of the email should be same as your folder name.
2
Suggestion: Test all the features of your program for at least 2 to 3 different datasets of
different sizes before submission.
Test data:

Sample input file
3
4.0 2.0 0.0 10.0
2.0 4.0 1.0 11.5
0.0 1.0 5.0 5.0
Sample output file
Crout method

x
1.5
2.0
0.5

L
4.0 0.0 0.0
2.0 3.0 0.0
0.0 1.0 4.667
U
1.0 0.5 0.0
0.0 1.0 0.3333
0.0 0.0 1.0
1 2
1 2 3
2 3
4 2 10
2 4 11.5
5 5
x x
x x x
x x
 
  
 