Problem 5: Consider the Problem of Making Change for N Cents Using the Fewest Number of Coins

Total Page:16

File Type:pdf, Size:1020Kb

Problem 5: Consider the Problem of Making Change for N Cents Using the Fewest Number of Coins

Midterm 2 (April 19, 2005)

Names: Student ID: Email:

Don’t panic!

Print your name, student id, and email in the box above, and print your name on top of every page.

Please write your answers on the front of the exam pages. Use the back of the page as scratch paper. Let us know if you need more paper.

Read the entire exam before writing anything. Make sure you understand what the questions are asking. If you give a beautiful answer to the wrong question, You’ll get no credit. If any question is unclear, please ask me for clarification.

Don’t spend too much time on any single problem (unless you solved all but one) If you get stuck, move on to something else and come back later.

Write something down for every problem. Don’t panic and erase large chunks of work. It might be worth partial credit.

Don’t panic!

Problem Score 1 2 3 4 5 1. Multiple Choices (some questions may have more than one correct answer, you should try to mark them all) [Each question 4 points: total 12 points]

1. Which of the following statements are true? a. A and AT have the same number of pivots b. A and AT have the same left nullspace c. If the row space equals the column space, then A = AT d. If A = -AT then the row space of A equals the column space

2. Which of the following statements are true? a. If columns i and j of a matrix B are the same, so are the columns i and j of AB for any matrix A that the product of AB is defined. b. If rows i and j of a matrix A are the same, so are the rows i and j of AB for any matrix B that the product of AB is defined. c. If rows i and j of a matrix B are the same, so are the rows i and j of AB for any matrix A that the product of AB is defined. d. For every pair of m by m square matrix A and B, AB = BA.

3. Which of the following statements are true? a. Q-1 is an orthogonal matrix when Q is an orthogonal matrix. b. If two subspaces meet only in the zero vector, then the subspaces are orthogonal. c. If A is a symmetric matrix, then its column space is perpendicular to its nullspace. d. Because (1,1,1) is perpendicular to (1,1,-2), the planes x+y+z = 0 and x+y-2z are orthogonal subspaces.

Problem 2. [ 16 points] True or False and Justify Circle T or F for each of the following statements to indicate whether the statement is true or false, respectively. If the statement is correct, briefly state why. If the statement is wrong, explain why or provide a counter example. The more content you provide in your justification, the higher your grade, but be brief. Your justification or explanation is worth more points than the true or false designation. Each statement is typically worth different amount of points depending on its difficulty.

T F [ 1 point for T-F, 3 points for explanation]

The subspace spanned by (1,1,0,0,0) and (0,0,0,1,1) is the orthogonal to the subspace spanned by (1,-1,0,0,0) and (2, -2, 3,4,-4).

T F [ 1 point for T-F, 3 points for explanation] The column space of A – I equals the column space of A T F [ 1 point for T-F, 3 points for explanation] There are two n by n orthonormal matrices A and B and an n-place vector x such that ABx  x .

T F [ 1 point for T-F, 3 points for explanation] The projection matrix P onto an n-dimensional subspace has rank r = n.

Problem 2: [40 total points] [Computation Problems] a. [12 points] Find the best line b = C + Dt for the four points (1, 3), (2,5), (3,6), and (4, 7).

2 2 4 4 2 2 2 0 b.[15 points] Use Gram-Schmidt Process on the column vectors of A    2  2 2 2   2  2 0 2 to compute the QR decomposition of A = QR. c.[13 points] Using Cramer’s Rule to solve the following system of linear equations 1 1 1 1      1 1 1x  2. 1 1 1  3 Problem 4. [Math] [10 points] Using the equations (AB)T  BT AT and (AB) 1  B 1 A1 for square invertible T 1 matrices A and B to prove A1   AT  . Problem 5 [Algorithm]: [22 points]

[Basis for Orthogonal Complement]

Recall the orthogonal complement of a vector space V is the vector space that contains every vector that is perpendicular to V. This orthogonal subspace is denoted by V  .

a. [17 points] Design an algorithm for the following problem:

a. The input of the problem is an n column vectors a1 ,a2 ,⋯,an in m dimensions. Let V be the vector space spanned by these vectors

a1 ,a2 ,⋯,an . b. The desirable output of the problem is a basis for V  , the orthogonal

complement of the vector space spanned by a1 ,a2 ,⋯,an . b. [5points] What is the complexity of your algorithm?

(Hint: Using the Fundamental Theorem of Linear Algebra, Part 2.)

You can specify your algorithm in English rather than pseudo-code.

Recommended publications