To complete this assignment, I suggest you download in class demo LSRandom.m from Canvas (lecutre notes...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
To complete this assignment, I suggest you download in class demo LSRandom.m from Canvas (lecutre notes page). You will need to modify this script suitably in order to complete the assign- ment. Also, you may find the following Matlab commands useful: 1. A=spdiags(rand(N.3), -1:1, N.N); which creates a tridiagonal matrix with random entries along each diagonal. 2. loglog(N_it, Err, 'r*'); which plots the error versus N in a loglog plot. 3. p-polyfit(log10(N_it), log10(Err), 1); which fits a straight line to the loglog data. In class we saw that finite-precision computations with Gaussian Elimination, implemented via Matlab's backslash command, leads to small errors for small matrices but possibly larger errors for larger matrices. The purpose of this assignment is to quantify the growth of this error for tridiagonal matrices. A tridiagonal matrix is a matrix with non-zero entries only on the main diagonal, as well as the diagonals above and below the main diagonal. A = a1,1 42,1 a1,2 0 0 02,2 0 a2,3 an-1,n-2 an-1.n-1 0 an.n-1 0 : 0 an-1.n ann Let A be a random Nx N tridiagonal matrix, = (1, 1.....1) be an N-vector of ones and b = Ar be the right-hand side vector. As in class, let z = (25) € RN be the resulting vector 2 =A\b. computed in finite precision using the backslash command. To measure the error between 2 and z. we let 8 = max |-zjl, j=1,...,N be the maximum componentwise difference between the two vectors. Since A is a matrix with random values, we need to run this calculation a number of times with different realizations of A in order to get a reasonable value for 8. Let M be the number of trials and suppose that for the kth trial the error is (). We define the mean error as follows: EN 5(1)+(2). 2+...+ 8(^)). M The goal of this assignment is to investigate the size of the matrix N = N* at which the mean error for Gaussian Elimination is EN 1. In other words, the point at which round-off error in Gaussian elimination is of the same magnitude as the vector I. In practice, your computer will likely not have the processing power to find N* exactly. Instead. you should extrapolate your data to find an estimate of N". Find Ex for reasonable values of N. make a plot of log10 (N) versus log10(EN) and then perform a suitable extrapolation. Your conclusions should be explained in a one-page report. Your report must include the following: (a) A plot of EN versus N for the values of N you choose. (b) Justification for the values of N and M you chose. (e) Explanation of how you do the extrapolation. (d) An estimation of the number N*. To complete this assignment, I suggest you download in class demo LSRandom.m from Canvas (lecutre notes page). You will need to modify this script suitably in order to complete the assign- ment. Also, you may find the following Matlab commands useful: 1. A=spdiags(rand(N.3), -1:1, N.N); which creates a tridiagonal matrix with random entries along each diagonal. 2. loglog(N_it, Err, 'r*'); which plots the error versus N in a loglog plot. 3. p-polyfit(log10(N_it), log10(Err), 1); which fits a straight line to the loglog data. In class we saw that finite-precision computations with Gaussian Elimination, implemented via Matlab's backslash command, leads to small errors for small matrices but possibly larger errors for larger matrices. The purpose of this assignment is to quantify the growth of this error for tridiagonal matrices. A tridiagonal matrix is a matrix with non-zero entries only on the main diagonal, as well as the diagonals above and below the main diagonal. A = a1,1 42,1 a1,2 0 0 02,2 0 a2,3 an-1,n-2 an-1.n-1 0 an.n-1 0 : 0 an-1.n ann Let A be a random Nx N tridiagonal matrix, = (1, 1.....1) be an N-vector of ones and b = Ar be the right-hand side vector. As in class, let z = (25) € RN be the resulting vector 2 =A\b. computed in finite precision using the backslash command. To measure the error between 2 and z. we let 8 = max |-zjl, j=1,...,N be the maximum componentwise difference between the two vectors. Since A is a matrix with random values, we need to run this calculation a number of times with different realizations of A in order to get a reasonable value for 8. Let M be the number of trials and suppose that for the kth trial the error is (). We define the mean error as follows: EN 5(1)+(2). 2+...+ 8(^)). M The goal of this assignment is to investigate the size of the matrix N = N* at which the mean error for Gaussian Elimination is EN 1. In other words, the point at which round-off error in Gaussian elimination is of the same magnitude as the vector I. In practice, your computer will likely not have the processing power to find N* exactly. Instead. you should extrapolate your data to find an estimate of N". Find Ex for reasonable values of N. make a plot of log10 (N) versus log10(EN) and then perform a suitable extrapolation. Your conclusions should be explained in a one-page report. Your report must include the following: (a) A plot of EN versus N for the values of N you choose. (b) Justification for the values of N and M you chose. (e) Explanation of how you do the extrapolation. (d) An estimation of the number N*.
Expert Answer:
Related Book For
Cost Management A Strategic Emphasis
ISBN: 978-0078025532
6th edition
Authors: Edward Blocher, David Stout, Paul Juras, Gary Cokins
Posted Date:
Students also viewed these accounting questions
-
If you were to complete this assignment , how would you write the introduction and conclusion? Create an introduction and conclusion to the following , both should be a half page each. You are the...
-
Each matrix i n Problems 1 to 3 corresponds to one of the linear transformations in Problem 54. Match each matrix with the corresponding image from Fig. 5. 1.9. 1. 2. 3. 0 and 0 0
-
A particle of mass m moves along a straight line with constant speed in the x direction, a distance b from the x axis (Fig. P13.14). Show that Keplers second law is satisfied by showing that the two...
-
Find the derivative of the function. y = e 2x tan 2x
-
Find the reactance of a 10.0-F capacitor at (a) 60 Hz, (b) 6 kHz, and (c) 6 MHz.
-
3. What statistics and portfolio characteristics should TAM present, assuming different levels of investment in the ProValue fund ($5 million, $10 million, and $15 million)? Optimal Risky Portfolio...
-
Which of the following arguments is most likely to be used in support of decentralizing the information systems audit function within an organization: a. A shortage of skilled information systems...
-
The Lorton Company acquired land containing coal. Lorton will restore the land to a condition suitable for recreational use after it has extracted the coal. Geological surveys estimate that the...
-
Please I want explain for this topic in details (paragrapgh ) Q) Explain this : Price-to-sales ratio
-
In this section, you will select five stocks from the provided list and determine their values by applying an appropriate valuation model from the following options: price to multiple model (earning...
-
1. There is a 40.70% probability of a below-average economy and a 59.30% probability of an average economy. If there is a below-average economy, Stocks A and B will have returns of -5.56% and -5.22%...
-
Dasan Electronics is considering two different systems that are expected to have the same performance. System A costs 427,000,000Won with a 6-year life, and requires 112,000,000Won in pretax annual...
-
We did not find results for: Beverly's portfolio is worth $76,000 and has three stocks. It has $14,000 of stock A, which has an expected return of 20.80%; it has 4,700 shares of stock B, which has a...
-
Duo Corporation is evaluating a project with the following cash flows. The company uses a discount rate of 8 percent and a reinvestment rate of 5 percent on all of its projects. Year Cash Flow 0 $...
-
As a financial manager of a large firm, you plan to borrow $70 million over the next year. Several options are available to your firm, all of which must be carefully considered. In your role as the...
-
Given 2x "+16x+40x=0 x=5, vo=4 (IVP-I) [1](a) Find the solution of IVP-I. Show all work to justify your answers. [1](b) Circle all appropriate terms describing IVP-II, justify each of your...
-
"Standard-cost procedures are particularly applicable to process-costing situations." Do you agree? Why?
-
Green Grow Inc. manufacturers riding lawn mowers that it sells to the large discount stores such as Wal-Mart, Lowes, and Home Depot. The mowers are marketed as a "value" product, with good quality at...
-
Seventh Generation, Inc. (SGI) manufactures environmentally friendly cleaning products, including laundry detergent, soap, and all-purpose cleaners. Prior to 2008, SGI would not do business with...
-
Consider the following balance sheet and income statement for Yum! Brands, Inc. (the company that operates Kentucky Fried Chicken and Pizza Hut), in condensed form, including some information from...
-
Discuss the pros and cons of a 360 - degree evaluation of the chief executive s performance.
-
List specific bylaws clauses that are bound to change as the organization evolves. How might these issues be handled in a start - up board and then in a more mature board?
-
Which data entry application control would detect and prevent entry of alpha betic characters as the price of an item in the inventory master file? a. field check c. completeness check b. limit check...
Study smarter with the SolutionInn App