Create the initial induced graph from a set of factors.
Returns the new graph after eliminating the given variable.
Returns the new graph after eliminating the given variable. This includes a factor involving all the variables appearing in a factor with the eliminated variable, and excludes all factors in which the eliminated variable appears.
A map from variables to information about the variables describing the factors to which it belongs and its neighbors.
Returns the elimination score, which is the increase in cost between the new factor involving the variable and the existing factors (we want to minimize score).
Induced graph for variable elimination.