COMSATS University, Islamabad: Islamabad Campus Department of Computer Science
COMSATS University, Islamabad: Islamabad Campus Department of Computer Science
Islamabad Campus
Department of Computer Science
Question # 1
Determine the values of a for which the system has
i. No solutions,
ii. Exactly one solution,
iii. Infinitely many solutions.
x + 2y + z = 2
2x - 2y + 3z = 1
x + 2y - (a2 - 3)z = a
Question # 2
a) Do the three straight lines x1 - 4x2 = 1, 2x1 - x2 = -3, -x1 - 3x2 = 4 have the same intersection point?
Explain your answer.
b) Check if (3; 4; -2) is a solution of the following system.
FA2020 Page 1
c) Determine whether the following systems are consistent or not:
d) Consider the following matrix to be an augmented matrix of a linear system. Express in your own
words the next elementary row operation to perform in the solving process of the system.
Question # 3
Assume that the augmented matrix of a linear system has been transformed into the following matrix by
elementary row operations. Continue the solving process and describe the solution set of the original system.
Question # 4
Suppose we have a 3 x 3 lower-triangular L matrix of the form
i. When you do the usual Gaussian-elimination steps on L, what matrix do you get?
ii. When you do the same elimination steps to I, what matrix do you get? Write the answer in terms of L.
iii. When you apply the same steps to a matrix A = LU, what matrix do you get? Write your answer in
terms of L, U, and/or A).
Question # 5
a) Solve the following system of linear equations using:
i. Naïve Gauss elimination method.
ii. Gauss elimination with Partial Pivoting
iii. Gauss elimination with Complete Pivoting
iv. Justify which method you prefer for solving given system
FA2020 Page 2
b) Develop, debug, and test a program in either a high-level language of your choice to solve a system of
linear equations with Gauss elimination with partial pivoting. Test the program using the above
systems.
Note: Show all steps of the computation (carry four significant figures during the computation). Give reasons
for any interchange you made (both in partial pivoting and complete pivoting). Verify your answers by
substituting the solution back in the given equations.
Question # 5
a) Consider the following Gaussian-elimination-Gauss-Jordan hybrid method for solving the following
system.
First, apply the Gaussian-elimination technique to reduce the system to triangular form. Then use the n th
equation to eliminate the coefficients of xn in each of the first n − 1 rows. After this is completed use the (n
−1)st equation to eliminate the coefficients of xn−1 in the first n − 2 rows, etc. The system will eventually appear
as:
FA2020 Page 3
Consider the following decomposition method for solving systems of linear equations:
Question # 7
Consider the following system of equations
−x1 + 4x2 – x4 = 1.3
–x2 –x3 + 4x4 = 1.8
–x1 + 4x3 – x4 = 1.0
4x1 − x2 − x3 = 0.5
¿ ¿ ¿ ¿
which has the exact solution: x 1=0.4125 , x2 =0.6125 , x 3=0.5357 , x 4 =0.7375
a) Use 5 iterations of the Jacobi method to find an approximate solution, x(5)1 , x 2 , x 3 , x 4 . For the first
(5) (5 ) (5)
guess of the solution, take the value of all the unknowns to be zero.
b) Calculate the error of this approximation using the formula:
c) Use 5 iterations of the Gauss-Seidel method to find an approximate solution, x(5) (5) (5 ) (5)
1 , x 2 , x 3 , x 4 . For the
first guess of the solution, take the value of all the unknowns to be zero.
d) Calculate the error of this approximation using the formula:
FA2020 Page 4
FA2020 Page 5