To compute P(X|E1=o1 ∧ . . . ∧ Es=os)
Given multiset of contextual contribution confactors 1. Incorporate evidence as in Section 4.7.

2. While there is a factor involving a non-query variable Select non-query variable Y to eliminate; Call *eliminate*(Y).

3. Compute posterior probability for X as in Section 4.8

## Procedure Eliminate(Y):

partition the confactorbase R into:
R
− those confactors that don't involve Y
R
+ = {r ∈ R : r is a confactor for Y}
R
∗ = {r ∈ R : r involves Y and r is not a confactor for Y};
for each r ∈ R
∗
do R
+ ← *absorb*(R
+,r);
partition R
+ into:
R
t = {r ∈ R
+ : Y in table of r}
Ri = {-b, t **: -**b ∧ Y=vi, t ∈ R
+} for each 1 ≤ i ≤ s, where dom(Y) = {v1, . . . , vs}.

Return confactorbase R
− ∪ (R1 ⊕g · · · ⊕g Rs) **∪ {-**bi,Y
ti **: -**bi, ti ∈ R
t}.

absorb(R,r) is defined in Section 5.1.

R1 ⊕g R2 is defined in Section 5.2.

Figure 9: Contextual Variable Elimination with Absorption