Skip to content
DeepForgeby svx
All problems
EasyInformation Theoryinfo-101

Singleton Bound Check

Problem

Return True when the code parameters (n, k, d) satisfy the Singleton bound d <= n - k + 1, and False otherwise.

Hint

Puncturing a code reduces d by at most 1 for each parity symbol removed.

Test cases

case 1
in: [7,4,3]
expected: true
case 2
in: [7,4,5]
expected: false
case 3
in: [5,2,4]
expected: true
case 4
in: [10,3,9]
expected: false
Starter codePython
def singleton_bound_holds(n, k, d):
    # Your code here
    pass

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