Starting from:

$30

MTH 373/573 Homework 1 solved


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?

More products