联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2019-02-13 10:11

Homework: Gaussian Elimination 1

Instructor: Prof. Hector D. Ceniceros

General Instructions: You have to integrate all the problems that require coding and/or

numerical computation in a single jupyter notebook. Make sure all your codes have a preamble

which describes purpose of the code, all the input variables, the expected output, your

name, and the date of the last time you modified it. Write your own code, individually. Do

not copy codes! The solutions to the problems that do not require coding must be uploaded

as a single pdf or as part of the jupyter notebook.

1. (a) Implement (write a code) Gaussian Elimination with partial pivoting to solve a

linear system Ax = b, given as output the coefficients of a nonsingular, n × n

matrix A and an n-vector b. Your code should produce the solution x or an error

message (if A is nonsingular) and the information needed for the LU factorization.

(b) Let

5 1 0 2 1

0 4 0 1 2

1 1 4 1 1

0 1 2 6 0(1)

Use your Gaussian Elimination code to solve Ax = b.

(c) Test your Gaussian Elimination code for

5 1 0 2

0 4 0 8

1 1 4 2

0 1 2 2. (2)

2. (a) Let A be an n × n upper or lower triangular matrix. Prove that the determinant

of A is equal to the product of its diagonal entries, i.e. det(A) = a11a22 · · · ann.

(b) Prove that the product of the pivots in the Gaussian Elimination for Ax = b is

equal to the determinant of A up to a sign.

(a) Prove that the product of two n × n lower (upper) triangular matrices is a lower

(upper) triangular matrix.

1All course materials (class lectures and discussions, handouts, homework assignments, examinations, web

materials) and the intellectual content of the course itself are protected by United States Federal Copyright

Law, the California Civil Code. The UC Policy 102.23 expressly prohibits students (and all other persons)

from recording lectures or discussions and from distributing or selling lectures notes and all other course

materials without the prior written permission of the instructor.

1

(b) Let Li be the unit upper triangular matrix that produces the i-th elimination step

in the Gaussian Elimination algorithm, i.e.. (4)

3. Find an LU factorization of the matrix

A =5 1 0

0 4 0

1 1 4

. (5)

4. Find the Choleski factorization A = LLT


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp