to COMP 205 Homework 2 Jan 21, 1998, Due: Jan. 28, 1998
Problems
order polynomial
:

where
is a root and
is the coefficient of the high-order term.
Consider the following procedure for evaluating the polynomial:

Show that the relative error in evaluating a value is:
where
.
linear system of
equations:




Show by means of a numerical example that Cramer's rule is not backward
stable. Hint: choose the matrix nearly singular and
.
Your numerical example can be done by hand on paper (for
example with 4 decimal digit floating point), on a computer, or a hand
calculator. You should clearly explain why Cramer's rule is not backward
stable.
,
,
and
. Let each line be
represented as:

We want to check whether these four lines intersect at a common point. We use the following algorithm (Algorithm A):
and
.
Let us represent this point as
.
from the other two lines, in this case
and
. If both of those distances are less than some tolerance
(say
), we conclude that the four lines intersect at a common
point.
The problem of computing the intersection of two lines corresponds to solving
two linear equations in two unknowns. Lets assume that we are able to
compute these intersections accurately (say up to 14 or 15 digits).
To compute the distance of a
point
from a line,
, we use the formula:

Given four lines, we compare two different algorithms to check whether they intersect at a point:
. Check
whether the distance of
from
and
is less than
.
. Check
whether the distance of
from
and
is less than
.




All the computations are performed using IEEE double precision arithmetic.
Furthermore, we use
. Moreover
.
If we compute the intersection of these lines based on Algorithm I & II, we
obtain:


Both these numbers are exact up to 16 digits. Based on Algorithm I, we get


As a result, Algorithm I concludes that the four lines DO NOT intersect at a common point.
Based on Algorithm II, we get


and it implies that the four lines INTERSECT at a common point.
would not solve the
asymmetry problem. Try to explain your answer geometrically. (10 points)
. (10 points)