A1350 of 55
0 XP
  1. Hook
  2. Problems

A13 · Problem set 10

Problem set 10: FFTs, Monte Carlo and sparse matrices

These problems use lessons 47 to 49: the FFT as an algorithm and its practical use, Monte Carlo integration and yield with variance reduction, and sparse matrix storage and solvers. Many are about cost: counting operations, samples or bytes before you commit to a computation.

Check

A radix-2 FFT has N=216 points.

(a)

How many butterflies (complex multiplications) does it take?

(b)

How many times fewer than a direct DFT's N2?

Check

Convolve 1000 samples with a 100-tap filter by FFT.

(a)

What is the smallest power-of-two FFT length that avoids wraparound?

Check

A record of 512 samples at 8000 Hz.

(a)

What is the FFT's bin spacing?

Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.

(b)

How long is the record?

Check

The twiddle factor WNk=e−j2πk/N, with N = 16 and k = 1.

(a)

What is its real part?

(b)

What is its imaginary part?

Check

A Monte Carlo integrand has standard deviation 0.5.

(a)

How many samples bring the standard error to 0.01?

(b)

How many for an error ten times smaller?

Check

A yield simulation passes a fraction 0.95 of 1000 trials.

(a)

What is the yield's standard error?

Check

You estimate a failure probability near 0.001 by simulation.

(a)

How many trials give a relative error of 0.1?

Check

Antithetic pairs: each sample has variance 0.242, and the halves of a pair have covariance −0.2.

(a)

What is the variance of the pair average?

Check

A grid rule of order 2 is used in 5 dimensions.

(a)

Its error goes as Nq in the total number of points. What is q?

(b)

Monte Carlo's error goes as N−1/2. The grid rule wins when pd exceeds ½; what is p/d1/2 here?

Check

A sparse matrix has 1000000 rows with 5 nonzeros each, stored in CSR (8-byte values, 4-byte indices).

(a)

How much memory does it take?

(b)

How many operations does a matrix–vector product take?

Check

A 2D grid of 200 × 200 unknowns is numbered row by row.

(a)

What is the matrix's bandwidth?

(b)

About how many operations does banded LU take, 2nb2?

Check

An arrow matrix has a hub row and column connected to all 1000 − 1 other unknowns, which connect only to the hub.

(a)

If the hub is eliminated first, about how many new nonzeros (fill) appear?

(b)

And if it's eliminated last?

Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.

Practice

Keep practicing

15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.