All problems
Wyner-Ziv Gaussian Rate
Problem
Return the Wyner-Ziv rate in bits for a Gaussian source with side information:
R = 0.5 * log2(var * (1 - rho^2) / distortion)
where rho is the correlation with the side information at the decoder. Assume 0 < distortion <= var * (1 - rho^2).
Hint
Stronger side information reduces the conditional variance and the rate.
Test cases
case 1
in: [1,0,0.25]
expected: 1
case 2
in: [1,0.5,0.75]
expected: 0
case 3
in: [4,0,1]
expected: 1
case 4
in: [4,0.6,2]
expected: 0.17807190511263768
Starter codePython
import math
def wyner_ziv_gaussian_rate(var, rho, distortion):
# Your code here
pass4 test cases · run your code against them in the editor