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
-
In Problem 5-20 suppose that Huangs television-repair service cannot accommodate more than 10 TV sets at a time (under repair and waiting for service). What is the probability that the number of TV...
-
Every day, we are surrounded by history, but is it the proper history? Our country's and the world's histories can be quite unbalanced, which can lead to a lack of relationships with different...
-
It is said that "the higher the MARR, the higher the price that a company should be willing to pay for equipment that reduces annual operating expenses." Explain the reasoning behind this statement.
-
You are a young CPA just starting your own practice in Hollywood, California, after five years experience with a Big 4 firm. You have several connections in the entertainment industry and hope to...
-
Image transcription text An air conditioning unit converts moist air (state 1) at 30C,100 kPa and 70% relative humidity to 23C, 100 kPa and 40% relative humidity (state 3). First, 11 tons of heat...
-
Company A is a global company based in the United States that operates in the financial industry. Company A serves its customers with financial products, such as checking accounts, bank cards, and...
-
Given the above information, prepare the following: a. The necessary closing entries Example of Answer: Dr. Equipment 10,000 10,000 Cr. Cash b. How much is the ending capital after the closing...
-
In Fort Collins, Colorado, the sun shines for an average of 1850 hours per year. A homeowner installs a set of solar panels that provide 4.0 kW of electric power when the sun shines. If the local...
-
Homicide is the killing of a human being by another human being. Most jurisdictions retain the common law definition of the beginning of life: that life begins when a fetus is born alive. There are...
-
If you stuck a paperclip in each of the two slots of a GFI-protected outlet, then grabbed one paperclip with your right hand and the other paperclip with your left hand, would the GFI protect you?...
-
Dana Smith was a notorious drug dealer in a dangerous inner-city neighborhood. One afternoon, Stanley Jacobs visited Danas apartment for the purpose of buying illegal drugs. Dana sold Stanley three...
-
A moving muon lives longer, from the observers point of view, than a muon at rest. Is there a frame of reference in which a muons lifetime is shorter than its lifetime in a frame in which the muon is...
-
Amanda, David and Simon were comparing how much money they had in their retirement accounts now that all three of them just turned 65 (Assume they are exactly the same age). All of them had invested...
-
"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...
-
Use a HashMap to create a reusable class for choosing one of the 13 predefined colors in class Color. The names of the colors should be used as keys, and the predefined Color objects should be used...
-
Use SecureRandom method ints to generate a stream of 50 random numbers in the range 1 to 999, then filter the resulting stream elements to select only the odd numbers and display the results in...
-
(a) How many of male respondents in this study had some college degree? (b) How would you describe the largest group of respondents? (c) What could be stated about the differences between male and...
Study smarter with the SolutionInn App