There seems to be two standard ways to do the message passing in belief propagation: finding the sum-product (the marginal distribution) of a variable and finding the max-produc