Problem1: ConditionNumber 5+5=10points Recast the following problems as evaluation problems ๐ฆ = ๐(๐ฅ) for the input ๐ฅ, a fixed
parameter ๐ and output ๐ฆ, and compute their condition numbers ๐ (๐ฅ): (a) ๐ฆโ๐๐ฅ =0, ๐>0, (b) ๐ฅโ๐ฆ+1=0.
Problem2: VectorNormsareLipschitzContinuous 30points Show that any vector norm is Lipschitz continuous, that is, it satisfies the inequality:
|โ๐ฅโโโ๐ฆโ|โคโ๐ฅโ๐ฆโ, forall๐ฅ,๐ฆ โR๐.
Problem3: ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐-normsandTensorProduct 15+5=20points (a) Let ๐ฅ โ R๐ and ๐ฆ โ R๐. Define the tensor product of ๐ฅ and ๐ฆ to be the following R๐๐
vector:
โก๐ฅ๐ฆ1โค ๐ฅโ๐ฆโโขโฎโฅ .
โฃ๐ฅ๐ฆ๐โฆ๐๐
What is โ๐ฅโ๐ฆโ๐ in terms of โ๐ฅโ๐ and โ๐ฆโ๐ for each of the cases ๐ = 1, 2, โ? Demonstrate
for each case via step-by-step calculations.
(b) Based on your solution, conjecture for the generalization to tensor product of two matrices: if ๐ด is a R๐ร๐ matrix and ๐ต is a R๐รl matrix, their tensor product is the following R๐๐ร๐l matrix:
โก๐ด๐ต11 … ๐ด๐ต1lโค ๐ดโ๐ตโโขโฎ โฑ โฎโฅ.
โฃ๐ด๐ต๐1 … ๐ด๐ต๐lโฆ
Problem4: NilpotentMatrixisSingular 10 points
Let๐ด โ R๐ร๐ beanilpotentmatrixwithindex2,thatis๐ด2 = ๐where๐ โ R๐ร๐ isthe zero matrix. Using the definition of singularity in terms of linear independence of columns (rows) of a matrix, show that ๐ด is singular.
3/6
Problem5: ConditionNumberofMatrices 5 points Show that for any nonsingular matrices ๐ด, ๐ต โ R๐ร๐, their condition number (in any subor-
dinate matrix norm) satisfies: ๐
(๐ด๐ต) โค ๐
(๐ด) ๐
(๐ต).
Problem6: ExploringIEEEDoublePrecisionusingPython 15
points
- (a) ย What does this code snippet do? Type it in an IPython terminal or Jupyter Notebook. Explain what you observe when you run it and why in no more than 2-3 sentences.
a = 1.
while a != 0:a /= 2 print(a)
- (b) ย What does this code snippet do? Type it in an IPython terminal or Jupyter Notebook. Explain what you observe when you run it and why in no more than 2-3 sentences.
a = 1.; eps = 1.; b = a + eps while a != b:
eps /= 2
b = a + eps print(eps)
- (c) ย What does this code snippet do? Type it in an IPython terminal or Jupyter Notebook. Explain what you observe when you run it and why in no more than 2-3 sentences.
a = 1.
while a != inf:a *= 2 print(a)
W arning: The decimal point โ.โ after the 1 in the variable a is extremely important.
Please read Submission Notes (on last page) for some additional information.
Problem7: UnderstandingRoundoffError 20 + 15 = 35 points (a) Recall that the number ๐ is defined by lim (1 + 1)๐. Estimate the value of ๐ by writing
๐โโ ๐๐
a Python code to compute the expression (1 + ๐1) for ๐ = 10๐, ๐ = 1,2,…,15. Using
plt.plot from matplotlib (see Python tip in Guidelines on first page), plot the rel- ative error in this computation for each value of ๐. For what value of ๐ do you get the most accurate estimate for ๐ using this limit formula? Why does this not match with
4/6
the mathematical expectation that this formula should become increasingly more ac- curate as ๐ increases? Reason in terms of floating point arithmetic and its relation with machine epsilon ๐๐ .
(b) Now implement the Taylor series computation for ๐: ๐=1+1+1+1+โฏ.
1! 2! 3!
First, using your understanding of ๐๐ , what stopping criterion should be used for de- termining where to truncate this Taylor series? Once you have determined this, im- plement this using an appropriate looping construct in Python. What is the relative error in the computation of ๐ in this case?
Please read Submission Notes (on last page) for some additional information.
5/6
Submission Notes
- The answer to all theoretical problems, output of Python code for computational problems including figures, tables and accompanying analyses should be provided in a single PDF file along with all your code files.
- Youcantypeset(pleaseconsiderusingLATEXifyouchoosetodoso),orwritebyhand and scan/take photographs of solutions for theoretical questions. For scanning or photography, please put in the extra effort and provide a single PDF file of your sub- mission.
- For Problem 6, in your PDF submission of solutions, please provide the output from the code snippet (run via Terminal or Notebook) for each of the three parts (a)โ(c). For each part, you will also explain what you observe and why. To make life easier (for you, for TAs!), here is an example of how to report what you observe.
a = 1.
while a <= 100:a = 2**a print(a)
Solution: The output I obtained by running the code snippet is below:
2
4
16 65536The observed output is obtained because the code computes and prints the first few terms of the recurrence relation: ๐(๐ + 1) = 2๐(๐) with ๐(1) = 1.
- ForProblem7,pleasesubmityourcodeintwofiles:problem_7a.pyandproblem_7b.py. You can use the two Python files and the code within them as boilerplate. Please do read the comments within each of these files. The remarks are meant to clarifying or helpful but they may even contain some hints!
6/6




