01 · WHY THE GRAPH SAVES WORK
The distributive law exposes reusable sums
For the central variable, the three branches can be summarized independently.
\[\begin{aligned}g_3(x_3)=&\underbrace{\sum_{x_1,x_2}f_A(x_1)f_B(x_2)f_C(x_1,x_2,x_3)}_{\text{left branch}}\\[-2pt]&\times\underbrace{\sum_{x_4}f_D(x_3,x_4)}_{\text{upper branch}}\times\underbrace{\sum_{x_5}f_E(x_3,x_5)}_{\text{lower branch}}\end{aligned}\]
Each bracket is a function of only the variable at the branch boundary.
Store that function as a message. Reuse it when computing other marginals.
BAI LIPING · RANDOM THOUGHTS
Kschischang, Frey & Loeliger (2001) · p. 500