Description

1 attachmentsSlide 1 of 1attachment_1attachment_1

Unformatted Attachment Preview

CS-MATH 143M

(Dr. Saleem)

PROJECT- I (20 points)

FALL 2021

NAME: ________________

DUE in class: Monday 9-27-2021

The purpose of this program is to test Gaussian Elimination (without pivoting) on Hilbert’s Matrix which is known to be

very ill-conditioned. We will also do an operation count and compute the errors in our solution.

DEFINITION : Hilbert Matrix, H, has each of its elements given by: aij = 1/(i + j -1) where i,j go from 1 to n.

MATLAB command >> hilb(5) will create a Hilbert Matrix of order 5×5. For example, in FORMAT RAT, if H denotes the

5×5 Hilbert Matrix, then its first row is 1 1/2 1/3 1/4 1/5 and second row is 1/2 1/3 1/4 1/5 1/6 RAT is for

Rational. We will do calculations in “format short”, so our final answers will have 4 decimal digits only.

PROBLEM

Consider three systems of equations defined by: H x = b , n = size of H. We will take n = 11,12 and 13, where b is a

vector chosen in such a way that the exact solution of our system is [1 1 1 1 …. 1].

(a) Write a program or use the one from our book’s website( https://sites.google.com/site/numericalanalysis1burden/home ),

that performs Gaussian Elimination (without pivoting) to compute the solution for each n (3 solution vectors in all). Your

program should also keep track of the number of multiplications (divisions). The OUTPUT should consist of the solution

vector x, and the norm of the error vector, as shown in the example below:

• for n = 5, the exact solution is, x = Transpose of [1.0 1.0 1.0 ……… …… ]

• computed solution = x*=Transpose of [0.9937 0.999 1.0001 …..]. Round to 4 decimals as you print the solution.

• error = exact solution minus computed solution = Transpose of [0.0063 0.001 0.0001 ….. ]

• infinity norm of the error vector is = 0.0063

• Euclidean norm of the error vector is = 0.0235

• Number of multiplications in my computer program = yyyy

• Number of multiplications for n=5, using the formula in our book, my answer should have been: __________

As shown above, print the seven bullet items for each case, n=11, case n=12 and case n=13, as follows:

Case n = 11

Put all 7 bullet points here

Case n = 12

Put all 7 bullet points here

Case n = 13

Put all 7 bullet points here

(b) Comment on the sources of error for parts (a). Type your answer here:

(c) On the back of this sheet, copy the Gaussian Elimination computer program that you used in part (a).

(d) The output for this project should fit on one sheet (front and back). You do not have to copy the problem statement.

Due in class, Monday September 27.

Purchase answer to see full

attachment

Tags:

Gaussian Elimination

pivoting

Hilberts Matrix

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.