Skip to content
DeepForgeby svx
All problems
EasyInformation Theoryinfo-304

BEC Correct Decode Probability

Problem

A bit is sent n times over a binary erasure channel with erasure probability pe. Decoding succeeds as long as at least one copy is not erased, so the probability of a correct decode is 1 - pe^n. Assume n >= 1 and 0 <= pe <= 1.

Hint

Compute the probability that every copy is erased and subtract it from one.

Test cases

case 1
in: [3,0.5]
expected: 0.875
case 2
in: [1,0.3]
expected: 0.7
case 3
in: [5,0]
expected: 1
case 4
in: [2,1]
expected: 0
Starter codePython
def bec_correct_decode(n, pe):
    # Your code here
    pass

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