60 likes | 228 Views
MAXIMAL CLIQUES and JOIN TREE Algorithms. Peter Schlette CSE990 – Adv. Constraints Fall 2009. MAXIMAL CLIQUES. Inputs: A chordal graph and a perfect elimination order for it, σ (may be obtained via Min-Fill). Outputs: A vector of cliques.
E N D
MAXIMAL CLIQUES and JOIN TREE Algorithms Peter Schlette CSE990 – Adv. Constraints Fall 2009
MAXIMAL CLIQUES • Inputs: A chordal graph and a perfect elimination order for it, σ (may be obtained via Min-Fill). • Outputs: A vector of cliques. • For simplicity’s sake, we’ll use Chris’s graph as our test case. B A E C D G F
CLIQUES Procedure • Initialize S(v) = 0 (where v is any variable in V) • Fori = 1 up to n • Let v be the i’th variable in the ordering • Let X be the set of variables adjacent to v that come afterv in the ordering. • Ifv has no neighbors, then put it in its own clique. • Ifv has neighbors but all of them come before v in the ordering, then stop the algorithm – we’re finished. • Let u be the member of X that’s earliest in the ordering. • Let S(u) be the maximum of S(u) and |X|-1. • If S(v) < |X|, then add a clique: v (union) X.
JOIN-TREE • Input: A vector of cliques. • Hmm…where could we get one of those? • (From MAXIMAL CLIQUES, of course!) • Output: A join-tree of cliques, i.e. our vector of cliques arranged in a tree structure such that cliques that share the greatest number of variables are connected.
JOIN-TREE Procedure Dechter Figure 9.4 • For every clique Ci in our vector C: • Connect Ci to the Cj (j < i) with which it shares the most variables • Return the tree we’ve constructed.
Result {A, B, C, D} {B, D, E} {D, E, F} {E, F, G}