Skip to content
DeepForgeby svx
All problems
MediumInformation Theoryinfo-199

Belief Propagation Message

Problem

Return the check-to-variable message from a check node when one incoming message (at `index`) is excluded. The message is the product of the signs of the other messages times the smallest absolute value among them. Return 0.0 when no other messages exist.

Hint

This is the extrinsic min-sum rule used by LDPC decoders.

Test cases

case 1
in: [[1,2,3],0]
expected: 2
case 2
in: [[1,2,3],1]
expected: 1
case 3
in: [[-1,2,-3],0]
expected: -2
case 4
in: [[1],0]
expected: 0
case 5
in: [[2,-4,6],2]
expected: -2
Starter codePython
def bp_check_message(messages, index):
    # Your code here
    pass

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