COMPLETE THE EXTRA CREDIT PART IN PYTHON CODE

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

COMPLETE THE EXTRA CREDIT PART IN PYTHON CODE

Post by answerhappygod »

COMPLETE THE EXTRA CREDIT PART IN PYTHON CODE
Complete The Extra Credit Part In Python Code 1
Complete The Extra Credit Part In Python Code 1 (110.28 KiB) Viewed 26 times
Complete The Extra Credit Part In Python Code 2
Complete The Extra Credit Part In Python Code 2 (362.91 KiB) Viewed 26 times
Extra Credit (10 pts) (Coding): Convert your algorithm from (1) to output the PA = LU factorization of a matrix A. Note that here we are no longer dealing with augments matrices, but instead square matrices. Then, using this algorithm create a function which takes a matrix A and vector b as an input, outputs a solution to Ax b. =
1. (Coding) In this problem we will create code to solve a matrix using Gaussian elimination without partial pivoting. (a) Create a function that takes a matrix A, number c and two integers i and j as inputs, and outputs a matrix where row j is replaced with row i times c subtracted from row j. (b) Using part (a) create a function which takes as input a matrix A and an integer i and eliminates column i. That is, it outputs a matrix using part (a) multiple times where every entry below Ai,i, the diagonal element, are 0. (c) Create a function with an input of a matrix A that applies (b) multiple times so that the resulting matrix is upper triangular. Note that we are doing Gaussian elimination, so our input is really an augmented matrix, meaning that we have one more column than rows. (d) Create a function that takes as input a matrix A in upper triangular form and backsolves for your solution. Again, A is not square as we are dealing with an augmented matrix. Hint: Work this out on paper first. You should be able to write down an explicit formula for what your solution should be.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply