Sale!

CSci 5304,Homework # 2 solution

$30.00 $25.50

Category:

Description

5/5 - (3 votes)

1. Consider the two mathmatically equivalent formulas
(i) a = x
2 − y
2
(ii) a = (x + y) ∗ (x − y).
(a) Compute both formulas in 2 digit decimal arithmetic using x = 11, y = 10. Which formula
gives the best answer? Ignore any limits on the exponent.
(b) Compute both formulas in 3-bit binary arithmetic using x = 3/2 (dec) and y = 1. Again,
which formula gives the most accurate answer? Ignore any limits on the exponent.
(c) In your favorite programming language and platform, find two numbers x, y such that
the two formulas above give different answers. Which answer is more accurate. Report
the precision used, the machine epsilon (unit round-off) and the general description of your
machine. Can you find two numbers for which one of the answers has no accuracy whatsoever,
but the other is almost OK? Note: in Matlab all arithmetic is in double precision, but you can
force single precision by using the single function: a = single(5/4) forces all arithmeitc
involving a to be on single precision.
2. Consider the system
Ax ≡

−0.001 1.001
0.001 −0.001 x1
x2

=

1
0

≡ b
whose solution is x1 = x2 = 1 and the system
(A + ∆A)y = b + ∆b
where ∆A = ε|A|, ∆b = ε|b|. Here |A| means take the absolute value of all the elements
individually. In the following we let ε = 10−4
.
(a) Compute κ∞(A). Compute the actual value of kx − yk∞/kxk∞ and its estimate obtained
from using the (standard) condition number κ∞ (Theorem 2 in notes).
Which is quite far from the actual error.
(b) Now repeat the above, but this time use ∆b = ε

0
1

.
3. (a) Show that the following matrix is singular
A =


1 2 −1
2 1 1
−1 1 −2


(b) What is the range or column space of A ? What is its null space? Give a basis for each
subspace.
(c) Consider the matrix B obtained from A by adding η = 0.001 to the entry (1,3) (So
B = A + ηe1e
T
3
). Without computing the inverse of B, show that kB−1k1 ≥ 3, 000.
(d) Find a lower bound for the condition number κ1(B).
Continued overleaf . . .
4. Consider the n × n matrix
An =


1
−2 1
−2 1
.
.
.
.
.
.
.
.
.
.
.
.
−2 1


What is A−1
n
? [Hint: Write An = I − En and use expansion I + E + E2 + · · · .]
Calculate the condition numbers κ1(An) and κ∞(An). Verify your results with matlab for
the case n = 10.
2