CSC_349A_EXAM_QUESTIONS1

CSC_349A_EXAM_QUESTIONS1 - COMPUTER SCIENCE 349A SAMPLE...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
COMPUTER SCIENCE 349A SAMPLE EXAM QUESTIONS WITH SOLUTIONS PARTS 3, 5, 6 , 7 PART 3. 3.1 Suppose that a computer program, using the Gaussian elimination algorithm, is to be written to accurately solve a system of linear equations b Ax = , where A is an arbitrary n n × nonsingular matrix. Give two reasons why it is necessary to incorporate a pivoting strategy (such as partial pivoting) into the algorithm. 3.2 Let ⎡− = = 3 5 . 0 1 , 2 2 0 1 0 1 0 1 2 b A and suppose that b A x 1 = . Use Naïve Gaussian Elimination (Gaussian elimination without pivoting) to compute x . Do not compute 1 A . Show all of your work. 3.3 Consider the following system of linear equations b Ax = : 0 4 2 2 3 2 4 2 2 3 2 1 3 2 1 3 2 = + + = + = + x x x x x x x x Specify the augmented matrix for this linear system, and use Gaussian elimination with partial pivoting to compute the solution vector x . Show all of your work. 3.4 Suppose that the following MATLAB statement has been executed. A = [-1 2 3 4 ; 5 6 7 8 ; 9 8 7 6 ; 5 4 3 1 ] ; Specify 1 or 2 MATLAB statements that could be used to efficiently compute the second column vector of 1 A . Do not compute the entire matrix 1 A .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.5 Let 2 n , let A denote an n n × nonsingular, upper triangular matrix: Ο = nn n n n a a a a a a a a a a A M O L L L 3 33 2 23 22 1 13 12 11 , and let T n y y y y y ) , , , , ( 3 2 1 K = denote a column vector with n entries. The most efficient way to compute y A x 1 = is to use the back-substitution algorithm. Assuming that n , A and y are specified, write a MATLAB function M-file function x = solve ( n , A , y ) that will compute y A x 1 = using the back-substitution algorithm. Note: do not use the MATLAB operator \ or the MATLAB function inv . PART 5. 5.1 Consider the following data: 3 2 1 1 0 1 ) ( i i x f x Suppose that a function ) ( x g of the form x x e c e c c x g 2 1 0 ) ( + + = is to be determined so that ) ( x g interpolates the above data at the specified points i x . Write down a system of linear equations (in matrix/vector form b Ac = ) whose solution will give the values of the unknowns 2 1 0 and , c c c that solve this interpolation problem. Note: Leave your answer in terms of e and powers of e . Do not solve the resultant linear system. 5.2 (a) Give the Lagrange form of the quadratic ( 2 = n ) interpolating polynomial ) ( x P that interpolates x e x f = ) ( a t 4 . 0 and 2 . 0 , 0 = = = x x x .
Background image of page 2
Note: Do not numerically evaluate ) ( x f ; instead, give your answer in terms of values such as 2 . 0 e . Also, do not simplify the expression for ) ( x P . (b) Using the error term for polynomial interpolation, determine a good upper bound for 1 . 0 ) 1 . 0 ( e P . Note: Do not determine an upper bound for x e x P ) ( for all ] 4 . 0 , 0 [ x , only for 1 . 0 = x .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

CSC_349A_EXAM_QUESTIONS1 - COMPUTER SCIENCE 349A SAMPLE...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online