Summing Out A Variable |
Suppose we are eliminating Y, and we have absorbed all of the confactors that contain Y into the confactors for Y. Then any two confactors in R that contain Y have incompatible contexts. The contexts for the confactors that contain Y in the table are disjoint from the contexts of the confactors that contain Y in the body.
Summing out Y from a confactor that contains Y in the table proceeds as before. We can use a similar trick to absorption to avoid any more splitting when adding confactors that contain Y in the body.
Suppose Y has domain {v1,...,vs}. The contexts of the confactors with Y=vi in the body are exclusive and the disjunct is logically equivalent to the disjunct of confactors with Y=vj in the body for any other value vj.
For each 1 <= i <= s, let Ri = {<b,t>: <b&Y=vi,t> in R+ }. Thus Ri is the confactor for Y=vi in the context, but with Y=vi omitted from the context. We will combine the Ri's using a binary operation:
where +t is an addition operation defined on tables that is identical to the product ×t of Definition * except that it adds the values instead of multiplying them.
R1 +g R2={<c1 union c2,set(t1,c2)+tset(t2,c1)>: <c1,t1> in R1, <c2,t2> in R2, compatible(c1,c2)}
Then R1 +g R2 +g...+g Rs is the result from summing out Y from the confactors with Y in the body.
Summing Out A Variable |