Comments on the Mid Term

Previous    Next


It seems that several people do not have a copy of the text book. The exam assumes you have the book - answering a number of the questions assumes this. The comments below are partly to help people without the book, but are also directed at everyone, as not using certain quantities defined as in the mid term questions could lead to the wrong answer. I've tried to point out the key issues.

Problems that assume you have the book's definitions of quantities to refer to include:

#5 (rounding to nearest, emach) #6 (beta, p, rounding to nearest) #22 (definition of Companion Matrix) #23 (for the discussion in section 4.5.4 about deflation, although my notes cover this anyway, and also the discussion in 2.4.3 about elimination matrices).

The rest of the questions are pretty independent of the book and can probably be answered by referencing other books, sources on the web, common sense etc. Below I will discuss each of these so that someone without the book should be able to proceed. People with the book do not need to read my comments on #5, #6. Everyone needs to read my comments on #22 and #23 however.

Problem 5,6:

A floating point number system F is defined by a base beta, precision p and exponent range [L,U]. The numbers in the system F are:

x = +/- { d0 + d1/beta + d2/beta**2 + ... + dp-1/beta**(p-1) } * beta**E

where di, E are integers with 0<= di <= beta-1 and L <= E <= U.

The part in parentheses is called the mantissa and E is called the exponent.

The system is called normalized if the leading digit d0 is always nonzero except for the number x=0. This makes the representation of any nonzero number unique.

The smallest positive normalized number is called the Underflow Level and is UFL = beta**L. The largest positive number is called the Overflow Level and is OFL = beta**(U+1)(1 - beta**(-p)).

Most real numbers x do not belong to the floating point system F. A Rounding Rule defines the "closest" number fl(x) in F to a number x. The most common rounding rules are: 1. Chop, or Round Towards Zero: fl(x) is the nearest number in F towards zero 2. Round to Nearest: fl(x) is the nearest number in F. In case of a tie, we use the element of F whose last stored digit is even.

Machine precision, emach, is defined as emach = bete**(1-p) for chop and as emach = 1/2 beta**(1-p) for round to nearest. It is almost the same as the smallest quantity eps such that fl(1+eps) > 1.

Problem 22:

Note that for #22 the definition of the Companion Matrix is not unique. There are many matrices that have the same polynomial as the characteristic polynomial. As a result one can define the Companion Matrix in several ways, all different. I am assuming you use the definition in the book on page 161, not the definition in some other book. That definition, for a polynomial p(x) = c0 + c1x + c2x**2 + ... + cnx**n, with cn=1, is:

C = 0 0 ... 0 -c0 1 0 ... 0 -c1 0 1 ... 0 -c2 ............... 0 0 ... 1 -cn-1

where the last element is c subscript(n-1). If the polynomal does not have cn=1 then we first divide it through by cn, which does not affect its zeros.

Problem 23:

For #23, you need to read either section 4.5.4 or my notes "Deflation Method for Eigenvalues". If you do not have the book, my notes will be fine. I noticed a typo in my notes where I wrote at the top: "Suppose we have found an evalue l1 of A and its evector x1. Let H be a nonsingular matrix such that Hx1 = cx1 - a multiple of the unit vector e1. Clearly I should have said Hx1 = ce1 as is obvious from the following words.

Also please use the suggested matrix M (Elimination matrix) in Problem 23 text for H, and not the Householder reflection. While there are various choices you could use for H to effect deflation on the 4x4 matrix C4 (any H such that H*x1 = c*e1 will do), each may give a different 3x3 matrix C3, although of course the eigenvalues of C3 will always be the same by similarity. Both the book in 4.5.4 and my notes refer to the possibility of using any H such that Hx1 = ce1, and both suggest as an example using the Householder matrix. But unless you use H = M as requested in the problem, you will not get the correct top diagonal element of C3 as required for submitting results (you WILL get the correct largest eigenvalue, the other number requested).

I asked for M and not the Householder reflection to be used because we only treated Householder just before the exam, and it is somewhat complex. The old Elimination matrix M does the trick, and is much easier to understand. However in future we will usually use Householder reflections rather than Elimination matrices because the former are orthogonal matrices whereas the latter are not. They therefore lead to better control on the growth of errors in large iterations.

If you do not have the book, the Elimination matrix M is the matrix:

M = 1 0 0 ... 0 -m1 1 0 ... 0 -m2 0 1 ... 0 ... -mn-1 0 0 ... 1

where I have used C notation (ie index starts at 0). Here the mi are chosen to zero the ith, i>0, element of M*X where X is some vector. Therefore mi = Xi/X0. The inverse of M is the same matrix with the sign of each mi reversed. All of this is actually in the problem text.


Previous   Next