Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 216 1 b Solution 2026-10-03
The posterior mean of the number infected isRun sum-product belief propagation on the tree to compute every exact one-vertex posterior marginal. Summing their probabilities of state one gives the requested mean. Messages have fixed size and every directed edge is processed once, so the exact computation costs