Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For n = 2 , 3 , . . . . , generate a Hilbert matrix H and a n - vector b = Hx

For n =2,3,...., generate a Hilbert matrix H and a n-vector b=Hx using x, a n-vector with all
entries equal to 1. You can generate these via a function generatorHb. Using the
GaussElimination, forwardSubstitution, and backwardSubstitution functions developed in
Assignment 2, solve the system the system 2= to obtain the approximate solution 2. Find
the \infty norm of the residual =2 and of the error =2, where x is the true
solution, i.e., the n-vector with all entries equal to 1. How large can you take n before the error is
100%? Also monitor the cond(H) and see how this varies as a function of n.
Note:
1. Your PDf submission should include the complete algorithm package including the
following functions: GaussElimination, forwardSubstitution, backwardSubstitution,
generatorHb that work for a general \times matrix and n-vector.
2. You cannot use a built-in Gauss elimination or LU decomposition functions of the
program.
3. For each n, your program should print the following vectors: 2,, r
4. As part of your solution, you should present the following table in your PDF file
n & Cond(H)
2
3
:
5. Finally, you should also identify the n at which the error goes to 100%
To pass this challenge project, you must:
1. The data in point 3 and the table in point 4 in the Note above should be included in your
before your code in the pdf file.
2. Include the complete code for all the functions. Do not print images of the code or paste
code with a black background.
3. Obtain the correct answers for 2,, r for the different values of n.

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions