Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

---- if image text in transcribed= 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

why do we use pointers in c programming

Answered: 1 week ago