CMSC 411 Midterm Exam name________________________________



CMSC 455 Quiz 3 F20 name__________________________________

Open book, open note. ID, email name _________________________

Multiple choice, type X after your choice a) b) c) ...

Choose closest if not exact.

Short answer. Not case sensitive. Unreadable by me is wrong.

Answer all questions with exactly one choice (zero, two or more is automatically wrong)

All questions are in the context of this course.

Comments are ignored. Work very carefully!

Edit, Save, Exit then submit cs455 quiz3 q3_20a.doc

Q1: Two equations are linearly dependent if there exists numbers p and q such

that: equation1 * p + q = equation2

a) true

b) false

c) neither

Q2: Numerical solution of a system of linear equations can give very bad results even

when there is a unique mathematical solution

a) true

b) false

c) not when using double precision

ehoic

Q3: The method for solving simultaneous equations covered in class was

a) Gauss Jordan

b) Newton Raphson

c) back substution

Q4: Interchanging rows to find the largest pivot element is not worth while when

solving simultaneous linear equations.

a) true

b) false

Q5: Newton’s method will always find a root of a smooth, differentiable, function

with a root.

a) using nextx = x – f(x)/f’(x) when given a good starting point

b) using nextx = x – f(x)/f’(x) starting with f’(x) > 0

c) using nextx = x – f(x)/f’(x) when starting with x = 0

Q6: The data fitting method that minimizes maximum error is

a) Lagrange

b) Fourier

c) Fejer

d) Chebyshev

e) least square 1 of 10

Q7: The FFT is called a discrete Fourier transform because the input is discrete samples

made at unequal intervals.

a) true

b) false

Q8: Having found one root, r, of a polynomial, divide the initial polynomial by (x-r)

and now the problem reduces to finding a root of a polynomial of one less

degrees.

a) true

b) false

Q9: Newton’s method of fining a root of f(x)=0 where f ’(x) is the derivative of f(x) is

a) x = x - f(x)/f ’(x)

b) x = x - f ’(x)/f(x)

c) x = x + f ’(x)/f(x)

d) x = x + f(x)/f ’(x)

Q10: Given a function f(x,y), in order to find the smallest value,

find the minimum of

a) negative f(x,y)

b) absolute value of f(x,y)

c) just f(x,y)

Q11: A program to do optimization can work on any number of independent variables.

true

false

Q12: A function that can find a local minimum needs

____________________________________ in order to find the global minimum.

Q13: A Fourier transform can be computed on all real values, yet there will be aliasing

of the frequency spectrum.

true

false

Q14: The FFT is a fast Fourier transform, fast implies an O(n^2) computation time

a) true

b) false

Q15: The inverse FFT of an FFT produces close to the initial data

a) true

b) false

2 of 10

Q16: The data fitting method that can fit a pulse yet has oscillations is

a) Lagrange

b) Fourier

c) Fejer

d) Chebyshev

e) least square

Q17: The data fitting method that is designed to minimize RMS error is

a) Lagrange

b) Fourier

c) Fejer

d) Chebyshev

e) least square

Q18: The data fitting method that is intended to be exact at the given data points is

a) Lagrange

b) Fourier

c) Fejer

d) Chebyshev

e) least square

Q19: The data fitting method that gives a smooth approximation to a square wave is

a) Lagrange

b) Fourier

c) Fejer

d) Chebyshev

e) least square

Q20: Numerical integration is called

a) armature

b) quadrature

c) adventure

Q21: Adaptive integration makes the step size larger as the slope gets larger

a) true

b) false

Q22: Gauss Legendre integration gets very accurate results with a small number of

function evaluations.

a) true

b) false

c) only on smooth functions

3 of 10

Q23: Trapezoidal integration is easy to program yet requires many function evaluations

to get very accurate results.

a) true

b) false

Q24: Gauss Legendre two dimensional integration is not a simple extension of the one

dimensional method

a) true

b) false

Q25: Given a set of data points, a least square fit may use exponentials and/or

logarithms of the data to obtain a better fit

a) true

b) false

Q26: When computing eigenvalues and eigenvectors, you would get the wrong answer if just rows were interchanged. When rows are interchanged the corresponding columns must also be interchanged.

a) true

b) false

Q27: In homework 5, it is common for output .wav file to have noise.

a) true

b) false

Q28: The term “cutoff frequency” used in describing low pass filters, means there will be no frequencies passed through the filter below the “cutoff frequency”

a) true

b) false

Q29: The filters covered in this class, using a and b coefficients, always produce correct output on the first few outputs.

a) true

b) false

Q30: It is best to not develop your own numeric code.

a) true

b) false

Q31: The first thing you should do with numerical code you are planning to use is

a) put the code in your application

b) translate the code to the language of your choice

c) thoroughly test the code

4 of 10

Q32: It is usually better to convert tested numerical code to the language you plan to use,

in your application, rather than developing an interface.

a) true

b) false

c) it depends on the code and your application

Q33: You should modify the interfaces on working numerical code to suit your needs.

a) true

b) false

Q34: You should not trust advertiser’s benchmarks.

a) true

b) false

Q35: You should trust your compiler and library to give accurate time.

a) true

b) false

Q36: A compiler is allowed to find dead code in your program and not produce machine

instructions for that code, thus giving false benchmark results.

a) true

b) false

Q37: A benchmark needs to run long enough to avoid hardware or software quantization

of the time measurement, 10 seconds should be long enough.

a) true

b) false

Q38: A benchmark that resembles your interests is more important than a synthetic

benchmark that measures language features.

a) true

b) false

The following questions about derivatives of a function assume a smooth function.

Q39: It is possible to compute the derivative of a function accurately from only values

of the function by using high order equations.

a) true

b) false

Q40: A function has been provided in this course, in several languages, to compute

the coefficients for the high order equations to accurately compute derivatives.

a) true

b) false

5 of 10

Q41: By using more function evaluations, better accuracy of the derivative

may be obtained.

a) true

b) false

Q42: More function evaluations are required in order to compute the derivative with the

same relative accuracy for higher order derivatives.

a) true

b) false

Q43: Ordinary differential equations may have any number of independent variables.

a) true

b) false

Q44: Partial differential equations must have fewer than ten independent variable.

a) true

b) false

Q45: The differential equation x^3 y’’ + 10 y’ + x^2 y = 0 is order:

a) 2

b) 3

c) 4

Q46: Runge-Kutta is used for iterative solution of ordinary differential equations.

a) true

b) false

Q47: Solving a system of linear equations may be used for a direct solution of

partial differential equations.

a) true

b) false

Q48: Given a second order differential equation with a smooth solution y(x), and

y’’=f(x,y,yp), the following code will give a reasonable solution

for a good choice of h

L: ypp = f(x,y,yp)

yp = yp + h * ypp ypp stands for y’’

y = y + h * yp yp stands for y’

x = x + h loop to L:

if x ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download