Convolution of Functions and Sequences
- 19Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is the definition of the discrete convolution of two sequences a and b?
(a∗b)n=∑i+j=naibj The process involves flipping the second sequence, sliding it across the first, and summing the pairwise products at each offset.
Or swipe the card
19 cards
What is the definition of the discrete convolution of two sequences a and b?
(a∗b)n=∑i+j=naibj The process involves flipping the second sequence, sliding it across the first, and summing the pairwise products at each offset.
How can convolution be visualized using a table of products?
Create a grid of all pairwise products aibj, then sum along diagonals of constant i+j. Each diagonal sum corresponds to one element of the convolution.
Compute the convolution of [1,2,3] and [4,5,6].
The result is [4,13,28,27,18]. Steps: flip [4,5,6] to [6,5,4], then slide and multiply: offset 0: 1⋅4=4; offset 1: 1⋅5+2⋅4=13; offset 2: 1⋅6+2⋅5+3⋅4=28; offset 3: 2⋅6+3⋅5=27; offset 4: 3⋅6=18.
Why is the second sequence flipped in a convolution?
The flip arises naturally from the definition (a∗b)n=∑i+j=naibj, which aligns indices such that the sum is constant. It ensures commutativity a∗b=b∗a and matches the behavior of polynomial multiplication.
How does the output length of a discrete convolution compare to the input lengths?
If a has length N and b has length M, the convolution has length N+M−1. In practice, outputs may be truncated (e.g., to keep same size in image processing).
How is convolution used to combine probability distributions for the sum of two independent random variables?
For distributions a and b (e.g., dice faces), the probability of sum n is P(sum=n)=∑iaibn−i, which is exactly the convolution a∗b.
In the dice example, how can the convolution be visualized with sliding windows?
Place the probabilities of one die in a row, flip the second die's probabilities, then slide the flipped row across the first. At each offset, the aligned pairs sum to a constant, and their products sum to the probability of that sum.
How does convolution produce a moving average (smoothing) of a signal?
Convolve the signal with a kernel that sums to 1 (e.g., [1/5,1/5,1/5,1/5,1/5]). Each output is the average of a window of the signal, producing a smoothed version.
How is Gaussian blur implemented using convolution?
Convolve the image with a 2D kernel sampled from a Gaussian (bell curve) distribution. The kernel gives more weight to central pixels, creating a smooth blur that simulates defocus.
How does convolution detect vertical edges in an image?
Use a kernel with positive values on the left and negative on the right (e.g., Sobel kernel). The result highlights regions where pixel intensity changes horizontally, i.e., vertical edges.
How does convolution detect horizontal edges?
Use a kernel with positive values on top and negative on bottom. It highlights regions where pixel intensity changes vertically, i.e., horizontal edges.
What is a kernel in the context of image convolution?
A small matrix of numbers that is convolved with an image to achieve effects like blurring, sharpening, or edge detection. The kernel determines the transformation applied to the image.
How are convolutional neural networks (CNNs) related to convolution?
In CNNs, kernels are learned from data via training rather than being hand-designed. The network updates kernel weights to detect features relevant to the task (e.g., edges, textures).
How is convolution related to polynomial multiplication?
The coefficients of the product of two polynomials are the convolution of their coefficient sequences. For example, (1+2x+3x2)(4+5x+6x2) yields 4+13x+28x2+27x3+18x4, and the coefficient list [4,13,28,27,18] is the convolution of [1,2,3] and [4,5,6].
What is the naive computational complexity of discrete convolution?
For two sequences of length n, direct convolution requires O(n2) operations, since it computes all n2 pairwise products and sums them.
How can polynomial multiplication be performed faster using pointwise multiplication and interpolation?
Evaluate each polynomial at enough points, multiply the values pointwise (O(n)), then interpolate to recover the coefficients. However, naive evaluation and interpolation are O(n2), so this is not faster without fast transforms.
What is the key insight behind the Fast Fourier Transform (FFT) for convolution?
Evaluating polynomials at special points (roots of unity) allows computing the discrete Fourier transform (DFT) and its inverse in O(nlogn) time, leveraging redundancy in the roots.
Describe the FFT-based fast convolution algorithm.
Given sequences a and b: (1) Compute FFT of a and b (O(nlogn)). (2) Multiply the frequency-domain results pointwise (O(n)). (3) Compute inverse FFT to get the convolution (O(nlogn)). Total: O(nlogn).
How can the FFT be used to multiply large integers faster?
Represent digits of the integers as sequences, compute their convolution via FFT (O(nlogn)), then handle carries to obtain the product. This reduces complexity from O(n2) to O(nlogn).

Ask anything
We've read this whole study set, so questions about it get the best answers.