CombinedPracticeQs

pdf

School

University of New South Wales *

*We aren’t endorsed by this school

Course

2089

Subject

Mathematics

Date

Apr 3, 2024

Type

pdf

Pages

94

Uploaded by EarlFreedomWildcat32

Report
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python (with defined to be the relative machine precision for )? (ii) What are the elements of after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] A technician claims that the amount of energy used in a chemical reaction (in appropriate units) is and that the measurement was made to significant figures. (i) Give the correctly rounded value for . (ii) Give an estimate of the absolute error in . MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python:
(iii) Give an estimate of the relative error in . (c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression is good for implementation on a computer. This expression risks a potential catastrophic cancellation.
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Consider the by linear system where is lower triangular. Estimate the largest value of such that the linear system can be solved in minutes. (b) [ 4 marks ] The storage requirement of by matrices with special structures are given in the table below. by matrix Storage requirement No special structure Symmetric Upper/lower triangular Tridiagonal Toeplitz Sparse with nonzero elements Estimate the size of the largest by symmetric matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible unit upper triangular matrix and . A programmer claims that the best strategy to solve two linear systems and is to first calculate the inverse and then compute and . Justify or refute this claim. TRUE. Computing the inverse of the matrix is the most efficient way. FALSE. Better to use forward or back substitution to solve for .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] Is the matrix symmetric? Tick ALL answers that apply.
(b) [ 2 marks ] Calculate the density of . (c) [ 2 marks ] Calculate the condition number of the matrix in -norm. (d) [ 4 marks ] The MATLAB command calculates the approximate minimum degree permutation of , and a spy plot of is shown in the figure above. (i) What does this aim to achieve? (ii) Is this successful on this example? Yes, since . Not enough information, since we cannot deduce that is symmetric from its spy plot. No, since . Yes, since looks to be symmetric from its spy plot. Yes, since . No, since . To decrease the density of the matrix . To improve the condition number of the matrix . To reduce fill-in in the Cholesky factorization of the matrix . To perform pivoting to improve numerical stability in the factorization of the matrix . No. Yes. Not enough information.
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] Is the matrix symmetric? Tick ALL answers that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Calculate the density of the matrix from the factorization. (c) [ 2 marks ] Give the condition number of the matrix in -norm. (d) [ 2 marks ] It is claimed that another matrix with condition number is ill-conditioned. Do you agree? (e) [ 2 marks ] What are the upper bandwidth and lower bandwidth of ? Yes, since looks to be symmetric from its spy plot. Not enough information, since we cannot deduce that is symmetric from its spy plot. No, since . Yes, since . No, since does not look to be symmetric from its spy plot. Yes, since . No, the condition number of the matrix is reasonable. Not enough information. Yes, the condition number of the matrix is too large. 19 1
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 5 0 0.5 1.0 1.5 2.0 8.1 7.2 4.9 3.1 0.2 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? 5
(b) [ 2 marks ] It is claimed that the solution to the linear system is given by , where . Is this correct for this example? (c) [ 2 marks ] What do the MATLAB commands above calculate? (d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are 3 YES. This gives one of the many possible solutions. NO. The inverse of exists but the solution is not given by . YES. The inverse of exists and the unique solution is given by . NO. The inverse of does not exist. The least squares approximation to the data using the quadratic model . The least squares approximation to the data using the linear model . The least squares approximation to the data using the exponential model . The exact solution to the linear system . 8.18 - 1.98*x - x^2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
NOTE: Related (not necessarily the same) Python commands are It is claimed that this implies that the matrix is not orthogonal. Justify or refute this claim. TRUE. The matrix is not orthogonal since . FALSE. The matrix is orthogonal since .
You will need to use MATLAB or Python to answer this question. We want to find the interpolating polynomial for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 5 5 3.6249717 -3.356568 1.2626145 -0.181875 0.0088541 0 0 0.7402218
<RX DUH JLYHQ WKH UHVXOWV RI WKH IROORZLQJ 0$7/$% FRPPDQGV DQG VRPH UHODWHG VS\ SORWV FRUUHVSRQGLQJ WR D PDWUL[ ZLWK UHDO QXPEHU HQWULHV± 127(² 5HODWHG ³QRW QHFHVVDULO\ WKH VDPH´ 3\WKRQ FRPPDQGV DUH
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
±D² > ³ PDUNV @ ,V WKH PDWUL[ V\PPHWULF" *LYH UHDVRQV IRU \RXU DQVZHUV± ±E² > ³ PDUNV @ ,V WKH PDWUL[ SRVLWLYH GHÀQLWH" *LYH UHDVRQV IRU \RXU DQVZHUV± 7UXH )DOVH (TXDWLRQ (GLWRU 6W\OHV )RQW 6L]H 6LQFH UHODWLYH HUURU JLYHQ E\ V\PFKN QRUP±$²$·³´µ¶QRUP±$³´µ ¸¹º»º¼H²»´¼ LV VPDOO³ PDWUL[ $ LV V\PPHWULF¹ :RUGV± ²³ 7UXH )DOVH
±F² > ´ PDUNV @ :KDW DUH WKH VWHSV WR VROYH XVLQJ WKH &KROHVN\ IDFWRUL]DWLRQ " ±G² > ´ PDUNV @ :KDW GRHV WKH 0$7/$% FRPPDQG DLP WR DFKLHYH" ,V LW VXFFHVVIXO RQ WKLV H[DPSOH" (TXDWLRQ (GLWRU 6W\OHV )RQW 6L]H )URP WKH VS\ SORWV³ \RX NQRZ WKDW &KROHVN\ IDFWRULVDWLRQ RI $ H[LVWV¹ $OVR³ LQ WKH DERYH TXHVWLRQ LW ZDV SURYHQ WKDW WKH PDWUL[ LV V\PPHWULF¹ 7KHUHIRUH XVLQJ WKH HTXLYDODQFH RI WKH IROORZLQJ ½ $ LV V\PPHUWULF DQG SRVLWLYH GHÀQLWH ½ $ LV V\PPHWULF DQG DOO HLJHQYDOXHV RI $ DUH SRVLWLYH ½ &KROHVN\ IDFWRULVDWLRQ $ 5¾ 5 H[LVWV ±XQLTXHµ 7KXV³ VLQFH &KROHVN\ IDFWRULVDWLRQ RI $ H[LVWV³ PDWUL[ $ LV SRVLWLYH GHÀQLWH¹ :RUGV± ´² (TXDWLRQ (GLWRU 6W\OHV )RQW 6L]H $[ E ! $¾ $[ $¾ \ ! <X \ ! 5¾ 5X \ ! 5¾ ] \ ! 5X ] ´¹ &RPSXWH < $¾ $ ¿¹ &RPSXWH \ $¾ E Á¹ )LQG &KROHVN\ IDFWRULVDWLRQ RI < 5¾ 5 XVLQJ >5³N@ FKRO±$µ ZKHUHE\ $ 5¾ ½ 5 ¸¹ 6ROYH 5¾ ] \ E\ IRUZDUG VXEVWLWXWLRQ XVLQJ ] 5¾ ? \ º¹ 6ROYH 5X ] E\ EDFNZDUG VXEVWLWXWLRQ X 5 ? ] :RUGV± µ³
(TXDWLRQ (GLWRU 6W\OHV )RQW 6L]H 0$7/$% V\PUFP ±V\PPHWULF UHYHUVH &XWKLOO²0F.HH SHUPXWDWLRQµÂ UHRUGHU FROXPQV DQG URZV RI D PDWUL[ WR PRYH QRQ²]HUR HOHPHQWV FORVHU WR WKH GLDJRQDO³ WR \LHOG D EDQGHG PDWUL[³ VR WKDW WKH FRUUHVSRQGLQJ &KROHVN\ IDFWRULVDWLRQ ZLOO EH EDQGHG WRR ±ÀOO²LQ RFFXUV ZLWKLQ EDQGVµ ,Q WKLV H[DPSOH³ S V\PUFP±$µ GLG ZRUN DV LQGLFDWHG LQ WKH VS\SORW RI $±S³Sµ VLQFH WKH QRQ²]HUR HOHPHQWV DUH QRZ PXFK FORVHU WR WKH GLDJRQDO DV FRPSDUHG WR WKH QRQ²]HUR HOHPHQWV LQ WKH VS\SORW RI $ :RUGV± ´´
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python (with defined to be the relative machine precision for )? (ii) What are the elements of after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] A technician claims that the amount of energy used in a chemical reaction (in appropriate units) is and that the measurement was made to decimal places. (i) Give the correctly rounded value for . (ii) Give an estimate of the absolute error in . MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python:
(iii) Give an estimate of the relative error in . (c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression risks a potential catastrophic cancellation. This expression is good for implementation on a computer.
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Estimate how long it will take to solve the by linear system where is symmetric and positive definite and . (b) [ 4 marks ] Estimate the size of the largest by matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible matrix with no special structure and . A programmer claims that the best strategy to solve two linear systems and is to first calculate the inverse and then compute and . Justify or refute this claim. 0.039 seconds 18 minutes 8.9 minutes 7.6E-6 seconds FALSE. Better to compute the factorization of the matrix once, then use forward and back substitutions to solve for . TRUE. Computing the inverse of the matrix is the most efficient way.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] You are told that has the Cholesky factorization . Tick ALL statements that apply.
(b) [ 2 marks ] Is the matrix positive definite? Tick ALL answers that apply. (c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? (d) [ 4 marks ] The elements of the coefficient matrix are known exactly and the elements of the right-hand-side vector are known to significant figures. From the above MATLAB results it can be deduced that the -norm condition number of the matrix is . (i) Give an estimate on the relative error in the computed solution to . (ii) How many significant figures do you have in the computed solution? The matrix is lower triangular. The matrix is upper triangular. All the diagonal elements of are positive. All the diagonal elements of are equal to . All the diagonal elements of are nonzero. No, since is not symmetric because . Yes, since is symmetric and its Cholesky factorization exists. Yes, since all eigenvalues of are positive. Not enough information, since we cannot deduce that is symmetric from its spy plot. Yes, since is symmetric and all its eigenvalues are positive. Solve for by back substitution, and then solve for by forward substitution. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution. Solve for by forward substitution, and then solve for by back substitution.
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] You are told that has an factorization . Tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Is an identity matrix this example? Tick ALL answers that apply. (c) [ 2 marks ] What are the steps to solve using the factorization ? (d) [ 4 marks ] From the above MATLAB results it can be deduced that the -norm condition number of the matrix is . You want to guarantee significant figures in the computed solution to . The elements of the coefficient matrix are known exactly. (i) Estimate the relative error in the right-hand-side vector that would be required to guarantee this. (ii) How many significant figures do you need in the right-hand-side vector ? All the diagonal elements of are equal to . The matrix is upper triangular. The matrix is obtained by swapping columns of the identity matrix. The matrix is obtained by swapping rows of the identity matrix. All the diagonal elements of are equal to . The matrix is lower triangular. No, from the spy plot of we see that is not even a diagonal matrix. Yes, is always the identity matrix. Not enough information, since we cannot tell the entries of from its spy plot. No, will never be the identity matrix. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution. The desired accuracy on is impossible to achieve. The desired accuracy on is impossible to achieve.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 5 0 0.5 1.0 1.5 2.0 0.2 3.1 4.9 7.2 8.1 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? (b) [ 2 marks ] It is claimed that the solution to the linear system is given by , where . Is this correct for this example? 5 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 2 marks ] What do the MATLAB commands above calculate? (d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are NOTE: Related (not necessarily the same) Python commands are Explain why ? YES. This gives one of the many possible solutions. NO. The inverse of exists but the solution is not given by . NO. The inverse of does not exist. YES. The inverse of exists and the unique solution is given by . The exact solution to the linear system . The least squares approximation to the data using the exponential model . The least squares approximation to the data using the linear model . The least squares approximation to the data using the quadratic model . 0.22 + 5.98*x -x^2 Since , and is not an identity matrix. This is due to the limited floating point precision.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You will need to use MATLAB or Python to answer this question. We want to find the interpolating polynomial for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 5 5 5.4847307 -7.517792 3.2512343 -0.506354 0.0257812 0 0 1.9796338
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 3 marks ] Is the matrix symmetric? Give reasons for your answers. (b) [ 3 marks ] Is the matrix positive definite? Give reasons for your answers. True False Equation Editor Styles Font Size Since relative error given by symchk = norm(A-A’,1)/norm(A,1) = 5.5511e-16 is small and close to eps, matrix A is symmetric. Words: 20 True False Equation Editor Styles Font Size A matrix is positive definite if it has a Cholesky factorisation . Words: 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? (d) [ 2 marks ] What does the MATLAB command aim to achieve. Is it successful on this example? Equation Editor Styles Font Size Step 1. Cholesky factorisation A = R' R Step 2. Forward substitution - solve R' y for x Step 3. Back substitution - solve Rx = y Words: 27 Equation Editor Styles Font Size MATLAB symrcm (symmetric reverse Cuthill-McKee permutation): reorder columns and rows of a matrix to move non-zero elements closer to the diagonal, to yield a banded matrix, so that the corresponding Cholesky factorisation will be banded too (fill-in occurs within bands) In this example, p = symrcm(A) did work as indicated in the spyplot of A(p,p) since the non-zero elements are now much closer to the diagonal as compared to the non-zero elements in the spyplot of A Words: 77
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python (with defined to be the relative machine precision for )? (ii) What are the elements of after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] A technician claims that the amount of energy used in a chemical reaction (in appropriate units) is and that the measurement was made to decimal places. (i) Give the correctly rounded value for . (ii) Give an estimate of the absolute error in . MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(iii) Give an estimate of the relative error in . (c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression risks a potential catastrophic cancellation. This expression is good for implementation on a computer.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Estimate how long it will take to solve the by linear system where is symmetric and positive definite and . (b) [ 4 marks ] Estimate the size of the largest by matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible matrix with no special structure and . A programmer claims that as solving a linear system takes around seconds, solving ten linear systems for will take around seconds. Justify or refute this claim. 0.0100 seconds 2.9E-6 seconds 3.1 minutes 1.5 minutes TRUE. It takes times longer to compute the solution of linear systems. FALSE. Just need to compute the factorization of the matrix once, then use forward and back substitutions to solve for . This will not take much more than seconds.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] You are told that has the Cholesky factorization . Tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Is the matrix positive definite? Tick ALL answers that apply. (c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? (d) [ 4 marks ] The elements of the coefficient matrix are known to significant figures and the elements of the right-hand-side vector are known to significant figures. From the above MATLAB results it can be deduced that the -norm condition number of the matrix is about . (i) Give an estimate on the relative error in the computed solution to . (ii) How many significant figures do you have in the computed solution? The matrix is upper triangular. All the diagonal elements of are nonzero. All the diagonal elements of are equal to . The matrix is lower triangular. All the diagonal elements of are positive. Yes, since is symmetric and its Cholesky factorization exists. No, since is not symmetric because . Yes, since is symmetric and all its eigenvalues are positive. Not enough information, since we cannot tell whether or not is symmetric from the spy plot of . Yes, since all eigenvalues of are positive. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] You are told that has an factorization . Tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Is an identity matrix this example? Tick ALL answers that apply. (c) [ 2 marks ] What are the steps to solve using the factorization ? (d) [ 4 marks ] From the above MATLAB results it can be deduced that the -norm condition number of the matrix is . You want to guarantee significant figures in the computed solution to . The elements of the coefficient matrix are known exactly. (i) Estimate the relative error in the right-hand-side vector that would be required to guarantee this. (ii) How many significant figures do you need in the right-hand-side vector ? All the diagonal elements of are equal to . All the diagonal elements of are equal to . The matrix is lower triangular. The matrix is obtained by swapping columns of the identity matrix. The matrix is upper triangular. The matrix is obtained by swapping rows of the identity matrix. No, will never be the identity matrix. Yes, is always the identity matrix. Not enough information, since we cannot tell the entries of from its spy plot. No, from the spy plot of we see that is not even a diagonal matrix. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution. The desired accuracy on is impossible to achieve. The desired accuracy on is impossible to achieve.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 5 0 0.5 1.0 1.5 2.0 0.2 3.1 4.9 7.2 8.1 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? 5
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] It is claimed that the solution to the linear system is given by , where . Is this correct for this example? (c) [ 2 marks ] What do the MATLAB commands above calculate? (d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are 3 NO. The inverse of exists but the solution is not given by . YES. This gives one of the many possible solutions. YES. The inverse of exists and the unique solution is given by . NO. The inverse of does not exist. The least squares approximation to the data using the quadratic model . The least squares approximation to the data using the linear model . The least squares approximation to the data using the exponential model . The exact solution to the linear system . 0.22 + 5.98*x - x^2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
NOTE: Related (not necessarily the same) Python commands are It is claimed that this implies that the matrix is not orthogonal. Justify or refute this claim. TRUE. The matrix is not orthogonal since . FALSE. The matrix is orthogonal since .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You will need to use MATLAB or Python to answer this question. We want to find the cubic polynomial of best fit in the least squares sense for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 6 4 0.7627067 0.1698664 -0.008611 -0.000925 0 0 0 0.9288635
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 3 marks ] Is the matrix symmetric? Give reasons for your answers. (b) [ 3 marks ] Is the matrix positive definite? Give reasons for your answers. True False Equation Editor Styles Font Size Since relative error given by symchk = norm(A-A’,1)/norm(A,1) = 5.5511e-16 is small and close to eps, matrix A is symmetric. Words: 20 True False Equation Editor Styles Font Size A matrix is positive definite if it has a Cholesky factorisation. Words: 11
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? (d) [ 2 marks ] What does the MATLAB command aim to achieve. Is it successful on this example? Equation Editor Styles Font Size Step 1. Cholesky factorisation A = R' R Step 2. Forward substitution - solve R' y for x Step 3. Back substitution - solve Rx = y Words: 27 Equation Editor Styles Font Size MATLAB symrcm (symmetric reverse Cuthill-McKee permutation): reorder columns and rows of a matrix to move non-zero elements closer to the diagonal, to yield a banded matrix, so that the corresponding Cholesky factorisation will be banded too (fill-in occurs within bands) In this example, p = symrcm(A) did work as indicated in the spyplot of A(p,p) since the non-zero elements are now much closer to the diagonal as compared to the non-zero elements in the spyplot of A Words: 77
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python (with defined to be the relative machine precision for )? (ii) What are the elements of after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] A technician claims that the amount of energy used in a chemical reaction (in appropriate units) is and that the measurement was made to decimal places. (i) Give the correctly rounded value for . (ii) Give an estimate of the absolute error in . (iii) Give an estimate of the relative error in . MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression is good for implementation on a computer. This expression risks a potential catastrophic cancellation.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Consider the by linear system where is lower triangular. Estimate the largest value of such that the linear system can be solved in minutes. (b) [ 4 marks ] The storage requirement of by matrices with special structures are given in the table below. by matrix Storage requirement No special structure Symmetric Upper/lower triangular Tridiagonal Toeplitz Sparse with nonzero elements Estimate the size of the largest by tridiagonal matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible unit lower triangular matrix and . A programmer claims that as solving a linear system takes around hour, solving the matrix equation , where is an matrix, will take around hours. Justify or refute this claim. FALSE. Just need to compute the factorization of the matrix once, then use forward and back substitutions to solve for each column of the matrix . This will not take much more than hour. TRUE. It takes times longer to compute the matrix using just forward or back substitution.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] Is the matrix symmetric? Tick ALL answers that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Calculate the density of . (c) [ 2 marks ] Calculate the condition number of the matrix in -norm. (d) [ 4 marks ] The MATLAB command calculates the symmetric Reverse-Cuthill-McKee permutation of , and a spy plot of is shown in the figure above. (i) What does this aim to achieve? (ii) Is this successful on this example? No, since . Yes, since . No, since . Yes, since looks to be symmetric from its spy plot. Yes, since . Not enough information, since we cannot deduce that is symmetric from its spy plot. To perform pivoting to improve numerical stability in the factorization of the matrix . To decrease the density of the matrix . To improve the condition number of the matrix . To reduce fill-in in the Cholesky factorization of the matrix . Yes. No. Not enough information.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] Is the matrix symmetric? Tick ALL answers that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Calculate the density of the matrix from the factorization. (c) [ 2 marks ] Give the condition number of the matrix in -norm. (d) [ 2 marks ] It is claimed that another matrix with condition number is ill-conditioned. Do you agree? (e) [ 2 marks ] What are the upper bandwidth and lower bandwidth of ? Yes, since . Yes, since . Yes, since looks to be symmetric from its spy plot. No, since does not look to be symmetric from its spy plot. No, since . Not enough information, since we cannot deduce that is symmetric from its spy plot. Not enough information. No, the condition number of the matrix is reasonable. Yes, the condition number of the matrix is too large. 19 1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 5 6 0 0.2 0.4 0.6 0.8 1.0 0.91 0.88 0.84 0.45 0.32 0.12 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? (b) [ 2 marks ] 6 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
It is claimed that the solution to the linear system is given by , where . Is this correct for this example? (c) [ 2 marks ] Why are the values of the variables and the same? (d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are NOTE: Related (not necessarily the same) Python commands are Explain why ? YES. This gives one of the many possible solutions. YES. The inverse of exists and the unique solution is given by . NO. The inverse of exists but the solution is not given by . NO. The inverse of does not exist. The matrix is symmetric. Both are exact solutions to the linear system . The matrix is not square. Both are the least squares approximation to the data using the linear model . 1.0167 - 0.86 * x This is due to the limited floating point precision. Since , and is not an identity matrix.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You will need to use MATLAB or Python to answer this question. We want to find the cubic polynomial of best fit in the least squares sense for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 6 4 1.6468188492 -0.704862433 0.163313492 -0.010185185 0 0 0 1.069071412
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 3 marks ] Does the Cholesky factorzation of the matrix exist? Give reasons for your answers. (b) [ 3 marks ] What are the steps to obtain the least square solution to using the factorization ? (c) [ 3 marks ] What are the steps to obtain the least square solution to using the normal equation ? True False Equation Editor Paragraph Font Size B is symmetric as proven from: B^T = (A^T * A)^T = A^T * (A^T)^T = A^T * A = B Hence B is symmetric regardless of what A is Additionally, using the equivalence of the following: * A is symmetric and positive definite * A is symmetric and eigenvalues of A are positive * Cholesky factorisation B = A^T * A exists (unique) Thus, the factorisation of matrix B = A^T * A exists because it is symmetric and all the eigenvalues are positive as indicated by the range from the min (0.0792) and the max (4.7398). * Last autosave: 13:52:36 body p Words: 98 Equation Editor Paragraph Font Size Au = y Q Ru = y Q^T Q Ru = Q^T y Ru = Q^T y 1. QR factorisation A = QR 2. Back substitution: solve Ru = Q^T * y * Last autosave: 13:52:36 body p Words: 35
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(d) [ 1 mark ] Give one advantage and one disadvantage of the factorization approach for solving least squares. Equation Editor Paragraph Font Size Solve A^T * A * u = A^T * y for u Define B = A^T * A 1. Cholesky (if B positive definite) or LU factorisation of B 2. Forward substitution 3. Back substitution * Last autosave: 13:52:36 body p Words: 35 Equation Editor Paragraph Font Size Advantage: condition number of R = condition number of A, the condition number remains unchanged so numerically preferrable Disadvantage: QR factorisation is more costly (needs more flops) than Cholesky or LU factorisation; Q is generally not sparse * Last autosave: 13:52:36 body p Words: 37
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python? (ii) What are the elements in after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] (i) Define the relative machine precision . (ii) Define the relative error in a computed approximation to . (iii) Estimate the relative error in storing on a computer using double precision floating point arithmetic. MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: This is the smallest gap between any two floating point numbers. This is the gap between and the next floating point number. This is the smallest positive number that can be stored on a computer.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression is good for implementation on a computer. This expression risks a potential catastrophic cancellation.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Estimate how long it will take to solve the by linear system where is upper triangular and . (b) [ 4 marks ] Estimate the size of the largest by matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible matrix with no special structure and . A programmer claims that as solving a linear system takes around hour, solving the matrix equation , where is an matrix, will take around hours. Justify or refute this claim. 0.16 seconds 83 minutes 42 minutes 2.9E-5 seconds FALSE. Just need to compute the factorization of the matrix once, then use forward and back substitutions to solve for each column of the matrix . This will not take much more than hour. TRUE. It takes times longer to compute the matrix .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] Is the matrix symmetric? Tick ALL answers that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Calculate the density of . (c) [ 2 marks ] Calculate the condition number of the matrix in -norm. (d) [ 4 marks ] The MATLAB command calculates the symmetric Reverse- Cuthill-McKee permutation of , and a spy plot of is shown in the figure above. (i) What does this aim to achieve? (ii) Is this successful on this example? Yes, since . Yes, since . No, since . No, since . Not enough information, since we cannot deduce that is symmetric from its spy plot. Yes, since looks to be symmetric from its spy plot. To improve the condition number of the matrix . To decrease the density of the matrix . To reduce fill-in in the Cholesky factorization of the matrix . To perform pivoting to improve numerical stability in the factorization of the matrix . Not enough information. No. Yes.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] Is the matrix symmetric? Tick ALL answers that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Calculate the density of the matrix from the factorization. (c) [ 2 marks ] Give the condition number of the matrix in -norm. (d) [ 2 marks ] It is claimed that another matrix with condition number is ill-conditioned. Do you agree? (e) [ 2 marks ] What are the upper bandwidth and lower bandwidth of ? Yes, since . Yes, since looks to be symmetric from its spy plot. Yes, since . Not enough information, since we cannot deduce that is symmetric from its spy plot. No, since . No, since does not look to be symmetric from its spy plot. Yes, the condition number of the matrix is too large. No, the condition number of the matrix is reasonable. Not enough information. 19 1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 5 0 0.5 1.0 1.5 2.0 0.2 3.1 4.9 7.2 8.1 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? (b) [ 2 marks ] It is claimed that the solution to the linear system is given by , where . Is this correct for this example? (c) [ 2 marks ] What do the MATLAB commands above calculate? 5 3 YES. The inverse of exists and the unique solution is given by . YES. This gives one of the many possible solutions. NO. The inverse of exists but the solution is not given by . NO. The inverse of does not exist.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are NOTE: Related (not necessarily the same) Python commands are Explain why ? The least squares approximation to the data using the linear model . The least squares approximation to the data using the exponential model . The exact solution to the linear system . The least squares approximation to the data using the quadratic model . 0.22 + 5.98 * x - x^2 Since , and is not an identity matrix. This is due to the limited floating point precision.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You will need to use MATLAB or Python to answer this question. We want to find the line of best fit in the least squares sense for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 6 2 1.5296666 -0.070000 0 0 0 0 0 1.0330866
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 3 marks ] Is the matrix symmetric?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Give reasons for your answers. (b) [ 3 marks ] Is the matrix positive definite? Give reasons for your answers. (c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? True False Equation Editor Styles Font Size symchk is small all eigenvalues are positive Words: 7 True False Equation Editor Styles Font Size by definition if A is symmetric and al eigenvalues are positive, it is also positive definite Words: 16
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(d) [ 2 marks ] What does the MATLAB command aim to achieve? Is it successful on this example? Equation Editor Styles Font Size 1. Cholesky factorisation A = R^T * R 2. Forward substitution: solve R^T * y = b for y 3. Backward substitution: solve R * x = y for x Words: 30 Equation Editor Styles Font Size the command amd(A) is shown in spy plot of A(p,p) it is used to reorder columns and/or rows of a matrix so that the corresponding Cholesky/LU factorisation is more sparse this worked since you can see a more sparse A(p,p) compared to A and the Cholesky factorisation have less non-zero elements after the amd(A) matrix i.e. the Cholesky for the no amd has nz =4912 and the amd has less at nz = 3060 Words: 74
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python? (ii) What are the elements in after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] (i) Define the relative machine precision . (ii) Define the relative error in a computed approximation to . (iii) Estimate the relative error in storing on a computer using double precision floating point arithmetic. MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: This is the smallest positive number that can be stored on a computer. This is the smallest gap between any two floating point numbers. This is the gap between and the next floating point number. Correct Your Answer: MATLAB: Python:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression risks a potential catastrophic cancellation. This expression is good for implementation on a computer.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Consider the by linear system where is symmetric and positive definite. Estimate the largest value of such that the linear system can be solved in minutes. (b) [ 4 marks ] The storage requirement of by matrices with special structures are given in the table below. by matrix Storage requirement No special structure Symmetric Upper/lower triangular Tridiagonal Toeplitz Sparse with nonzero elements Estimate the size of the largest by tridiagonal matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible upper triangular matrix and . A programmer claims that the best strategy to solve two linear systems and is to first calculate the inverse and then compute and . Justify or refute this claim. TRUE. Computing the inverse of the matrix is the most efficient way. FALSE. Better to use forward or back substitution to solve for .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] You are told that has the Cholesky factorization . Tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Is the matrix positive definite? Tick ALL answers that apply. (c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? (d) [ 4 marks ] The elements of the coefficient matrix are known to significant figures and the elements of the right-hand-side vector are known to significant figures. From the above MATLAB results it can be deduced that the -norm condition number of the matrix is . (i) Give an estimate on the relative error in the computed solution to . (ii) How many significant figures do you have in the computed solution? The matrix is lower triangular. All the diagonal elements of are equal to . The matrix is upper triangular. All the diagonal elements of are positive. All the diagonal elements of are nonzero. Yes, since is symmetric and its Cholesky factorization exists. Yes, since all eigenvalues of are positive. Not enough information, since we cannot deduce that is symmetric from its spy plot. No, since is not symmetric because . Yes, since is symmetric and all its eigenvalues are positive. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] For the factorization obtained above , tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] What are the steps for finding the least square solution to using the factorization ? (c) [ 2 marks ] Calculate the condition number of the matrix in -norm. (d) [ 4 marks ] You want to guarantee significant figures in the computed least square solution to using factorization. The elements of the coefficient matrix are known exactly. From the above MATLAB results it can be deduced that the - norm condition number of the matrix is about . (i) Estimate the relative error in the right-hand-side vector that would be required to guarantee this. (ii) How many significant figures do you need in the right-hand-side vector ? The matrix satisfies . The matrix is orthogonal The matrix is orthogonal. The matrix satisfies . The matrix is upper triangular. The matrix is lower triangular. Compute and then solve for by back substitution. Compute and then solve for by forward substitution. Compute and then solve for by forward substitution. Compute and then solve for by back substitution. The desired accuracy on is impossible to achieve. The desired accuracy on is impossible to achieve.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 0 1 2 4 6.0 0.0 0.0 6.0 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? (b) [ 2 marks ] It is claimed that the solution to the linear system is given by , where . Is this correct for this example? 4 4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 2 marks ] What do the MATLAB commands above calculate? (d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are NOTE: Related (not necessarily the same) Python commands are Explain why ? NO. The inverse of does not exist. YES. The inverse of exists and the unique solution is given by . YES. This gives one of the many possible solutions. NO. The inverse of exists but the solution is not given by . The least squares approximation to the data using the exponential model . The exact solution to the linear system . The least squares approximation to the data using the linear model . The least squares approximation to the data using the quadratic model . 6 - 10*x + 4.5 * x^2 - 0.5*x^3 Since , and is not an identity matrix. This is due to the limited floating point precision.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You will need to use MATLAB or Python to answer this question. We want to find the cubic polynomial of best fit in the least squares sense for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 6 4 1.4824355 -0.2448149 0.0372172 -0.002430 0 0 0 1.0130022
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 3 marks ] Is the matrix symmetric?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Give reasons for your answers. (b) [ 3 marks ] Given any matrix , is the factorization unique? Give reasons for your answers. (c) [ 3 marks ] What are the steps to solve using the factorization ? True False Equation Editor Styles Font Size From the spy plot of A, it is observed that matrix A is not symmetric. Additionally, the symchk = norm(A-A’,Inf)/norm(A,Inf) = 171 being a large number is an indicator that the matrix A is not symmetrical Words: 36 True False Equation Editor Styles Font Size The LU factorisation PA = LU is: * Not unique when P is a permutation matrix such that PA = LU. This means that there are different permutations of P and therefore different L and U correspondingly. * Unique when P is an identity matrix such that LU factorisation can be done without permutation of P and then A = LU will have a unique pair of L and U. Words: 70
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(d) [ 1 mark ] Is an identity matrix in this example? Equation Editor Styles Font Size 1. LU factorisation PA = LU 2. Forward substitution: solve Ly = Pb for y 3. Back substitution: solve Ux = y for x Words: 24 True False Human Gradeable
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] (i) What is the value of after the following commands are executed in MATLAB or Python? (ii) What are the elements in after the following commands are executed in MATLAB or Python (with the appropriate import commands)? MATLAB: Python: (b) [ 3 marks ] (i) Define the relative machine precision . (ii) Define the absolute error in a computed approximation to . (iii) Estimate the absolute error in storing on a computer using double precision floating point arithmetic. MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: MATLAB: Python: This is the smallest positive number that can be stored on a computer. This is the smallest gap between any two floating point numbers. This is the gap between and the next floating point number.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(c) [ 3 marks ] You are asked to calculate the expression when and is much smaller in magnitude than . (i) Is this expression good or not good for implementation on a computer? (ii) Find a mathematically equivalent, but numerical preferable, expression for . (Select the original expression if it is already the preferable one.) This expression is good for implementation on a computer. This expression risks a potential catastrophic cancellation.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(a) [ 4 marks ] The computational complexities of some common operations with by matrices are given in the table below. Operations Flops Matrix-matrix multiplication Matrix-vector multiplication LU factorization Cholesky factorization Back/forward substitution Tridiagonal solve You have a GHz workstation with cores where each core can do floating point operations per clock cycle. Estimate how long it will take to solve the by linear system where is symmetric and positive definite and . (b) [ 4 marks ] Estimate the size of the largest by matrix that can be stored in GB RAM using double precision floating point arithmetic. Assume that GB = bytes. (c) [ 2 marks ] Suppose is an invertible matrix with no special structure and . A programmer claims that as solving a linear system takes around hour, solving the matrix equation , where is an matrix, will take around hours. Justify or refute this claim. 0.041 seconds 7.6E-6 seconds 9.8 minutes 2.0E1 minutes FALSE. Just need to compute the factorization of the matrix once, then use forward and back substitutions to solve for each column of the matrix . This will not take much more than hour. TRUE. It takes times longer to compute the matrix .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] You are told that has the Cholesky factorization . Tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] Is the matrix positive definite? Tick ALL answers that apply. (c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? (d) [ 4 marks ] The elements of the coefficient matrix are known to significant figures and the elements of the right-hand-side vector are known to significant figures. From the above MATLAB results it can be deduced that the -norm condition number of the matrix is about . (i) Give an estimate on the relative error in the computed solution to . (ii) How many significant figures do you have in the computed solution? The matrix is upper triangular. All the diagonal elements of are nonzero. All the diagonal elements of are equal to . All the diagonal elements of are positive. The matrix is lower triangular. Yes, since all eigenvalues of are positive. No, since is not symmetric because . Yes, since is symmetric and its Cholesky factorization exists. Not enough information, since we cannot tell whether or not is symmetric from the spy plot of . Yes, since is symmetric and all its eigenvalues are positive. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution. Solve for by back substitution, and then solve for by forward substitution. Solve for by forward substitution, and then solve for by back substitution.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] For the factorization obtained above , tick ALL statements that apply.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(b) [ 2 marks ] What are the steps for finding the least square solution to using the factorization ? (c) [ 2 marks ] Calculate the condition number of the matrix in -norm. (d) [ 4 marks ] You want to guarantee significant figures in the computed least square solution to using factorization. The elements of the coefficient matrix are known exactly. From the above MATLAB results it can be deduced that the - norm condition number of the matrix is about . (i) Estimate the relative error in the right-hand-side vector that would be required to guarantee this. (ii) How many significant figures do you need in the right-hand-side vector ? The matrix is lower triangular. The matrix satisfies . The matrix is orthogonal The matrix is upper triangular. The matrix is orthogonal. The matrix satisfies . Compute and then solve for by back substitution. Compute and then solve for by forward substitution. Compute and then solve for by forward substitution. Compute and then solve for by back substitution. The desired accuracy on is impossible to achieve. The desired accuracy on is impossible to achieve.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You do NOT need MATLAB or Python to answer this question. Consider the data values measured at the times for given in the table below. 1 2 3 4 5 6 0 0.2 0.4 0.6 0.8 1.0 0.12 0.32 0.45 0.84 0.88 0.91 The data, which is in column vectors and , produces the approximation obtained with the following MATLAB commands The data and the approximation are plotted in the figure below. NOTE: Related (not necessarily the same) Python commands are (a) [ 2 marks ] What are the values of and for this example? (b) [ 2 marks ] It is claimed that the solution to the linear system is given by , where . Is this correct for this example? (c) [ 2 marks ] What do the MATLAB commands above calculate? 6 3 YES. The inverse of exists and the unique solution is given by . NO. The inverse of exists but the solution is not given by . YES. This gives one of the many possible solutions. NO. The inverse of does not exist.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(d) [ 2 marks ] Give the formula for the approximation obtained. Hint: You should enter a Maple expression such as 1 + 2*x + 3*x^2. Remember to type the multiplication symbol * whenever appropriate. Click on the preview button to double check your answer. Type exp for the exponential function if needed. For this answer box, just use the numbers from the given MATLAB output rather than running your own calculation. (But keep in mind that in a real calculation there are generally more digits than shown by the default MATLAB output format.) (e) [ 2 marks ] For a different matrix , the results of the following MATLAB commands are NOTE: Related (not necessarily the same) Python commands are It is claimed that this implies that the matrix is not orthogonal. Justify or refute this claim. The least squares approximation to the data using the exponential model . The least squares approximation to the data using the linear model . The exact solution to the linear system . The least squares approximation to the data using the quadratic model . 0.0846 + 1.4002 * x - 0. 5402 * x^2 FALSE. The matrix is orthogonal since . TRUE. The matrix is not orthogonal since .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You will need to use MATLAB or Python to answer this question. We want to find the line of best fit in the least squares sense for the data points below: This problem can be formulated as a linear system , with being a column vector of the data values and with being an -by- matrix depending on the values . The matrix has condition number . Use this information as a consistency check to be sure that you have defined correctly. (a) [ 2 marks ] What are the values of and ? and (b) [ 7 marks ] Provide the approximation you obtained. Give your coefficients to at least 3 significant figures. Enter 0 for terms that do not appear. (c) [ 1 mark ] Use your approximation to estimate the data value at . Give your answer to at least 3 significant figures. 6 2 1.3970952 -0.0814285 0 0 0 0 0 1.3076866
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
You are given the results of the following MATLAB commands and some related spy plots corresponding to a matrix with real number entries. NOTE: Related (not necessarily the same) Python commands are (a) [ 3 marks ] Is the matrix symmetric?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Give reasons for your answers. (b) [ 3 marks ] Is the matrix positive definite? Give reasons for your answers. (c) [ 2 marks ] What are the steps to solve using the Cholesky factorization ? True False Equation Editor Paragraph Font Size From the spy plot of A, it is observed that matrix A is not symmetric. Additionally, the symchk = norm(A-A’,Inf)/norm(A,Inf) = 171 being a large number is an indicator that the matrix A is not symmetrica * body p Words: 36 True False Equation Editor Paragraph Font Size by definition if A is symmetric and al eigenvalues are positive, it is also positive definite * body p Words: 16
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
(d) [ 2 marks ] What does the MATLAB command aim to achieve? Is it successful on this example? Equation Editor Paragraph Font Size 1. Cholesky factorisation A = R^T * R 2. Forward substitution: solve R^T * y = b for y 3. Backward substitution: solve R * x = y for x * body p Words: 30 Equation Editor Paragraph Font Size the command amd(A) is shown in spy plot of A(p,p) it is used to reorder columns and/or rows of a matrix so that the corresponding Cholesky/LU factorisation is more sparse this worked since you can see a more sparse A(p,p) compared to A and the Cholesky factorisation have less non-zero elements after the amd(A) matrix i.e. the Cholesky for the no amd has nz =4912 and the amd has less at nz = 3060 * body p Words: 74
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help