Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Solve this problem using Matlab. I know this is a big question! But please complete it as good as you can. Please show the

Please Solve this problem using Matlab. I know this is a big question! But please complete it as good as you can. Please show the code of how you get to the answers.
Thanks in advance!!
[An]ij=min(i,j), for example, A4=[1111122212331234],
(a)[2+1 marks] Implement the QR algorithm to compute the eigenvalues of A10. Use a suitable preliminary reduction,
but no shifts or deflation. Terminate when the largest magnitude entry on the subdiagonal is less than 0.510-10.
How many QR iterations are required? (Note: You may use built-in codes to compute the preliminary reduction
and the QR factorisation at each step, but you should implement the QR iteration yourself - i.e., not simply call
MATLABs eig routine!)[Bonus] Since A is symmetric, what form does the preliminary reduction take? What about
the resulting R? Is the structure of A preserved during the iterations? If not, why? Add an additional line of code
to ensure the structure is preserved.
(b)[2 marks] Repeat the above (including the preliminary reduction), but now using a Rayleigh shift and deflating with
a tolerance of 0.510-10 as described in the lecture notes. How many iterations are required here?
(c)[2 marks] Use your software system to compute the Cholesky factorisation of An for a few small values of n and hence
convince yourself that An is SPD. Comment on any interesting properties of the Cholesky factors L and LTT and
discuss how this property could be used to evaluate Anx in O(n) FLOPs. Use this idea to implement an efficient
normalised power iteration to find the largest eigenvalue of A1000.
(d)[4 marks] Implement the Lanczos algorithm with starting vector q1=[1,1,dots,1]TT to compute the reduced Hessenberg
factorisation of a matrix. Apply the algorithm to A10(preferably using the fast application of An derived in (CP1c))
to compute the kk reduced Hessenberg factorisation for k=1,dots,10. For each k compute the associated Ritz
values by computing the eigenvalues of the Hessenberg matrix Hk.(You may either use your built-in eigenvalue solver
to do this or adapt your code from (c), although I suggest the former.) On a single figure, plot the exact eigenvalues
(as returned by eig or your QR iteration in previous questions) as dots at height 11 and, for each k, plot the k Ritz
values as dots at a height k to produce an image similar to that on the front of the Heath textbook (see below).
Hint: The figure below shows the first 3 values, to get you on the right track. (Note: Since the one eigenvalue is way
bigger than the others, this results in a lot of white space, so perhaps manually adjust the x-axis to 0,6, e.g., via
xlim?([0,6]).
Left: Three iterations of Lanczos applied to A10. Middle: Same, but only showing Ritz/eigenvalues in [0,6]. Right: First 10 sets of Ritz
values for A100-1.
(e)[2 bonus marks] Prove that for any n the inverse of An is given by
An-1=[2-1???-12-1???ddotsddotsddots??-12-1??-11??].
(Note: The 1 in the bottom right is not a typo.)
(f)[2 marks] Use (CP1e) to implement an efficient variant of the inverse power iteration to find the smallest eigenvalue
of A100 to an accuracy of 10-10.(Hint: You may need as many as 20000 iterations (why?), so efficiency is key!)
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

What are the main objectives of Inventory ?

Answered: 1 week ago

Question

Explain the various inventory management techniques in detail.

Answered: 1 week ago