All problems
Binary Erasure Channel Capacity
Problem
Compute the capacity in bits of a binary erasure channel with erasure probability pe:
C = 1 - pe
The receiver knows when a symbol was erased.
Hint
Only the fraction of symbols that survive the erasure carries information.
Test cases
case 1
in: [0]
expected: 1
case 2
in: [0.5]
expected: 0.5
case 3
in: [1]
expected: 0
case 4
in: [0.25]
expected: 0.75
Starter codePython
def bec_capacity(pe):
# Your code here
pass4 test cases · run your code against them in the editor