Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main

Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main diagonal and an (n 1) 1 vector w representing the upper diagonal. Using basic programming (for loops, while loops, and if statements): (a) Write a function that inputs dimension n; column vectors v, w; then uses the inner product formulation of Choleskys method to find the Cholesky factor, and then outputs the number of flops used. Print out or write out this function and turn it in. (b) Run your program for n = 10, 100, 400, and v the vector of all 2s and w the vector of all 1s. Print out or write out your results and turn them in.

image text in transcribed

Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main diagonal and an (n -1) x 1 vector w representing the upper diagonal. Using basic programming (for loops, while loops, and if statements): (a) Write a function that inputs dimension n; column vectors v, w; then uses the inner product formulation of Cholesky' s method to find the Cholesky factor, and then outputs the number of flops used. Print out or write out this function and turn it in. (b) Run your program for n - 10, 100, 400, and v the vector of all 2' s and w the vector of all 1' s. Print out or write out your results and turn them in Programming: 1. Let A be a symmetric, positive definite, tridiagonal matrix. We store A as two vectors: an n 1 vector v representing the main diagonal and an (n -1) x 1 vector w representing the upper diagonal. Using basic programming (for loops, while loops, and if statements): (a) Write a function that inputs dimension n; column vectors v, w; then uses the inner product formulation of Cholesky' s method to find the Cholesky factor, and then outputs the number of flops used. Print out or write out this function and turn it in. (b) Run your program for n - 10, 100, 400, and v the vector of all 2' s and w the vector of all 1' s. Print out or write out your results and turn them in

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

In your opinion TikTok will overtake Instagram and Facebook? why?

Answered: 1 week ago

Question

Presentations Approaches to Conveying Information

Answered: 1 week ago