$30
Problem1: ConditionNumber
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
Show that any vector norm is Lipschitz continuous, that is, it satisfies the inequality:
|โ๐ฅโ − โ๐ฆโ| ≤ โ๐ฅ − ๐ฆโ, for all ๐ฅ, ๐ฆ ∈ โ๐.
Problem3: ๐-normsandTensorProduct
(a) Let ๐ฅ ∈ โ๐ and ๐ฆ ∈ โ๐. Define the tensor product of ๐ฅ and ๐ฆ to be the following โ๐๐ 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 โ๐×๐ matrix and ๐ต is a โ๐×โ matrix, their tensor product is the
following โ๐๐×๐โ matrix:
โก๐ด๐ต11
๐ด ⊗ ๐ต โ โข โฎ
โข
โฃ๐ด๐ต๐1
…
โฑ
…
๐ด๐ต1โโค
โฎ โฅ .
โฅ
๐ด๐ต๐โโฆ
Problem4: NilpotentMatrixisSingular
Let ๐ด ∈ โ๐×๐ be a nilpotent matrix with index 2, that is ๐ด2 = ๐ where ๐ ∈ โ๐×๐ is the zero matrix. Using the definition of singularity in terms of linear independence of columns (rows) of a matrix, show that ๐ด is singular.
Problem5: ConditionNumberofMatrices
Show that for any nonsingular matrices ๐ด, ๐ต ∈ โ๐×๐, their condition number (in any subordinate matrix norm) satisfies: ๐
(๐ด๐ต) ≤ ๐
(๐ด) ๐
(๐ต).
Problem6: ExploringIEEEDoublePrecisionusingPython
(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)
Warning: 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
1 ๐
(a) Recall that the number ๐ is defined by lim (1 + ) . Estimate the value of ๐ by writing
๐→∞ ๐
๐
a Python code to compute the expressionfor ๐ = 10๐, ๐ = 1, 2, … , 15. Using plt.plot from matplotlib (see Python tip in Guidelines on first page), plot the relative 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 the mathematical expectation that this formula should become increasingly more accurate 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!
First, using your understanding of ๐๐, what stopping criterion should be used for determining where to truncate this Taylor series? Once you have determined this, implement this using an appropriate looping construct in Python. What is the relative error in the computation of ๐ in this case?