0% found this document useful (0 votes)
34 views13 pages

Assignment 3 - Linear Equations - Attempt Review - Econcordia

Assignment 3

Uploaded by

Rim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views13 pages

Assignment 3 - Linear Equations - Attempt Review - Econcordia

Assignment 3

Uploaded by

Rim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Started on Friday, 19 July 2024, 8:28 AM


State Finished
Completed on Friday, 19 July 2024, 10:14 PM
Time taken 13 hours 45 mins
Grade 14.00 out of 19.00 (73.68%)
Feedback
Make sure to understand well where you did mistakes and review the corresponding lecture topics.
Be careful not to fall behind by postponing the review of the topics.

Question 1
Complete
Not graded

By checking the "yes" answer below I confirm


1. that I have neither given nor received unauthorized aid to answer the questions of this assignment.
2. I agree to follow the rules in regard of online assignments as posted in the course outline
3. I used only octave or Matlab to solve the questions (I am allowed to consult all course material and my own notes)
Select one:
a. Yes I agree
b. No I do not agree

Your answer is correct.


The correct answer is: Yes I agree

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 1/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 2
Correct
Mark 1.00 out of 1.00

Consider the following system :


𝑥 + 4𝑦 − 𝑧 = −5
𝑥 + 𝑦 − 6𝑧 = −12
3𝑥 − 𝑦 − 𝑧 = 4

Naive Gauss elimination will transform the coefficient matrix into


Select one:
a. ⎛⎜ 1.000000 4.0000 −1.0000 ⎞⎟
⎜ 0 −3.0000 −5.0000 ⎟
⎝ 0 0 3.6667 ⎠
b. ⎛ 1.000000 4.0000 −1.0000 ⎞ 
⎜ ⎟
⎜ 0 −3.0000 −5.0000 ⎟
⎝ 0 0 23.6667 ⎠
c. ⎛ 1.000000 4.0000 −1.0000 ⎞
⎜ ⎟
⎜ 0 −3.0000 −5.0000 ⎟
⎝ 0 0 23.0000 ⎠
d. ⎛ 1.000000 4.0000 −1.0000 ⎞
⎜ ⎟
⎜ 0 −3.0000 −5.0000 ⎟
⎝ 0 0 −13.4100 ⎠

Your answer is correct.


Reference: lecture on naive Gauss elimination in topic 3 "Systems of linear equations".
⎛ 1.000000 4.0000 −1.0000 ⎞
⎜ ⎟
The correct answer is: ⎜ 0 −3.0000 −5.0000 ⎟
⎝ 0 0 23.6667 ⎠

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 2/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 3
Correct
Mark 1.00 out of 1.00

Pivoting strategy is introduced in Gauss elimination in order to


Select one or more:
a. no particular reason (it is just another method)
b. reduce danger of loss of significance 
c. avoid problems of division by zero 
d. speed up calculations
e. simplify the solution process

Your answer is correct.


Reference: lecture on Gauss with partial pivoting in topic 3 "Systems of linear equations".
The correct answers are: avoid problems of division by zero, reduce danger of loss of significance

Question 4
Correct
Mark 1.00 out of 1.00

Select the correct statements


Select one or more:
a. Cramer's rule is a very efficient method to solve linear systems of equations
b. Gauss elimination algorithms with partial pivoting are restricted to small systems (typically less than 4-5 equations) as their
computational effort is large
c. Using LU decomposition to solve a system of linear equations having  Correct: the algorithm may fail even if the
exactly one solution can fail system has a solution
d. LU decomposition is significantly more efficient than the naive Gauss elimination algorithm for solving a system 𝐴𝑥 = 𝑏
e. The numerical answer of the solution of a linear  Correct: their will always remain round-off errors. They may be
system of equations using the PA=LU contains errors small depending on the system, but they will always be there

Your answer is correct.


The correct answers are: Using LU decomposition to solve a system of linear equations having exactly one solution can fail, The
numerical answer of the solution of a linear system of equations using the PA=LU contains errors

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 3/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 5
Correct
Mark 1.00 out of 1.00

Select the correct statement(s)


The solution of a linear system 𝐴𝑥 = 𝑏 computed by PA=LU method
Select one or more:
a. is in general more accurate than if computed by A=LU  Numerically speaking yes as it minimizes round-off errors. One
method (assuming A=LU can find a solution) can in general expect a more accurate answer
b. can always be found (as long as the solution of the system exists) 
c. is in general less accurate than if computed by A=LU method (assuming A=LU can find a solution)
d. is free of truncation errors 
e. is error free

Your answer is correct.


The correct answers are: is free of truncation errors, can always be found (as long as the solution of the system exists), is in general more
accurate than if computed by A=LU method (assuming A=LU can find a solution)

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 4/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 6
Correct
Mark 1.00 out of 1.00

Complete the equation:


⎡2 7 −2 ⎤ ⎡7 4 −1 ⎤
⎢ ⎥ ⎢ ⎥
𝑃 ⎢3 −5 2 ⎥ = ⎢2 7 −2 ⎥
⎣7 4 −1 ⎦ ⎣3 −5 2 ⎦

| 001  |
P = | 100  |
| 010  |

100 010 001

Your answer is correct.


Reference: Read about permutation matrices in topic 3 "Linear equations"
The correct answer is: Complete the equation:
⎡2 7 −2 ⎤ ⎡7 4 −1 ⎤
⎢ ⎥ ⎢ ⎥
𝑃 ⎢3 −5 2 ⎥ = ⎢2 7 −2 ⎥
⎣7 4 −1 ⎦ ⎣3 −5 2 ⎦

| [0 0 1] |
P = | [1 0 0] |
| [0 1 0] |

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 5/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 7
Incorrect
Mark 0.00 out of 1.00

Solve the following system of linear equations by Gauss elimination using partial pivoting
𝑥1 −𝑥2 +3𝑥3 = −3
−𝑥1 −2𝑥3 = 1
2𝑥1 +2𝑥2 +4𝑥3 = 0

The coefficient matrix of the system is transformed into an upper diagonal matrix 𝑈
The element 𝑢22 in the resulting upper diagonal matrix 𝑈 is
Select one:
a. -2
b. 1
c. 2
d. -1 

Your answer is incorrect.


Written in tableau form:
⎡ 1 −1 3 | −3 ⎤
⎢ ⎥
⎢ −1 0 −2 | 1 ⎥
⎣ 2 2 4 | 0 ⎦

Pivoting:
⎡ 2 2 4 | 0 ⎤
⎢ ⎥
⎢ −1 0 −2 | 1 ⎥
⎣ 1 −1 3 | −3 ⎦

Gauss elimination:
⎡2 2 4 | 0 ⎤
⎢ ⎥
⎢0 1 0 | 1 ⎥
⎣0 −2 1 | −3 ⎦

Pivoting:
⎡2 2 4 | 0 ⎤
⎢ ⎥
⎢0 −2 1 | −3 ⎥
⎣0 1 0 | 1 ⎦

Further Gauss elimination will not change the 𝑢22 element.


Consequently the answer is 𝑢22 = −2
The correct answer is: -2

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 6/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 8
Correct
Mark 1.00 out of 1.00

Compute the ∞-norm of the following matrix


⎡ −1.0 8.0 8.8 ⎤
⎢ ⎥
⎢ −6.8 −7.3 5.9 ⎥
⎣ 9.4 9.3 7.4 ⎦

Answer: 26.1 

The ∞-norm of a matrix is the maximum absolute row sum. In our case this is 26.1.
The correct answer is: 26.1

Question 9
Incorrect
Mark 0.00 out of 1.00

Consider the following system of equations


⎡ 5 −3 2 ⎤⎡𝑥⎤ ⎡ 4 ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ −2 4 −1 ⎥ ⎢ 𝑦 ⎥ = ⎢ −2 ⎥
⎣ −4 0 0 ⎦⎣𝑧 ⎦ ⎣ 5 ⎦
and the following approximation of the solution of this system:
⎡ 6.6 ⎤
⎢ ⎥
𝑥𝑟 = ⎢ −9.6 ⎥
⎣ −7.0 ⎦

How much is the relative backward error?


Give your answer with two significant figures and use the ∞-norm.
Answer: 6.3 

The backward error is given by the ∞-norm of


⎡ 43.8 ⎤
⎢ ⎥
𝐴𝑥𝑟 − 𝑏 = ⎢ −42.6 ⎥
⎣ −31.4 ⎦

To obtain the relative backward error we calculate


‖𝐴𝑥𝑟 −𝑏‖∞ = 43.8
‖𝑏‖∞ 5

The correct answer is: 8.8

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 7/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 10
Correct
Mark 1.00 out of 1.00

We are solving a system of linear equations 𝐴𝑥 = 𝑏.


Assume we found an approximation 𝑥𝑟 of the true solution 𝑟 of the system
Choose the correct statement
Select one:
a. The backward error is ‖𝑟 − 𝑥𝑟 ‖∞
b. The backward error is ‖𝐴𝑥𝑟 ‖∞
c. The backward error can be interpreted as an error ‖Δ𝑏‖∞ = ‖𝑏 − 𝐴𝑥𝑟 ‖∞ on the right hand side vector 𝑏 
d. The backward error is ‖𝑥𝑟 ‖∞

Your answer is correct.


The correct answer is: The backward error can be interpreted as an error ‖Δ𝑏‖∞ = ‖𝑏 − 𝐴𝑥𝑟 ‖∞ on the right hand side vector 𝑏

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 8/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 11
Incorrect
Mark 0.00 out of 1.00

Consider the following system of equations


⎡ 3 2 7 ⎤⎡𝑥⎤ ⎡ 1 ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ −2 4 −5 ⎥ ⎢ 𝑦 ⎥ = ⎢ 21 ⎥
⎣ 1 0 4 ⎦ ⎣ 𝑧 ⎦ ⎣ −4 ⎦

and the following approximation of the solution of this system:


⎡ 1.7 ⎤
⎢ ⎥
𝑥𝑟 = ⎢ 0 ⎥
⎣ −0.5 ⎦

How much is the relative forward error?


Give your answer with two significant figures and use the ∞-norm.
Answer: 1.1 

Start by finding the true solution 𝑟 of the system. Solving the system leads to
⎡ −0 ⎤
⎢ ⎥
⎢ 4 ⎥
⎣ −1 ⎦

The relative forward error is then


‖𝑟−𝑥𝑟 ‖∞ 4
‖𝑟‖∞ = 4

The correct answer is: 1.0

Question 12
Correct
Mark 1.00 out of 1.00

What is the ∞-norm of the following vector?


⎡ 5.2 ⎤
⎢ ⎥
⎢ −6.9 ⎥
⎢ 9.2 ⎥
⎢ ⎥
⎣ −0.5 ⎦

Answer: 9.2 

The ∞-norm is given by the maximal entry, in absolute value, of the vector. In our case this is 9.2
The correct answer is: 9.2

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 9/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 13
Correct
Mark 1.00 out of 1.00

Consider the following matrix


⎛3 5 2 ⎞
⎜ ⎟
𝐴=⎜9 22 10 ⎟
⎝ 21 49 31 ⎠

The naive Gauss elimination algorithm will transform this matrix into the matrix
⎛3 5 2 ⎞
⎜ ⎟
⎜0 𝑢22 𝑢23 ⎟
⎝0 0 𝑢33 ⎠

The coefficient 𝑢22 is equal to

Answer: 7 

The correct answer is: 7

Question 14
Correct
Mark 1.00 out of 1.00

The coefficient 𝑢23 is equal to


Answer: 4 

The correct answer is: 4

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 10/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 15
Correct
Mark 1.00 out of 1.00

The coefficient 𝑢33 is equal to


Answer: 9 

The correct answer is: 9

Question 16
Correct
Mark 1.00 out of 1.00

Consider the following matrix


⎛2 1 3 ⎞
⎜ ⎟
𝐴 = ⎜ 14 11 22 ⎟
⎝ 18 21 32 ⎠
Decompose the matrix A into LU where L has the form
⎛ 1 0 0⎞
⎜ ⎟
𝐿 = ⎜ 𝑙 21 1 0⎟
⎝ 𝑙 31 𝑙 32 1⎠
The coefficient 𝑙 21 is equal to

Answer: 7 

The correct answer is: 7

Question 17
Correct
Mark 1.00 out of 1.00

The coefficient 𝑙 31 is
Answer: 9 

The correct answer is: 9

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 11/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 18
Correct
Mark 1.00 out of 1.00

The coefficient 𝑙 32 is
Answer: 3 

The correct answer is: 3

Question 19
Incorrect
Mark 0.00 out of 1.00

For the following system of linear equations, find the number of digits required to use in the calculations to achieve a precision of 10
significant figures in the numerical solution
𝑥1 −6𝑥2 +7𝑥3 −9𝑥4 = −44.1
𝑥1 −5𝑥2 = −6.8
𝑥2 −5𝑥3 = 12.9
𝑥3 −5𝑥4 = −13.3
Use the conditioning number (based on the infinity norm) of the coefficient matrix for your analysis.
Answer: 13288 

For this system we have 𝑐𝑜𝑛𝑑(𝐴) = ‖𝐴‖∞ ⋅ ‖𝐴−1 ‖∞ ≃ 13892 ≃ 104.1 .


Consequently we will lose about 4 digits when solving the system 𝐴𝑥 = 𝑏.
As 10 correct digits are required for the final answer we need to use 10 + 4 = 14 digits.

The correct answer is: 14

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 12/13
7/27/24, 8:19 AM Assignment 3 - Linear Equations: Attempt review | eConcordia

Question 20
Incorrect
Mark 0.00 out of 1.00

For the following system of linear equations, find the number of digits required to use in the calculations to achieve a precision of 12
significant figures in the numerical solution
3𝑥1 +2𝑥2 −𝑥3 = 2
𝑥1 +4𝑥2 +5𝑥3 = 1
−3𝑥1 −2𝑥2 +7𝑥3 = −7
Use the conditioning number (based on the infinity norm) of the coefficient matrix for your analysis.
Answer: 12 

For this system we have 𝑐𝑜𝑛𝑑(𝐴) = ‖𝐴‖∞ ⋅ ‖𝐴−1 ‖∞ ≃ 12.8 ≃ 101.1 .


Consequently we will lose about 1 digits when solving the system 𝐴𝑥 = 𝑏.
As 12 correct digits are required for the final answer we need to use 12 + 1 = 13 digits.

The correct answer is: 13

https://moodle.econcordia.com/mod/quiz/review.php?attempt=407199&cmid=81023 13/13

You might also like