程序代写代做代考 graph MATH 3510 Midterm I September 2020 Show all your work and indicate your reasoning in order to receive the credit. Present your answers

MATH 3510 Midterm I September 2020 Show all your work and indicate your reasoning in order to receive the credit. Present your answers
in low-entropy form. Name:
Date:
Honor pledge
1. I affirm that I have not given or received any unauthorized help on this exam, and that this work is my own.
Sign and date here:
Floating point numbers
2. Floating point numbers typically represented in computers in the following binary form:
222 2d
(a) (5 points) What is the (approximate) value of machine epsilon for a microprocessor that
uses d = 8? Briefly explain.
(b) (5 points) For the same microprocessor, how many floating point numbers x, such that
Question:
1
2
3
4
5
6
Total
Points:
0
15
40
10
25
10
100
Score:
􏰀bbb􏰁 ±1+1+2+…+d ×2E
Page 1 of 5

MATH 3510 Midterm I September 2020
1 ≤ x < 3 are there? Briefly explain. 2 (c) (5 points) For the same microprocessor, assuming that the smallest possible value of E is -15 and the largest possible value of E is 16,, what are (approximately) the smallest and the largest positive floating point number? Briefly explain. Systems of linear equations 3. The chemical equation x1[Ca(OH)2]+x2[HNO3]→x3[Ca(NO3)2]+2[H2O] indicates that x1 molecules of calcium hydroxide Ca(OH)2 combine with x2 molecules of nitric acid H N O3 to yield x3 molecules of calcium nitrate Ca(NO3)2 and 2 molecules of water H2O. Since atoms are not destroyed or created in chemical reactions, the balance of oxygen atoms requires that 2x1 + 3x2 = 6x3 + 2. The balance of hydrogen atoms requires that 2x1 + x2 = 4. The balance for calcium atoms requires that x1 = x3 (a) (5 points) Rewrite the balance equations above in matrix form Ax = b: Page 2 of 5 MATH 3510 Midterm I September 2020 (b) (15 points) Find LU factorization of the matrix A. Present your calculations, step by step, in the space below. Clearly indicate multiplication factors that you use. Page 3 of 5 MATH 3510 Midterm I September 2020 (c) (5 points) Use L and U to calculate the determinant of matrix A. Write you calculations below: (d) (8 points) Use the forward substitution to solve the equation Ly = b. Write you calcula- tions below: (e) (7 points) Use the backward substitution to solve the equation Ux = y. Verify by direct substitution that x is the solution of Ax = b. Write you calculations below: 4. (10 points) You wrote your own function to multiply huge square matrices (which is O(n3) operation). It takes about 0.1 seconds (on a slow computer) to multiply two 105 × 105 matrices. Estimate how long it would take to multiply two 106 × 106 matrices. Present your answer and explain your reasoning in the gitlab’s README.md file. Matlab 5. Write a script that measures the performance of matlab code. (Start the script with clear clf commands.) Page 4 of 5 MATH 3510 Midterm I September 2020 (a) (15 points) Preallocate a one-dimensional array for storing your time measurements. Initialize the random number generator with a seed of your choice. For the size of matrix n = 3000:50:4000 repeat the following steps: 1. generate a random square matrix A of size n × n and a random column vector b of length n. 2. factor the matrix A using matlab’s builtin function lu. 3. Solve the system of linear equations Ax = b using the result of factorization and the functions forwardsub and backwardsub that we develop in class. Measure the solution time. Store the time into an element of the array you preallocated earlier. (b) (10 points) Plot the graph of the solution time vs. matrix size. Chose the type of the graph (linear or loglog). Plot the graph of the expected dependence t(n). Provide labels, legend, title, grid. Git and Gitlab 6. (10 points) Upload all the code you wrote/used for this exam: 1. Create a new gitlab project called midterm1 (the name must be exactly as shown) 2. Use gitlab web interface to upload your matlab code to your project 3. Scan the Honor pledge and your solutions for Problems 2 and 3, convert your scans to a single pdf document (call it midterm1.pdf) and upload it to gitlab. 4. Grant the access to your project (with the permission of the reporter) to the instructor. Page 5 of 5