Skip to content
DeepForgeby svx
All problems
EasyInformation Theoryinfo-196

Incremental Redundancy Rate

Problem

Return the effective code rate of an incremental-redundancy scheme: k information bits divided by the total number of transmitted bits. As more redundancy is sent the effective rate drops.

Hint

The rate is information bits over total transmitted bits.

Test cases

case 1
in: [1,2]
expected: 0.5
case 2
in: [2,3]
expected: 0.6666666666666666
case 3
in: [1,1]
expected: 1
case 4
in: [3,9]
expected: 0.3333333333333333
Starter codePython
def incremental_redundancy_rate(k, transmitted):
    # Your code here
    pass

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