Factor-Variable Graph Sum-Product Algorithm

We normally start by initialising all variable-to-factor to a constant value, then first do factor-to-variable message update, followed by variable-to-factor message update.