Skip to content
DeepForgeby svx
All problems
HardInformation Theoryinfo-204

Entropy Power Inequality Check

Problem

Check the entropy power inequality for continuous random variables. Define the entropy power N(h) = 2^(2h) / (2 * pi * e) for a differential entropy h in bits, and return True when N(X+Y) >= N(X) + N(Y) within 1e-12.

Hint

Two independent Gaussians achieve equality in the entropy power inequality.

Test cases

case 1
in: [2.047095585180641,2.047095585180641,2.547095585180641]
expected: true
case 2
in: [2,1,2.6]
expected: true
case 3
in: [1,1,1.5]
expected: true
case 4
in: [2.047095585180641,0,1.5]
expected: false
Starter codePython
import math
def entropy_power_inequality_holds(hx, hy, hxy):
    # Your code here
    pass

4 test cases · run your code against them in the editor