3. Scientific Programming

Numerical Libraries — Quiz

Test your understanding of numerical libraries with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

For a dense system of size $n\times n$, the computational cost of LU factorization using LAPACK is approximately $\tfrac{2}{3}n^3$ floating-point operations. How many floating-point operations are required for $n=500$?

Question 2

Which LAPACK routine is specifically designed to compute all eigenvalues of a real symmetric tridiagonal matrix $T$?

Question 3

Which SciPy function returns the singular value decomposition (SVD) of a dense matrix $A$ as $U,\;s,\;Vh$?

Question 4

When using SciPy’s sparse.linalg.eigs function to compute a few eigenvalues of a large sparse matrix, which parameter should you adjust to control the number of eigenvalues computed?

Question 5

What is the primary purpose of VecScatter in PETSc?