HW4
HW4
The objective of “denoising” can be stated as finding a vector 𝒚𝒚 that is “similar” to 𝒚𝒚∗ , but smoother.
Mathematically, this objective can be formulated as
min 𝜑𝜑 (𝒚𝒚),
𝒚𝒚
where
𝑛𝑛−1
Here 𝑛𝑛 denotes the number of sample points (401 in this example), and 𝜇𝜇 is a “smoothing” factor. You should
realize that the first term of 𝜑𝜑(𝒚𝒚) enforces that 𝒚𝒚 is close to 𝒚𝒚∗ , while the second term enforces that 𝒚𝒚 is smoother
(depending on the value of 𝜇𝜇).
(2) Show that the above minimization problem can be formulated as a least squares problem. That is, find matrix 𝑨𝑨
and vector 𝒃𝒃, such that
𝜑𝜑 (𝒚𝒚) = ‖𝑨𝑨𝑨𝑨 − 𝒃𝒃‖22 .
What are the dimensions of matrix A? Is it a sparse matrix? Hint: 𝑨𝑨 does not need to be a square matrix.
(3) Show that minimizing ‖𝑨𝑨𝑨𝑨 − 𝒃𝒃‖22 is equivalent to solving linear system
𝒓𝒓
� 𝑰𝑰𝑻𝑻 𝑨𝑨� � � = �𝒃𝒃�.
𝑨𝑨 𝟎𝟎 𝒚𝒚 𝟎𝟎
Realize that this linear system preserves sparsity if 𝑨𝑨 is a sparse matrix.
(4) Construct this linear system for the current problem, calculate its condition number, and solve it using either a
program you developed in previous homework or a built-in function. Try 𝜇𝜇 = 0, 1, 100, 1000, 10000. In each
case, plot your solution 𝒚𝒚 in the same graph with 𝒚𝒚∗ . Discuss your results for different values of 𝜇𝜇.
(ref. solution, 𝜇𝜇 = 100)
(In the same way, least squares can be applied to denoise and deblur 2D images.)