Question: 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

Write a computer program for solving a system of linear equations Ax=b. The program should have the following

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) 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

Step by Step Solution

3.55 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Ill provide you with a Python program that reads the input from a text file solves a system of linear equations using various methods and writes the r... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!