Skip to main content
. Author manuscript; available in PMC: 2010 Oct 25.
Published in final edited form as: Ann Math Artif Intell. 2008 Nov 1;54(1-3):3–51. doi: 10.1007/s10472-009-9132-y
Algorithm 2: Elim-CPE
input : A belief network = {P1, …, Pn}; a CNF formula on k propositions φ = {α1, …αm} defined over k propositions; an ordering of the variables, d = {X1, …, Xn}.
output : The belief P(φ).
1 Place buckets with unit clauses last in the ordering (to be processed first). // Initialize
Partition and φ into bucket1, …, bucketn, where bucketi contains all the CPTs and clauses whose highest variable is Xi.
Put each observed variable into its appropriate bucket. Let S1, …, Sj be the scopes of the CPTs, and Q1, …Qr be the scopes of the clauses. (We denote probabilistic functions by λs and clauses by αs).
2 for pn down to 1 do // Backward
 Let λ1, …, λj be the functions and α1, …, αr be the clauses in bucketp
Process-bucketp(Σ,(λ1, …, λj),(α1, …, αr))
3 return P(φ) as the result of processing bucket1.