Docsity

Solutions to CS 417/517 Computational Methods and Software HW 6, Assignments of Computer Science

Toggle sidebar
bg1
CS 417/517 Computational Methods and Software
Spring 2004
Solutions to HW 6
Assigned: Thurs Mar 25, 2004; Due: Thurs Apr 1, 2004
1. Matrix of normal equations = A0∗A
5.0000 0 2.5000
0 2.5000 0
2.5000 0 2.1250
.
Right hand vector of normal equations = A0∗b
4.0000
1.0000
3.2500
.
Cholesky factor is chol(A0∗A)
2.2361 0 1.1180
0 1.5811 0
0 0 0.9354
.
Least squares solution is
0.0857
0.4000
1.4286
.
2. (a) The linear system is
1 0
1 1
1 3
x=
1
2
3
.
(b) The System QRx ≈b[Q R] = qr(A)
Q =
−0.5774 0.6172 0.5345
−0.5774 0.1543 −0.8018
−0.5774 −0.7715 0.2673
.
pf2

Partial preview of the text

Download Solutions to CS 417/517 Computational Methods and Software HW 6 and more Assignments Computer Science in PDF only on Docsity!

CS 417/517 Computational Methods and Software

Spring 2004 Solutions to HW 6 Assigned: Thurs Mar 25, 2004; Due: Thurs Apr 1, 2004

  1. Matrix of normal equations = A′^ ∗ A

 

 .

Right hand vector of normal equations = A′^ ∗ b  

 .

Cholesky factor is chol(A′^ ∗ A)  

 .

Least squares solution is (^) 



 .

  1. (a) The linear system is (^) 



  x =

 

 .

(b) The System QRx ≈ b [Q R] = qr(A) Q = (^) 

 

  .

and R = (^)  

 .

So (^)   

   x^ =^ Q′^ ∗^ b^ =

  

  .

(c) x = (^) (

  1. 1429
  2. 6429

) .

  1. c is the possible answer because it is orthongonal on every col of A.

(a) (Q 1 ∗ Q 2 ) ∗ (Q 1 ∗ Q 2 )T^ = (Q 1 ∗ Q 2 ) ∗ (QT 2 ∗ QT 1 ) = Q 1 ∗ (Q 2 ∗ QT 2 ) ∗ QT 1 = Q 1 ∗ I ∗ QT 1 = Q 1 ∗ QT 1 = I

(b) Since ‖Qv‖ 2 = ‖v‖ 2 then ‖Q‖ 2 = 1

Since ‖Q−^1 ‖ 2 = ‖Q‖ 2 = 1 then cond(Q) = 1