By Hammersley-Clifford a strictly positive distribution factorises over the
cliques of its graph exactly when it satisfies the graph's Markov
properties, so the graph IS the conditional-independence statement. The
partition function and exact marginals are computed by enumeration, which
costs states^nodes and is therefore capped – past that the exact answer is
unavailable and this says so rather than running for hours.
Details
Potentials are not probabilities: they need not be normalised, need not be below one, and an individual potential has no marginal interpretation. Only the product, after dividing by Z, does.
