Question: in python. 5. 75 points Program B You will implement a program that solves a system of linear equations. The choice of method and algorithm
in python.
5. 75 points Program B You will implement a program that solves a system of linear equations. The choice of method and algorithm is up to you (LU-Decomposition, Gaus- sian Eliination or "Better" Gaussian Elimination). Your program will open and parse an input file (your program should accept the file name from the command line) with the tollowing format. The first line will contain an integer n that gives you the dimensions of the linear system. Following that, n lines with n space-delimited columns containing decimal numbers are given, representing the entries in a matrix A. Following that, on a single line are n more space-delimited numbers representing the vector b (transposed). An example: 4 1.66 3.79 2.65 4.25 4.46 1.46 8.51 3.14 3.51 1.44 8.26 7.87 0.40 3.31 1.97 2.30 1.54 2.84 9.07 8.44 Your program should perform some method to solve the system (or determine that no solution exists) and output the solution to the standard output. For example: -8.121 0.929 4.458 -0.074 Name your test case files input001.txt output001.txt . input002.txt . output002.txt respectively. 5. 75 points Program B You will implement a program that solves a system of linear equations. The choice of method and algorithm is up to you (LU-Decomposition, Gaus- sian Eliination or "Better" Gaussian Elimination). Your program will open and parse an input file (your program should accept the file name from the command line) with the tollowing format. The first line will contain an integer n that gives you the dimensions of the linear system. Following that, n lines with n space-delimited columns containing decimal numbers are given, representing the entries in a matrix A. Following that, on a single line are n more space-delimited numbers representing the vector b (transposed). An example: 4 1.66 3.79 2.65 4.25 4.46 1.46 8.51 3.14 3.51 1.44 8.26 7.87 0.40 3.31 1.97 2.30 1.54 2.84 9.07 8.44 Your program should perform some method to solve the system (or determine that no solution exists) and output the solution to the standard output. For example: -8.121 0.929 4.458 -0.074 Name your test case files input001.txt output001.txt . input002.txt . output002.txt respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
