Question: PYTHON Programming Assignment by following Written Algorithm Step-by-Step Topic: Gaus-Jordan Elimination Written Algorithm (Please follow step-by-step in the code, write comments explaining): - Given an

PYTHON Programming Assignment by following Written Algorithm Step-by-Step

Topic: Gaus-Jordan Elimination

Written Algorithm (Please follow step-by-step in the code, write comments explaining):

- Given an nn matrix A, and a n1 vector b, solve for solution vector x where Ax = b

- Create augmented matrix C = [A | b]

- Set E = 1 (this is a parameter to check if the algorithm successfully found a unique solution)

- for j = 1 to n: (iterate through columns of matrix)

---- Find largest magnitude value in columnj only looking at rowj and below. This is the pivot (p).

PYTHON Programming Assignment by following Written Algorithm Step-by-Step Topic: Gaus-Jordan Elimination Written

---- if Algorithm (Please follow step-by-step in the code, write comments explaining): - Given= 0: set E = 0, exit

---- if p > j: flip rows p and j

---- Divide rowj by pivot value. This is the value at Cj,j . Before row swapping it was at Cp, j.

---- for all remaining rows, i/=j: rowi = rowi - Ci,j rowj

- if E == 1: a unique solution to the system of equations was found.

- else: the algorithm failed to find a unique solution

At the beginning, there should be a variable for the matrix. Test your code by trying different matrices. When finalizing, however, set the following values:

x + 2z = 1

2x + -y + 3z = -1

4x + y + 8z = 2

Provide screenshots of your code if you can. I will upvote if your solution helps me. Thank you! :)

Cp,j=maxi=jn{Ci,j} Cp,j

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!