libdai : a free and open source c + + library for discrete approximate inference in graphical models .
Factor Graphs and the Sum Product Algorithm