Acyclic Network. Tree Based Clustering. Tree Decomposition Methods

Similar documents
Summary. Acyclic Networks Join Tree Clustering. Tree Decomposition Methods. Acyclic Network. Tree Based Clustering. Tree Decomposition.

Acyclic Network. Tree Based Clustering. Tree Decomposition Methods

Class2: Constraint Networks Rina Dechter

A Comparison of Structural CSP Decomposition Methods

These notes present some properties of chordal graphs, a set of undirected graphs that are important for undirected graphical models.

Class 2 Constraint Networks

Graph and Digraph Glossary

Constraint Solving by Composition

Graph Theory. Probabilistic Graphical Models. L. Enrique Sucar, INAOE. Definitions. Types of Graphs. Trajectories and Circuits.

University of Alberta

Constraint Satisfaction Problems

Last course. Last course. Michel Habib 28 octobre 2016

Reducing redundancy in the hypertree decomposition scheme

Enumeration of Perfect Sequences in Chordal Graphs

Chordal graphs MPRI

CS242: Probabilistic Graphical Models Lecture 2B: Loopy Belief Propagation & Junction Trees

!!" '!" Fall 2003 ICS 275A - Constraint Networks 2

Constraint Optimisation Problems. Constraint Optimisation. Cost Networks. Branch and Bound. Dynamic Programming

Chordal Graphs: Theory and Algorithms

Lecture 11: May 1, 2000

REU Problems of the Czech Group

The 3-Steiner Root Problem

Belief propagation in a bucket-tree. Handouts, 275B Fall Rina Dechter. November 1, 2000

Index. C cmp;l, 126. C rq;l, 127. A A sp. B BANDWIDTH, 32, 218 complexity of, 32 k-bandwidth, 32, 218

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Search Algorithms for Solving Queries on Graphical Models & the Importance of Pseudo-trees in their Complexity.

Complexity Results on Graphs with Few Cliques

arxiv: v1 [math.co] 20 Nov 2018

Read-Once Functions (Revisited) and the Readability Number of a Boolean Function. Martin Charles Golumbic

Applied Mathematics Letters. Graph triangulations and the compatibility of unrooted phylogenetic trees

Graphs: Introduction. Ali Shokoufandeh, Department of Computer Science, Drexel University

Lecture 13: May 10, 2002

Constraint Satisfaction Problems

Thinking Outside the Graph

Conflict Graphs for Combinatorial Optimization Problems

Steiner Trees and Forests

Junction Trees and Chordal Graphs

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.

CS388C: Combinatorics and Graph Theory

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1

The External Network Problem

Minimal Dominating Sets in Graphs: Enumeration, Combinatorial Bounds and Graph Classes

EE512 Graphical Models Fall 2009

On 2-Subcolourings of Chordal Graphs

Approximation Algorithms for Geometric Intersection Graphs

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

Some new results on circle graphs. Guillermo Durán 1

Junction Trees and Chordal Graphs

CONTRACTIONS OF PLANAR GRAPHS

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1

Geometric Steiner Trees

A Decomposition for Chordal graphs and Applications

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

ALGORITHMS FOR DECISION SUPPORT

Solving NP-hard Problems on Special Instances

Unifying Cluster-Tree Decompositions for Automated Reasoning. Kalev Kask, Rina Dechter and Javier Larrosa

9 About Intersection Graphs

A generic framework for solving CSPs integrating decomposition methods

9. Parameter Treewidth

Foundations of Artificial Intelligence

The minimum cost spanning tree problem

PART 1 GRAPHICAL STRUCTURE

28.1 Decomposition Methods

Notes on Minimum Cuts and Modular Functions

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

Bayesian Networks, Winter Yoav Haimovitch & Ariel Raviv

Characterizations of graph classes by forbidden configurations

Practice Final Exam 1

Kernelization Upper Bounds for Parameterized Graph Coloring Problems

Class2: Constraint Networks Rina Dechter

Constraint Satisfaction Problems Part 2

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1

Computational Discrete Mathematics

Graph Theory. ICT Theory Excerpt from various sources by Robert Pergl

Consistency Enforcing and Constraint. Propagation: Path consistency and. i-consistency. i-consistency. Path. Consistency.

An Extension of Complexity Bounds and Dynamic Heuristics for Tree-Decompositions of CSP

Matching Theory. Figure 1: Is this graph bipartite?

GEOMETRY BASIC GEOMETRICAL IDEAS. 3) A point has no dimensions (length, breadth or thickness).

How Much Of A Hypertree Can Be Captured By Windmills?

0.0.1 Network Analysis

V10 Metabolic networks - Graph connectivity

Decomposition of log-linear models

On Covering a Graph Optimally with Induced Subgraphs

Introduction to Combinatorial Algorithms

ORF 307: Lecture 14. Linear Programming: Chapter 14: Network Flows: Algorithms

6 : Factor Graphs, Message Passing and Junction Trees

Minimum-Spanning-Tree problem. Minimum Spanning Trees (Forests) Minimum-Spanning-Tree problem

Computing optimal total vertex covers for trees

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

Theorem 2.9: nearest addition algorithm

Graphs. Edges may be directed (from u to v) or undirected. Undirected edge eqvt to pair of directed edges

Interaction Between Input and Output-Sensitive

Graphs and Algorithms 2015

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Introduction to Graph Theory

4. Specifications and Additional Information

Transcription:

Summary s Join Tree

Importance of s Solving Topological structure defines key features for a wide class of problems CSP: Inference in acyclic network is extremely efficient (polynomial) Idea: remove cycles from the network somehow We can always compile a cyclic graph into an acyclic tree-like structure We always pay a price in term of computational complexity The price we pay depends on the topological structure

Graph Concept: Brief Review Hypergraphs Hypergraphs: H = (V, S) Vertices: V = {v 1,, v n } Hyperegdes: S = {S 1,, S k } where S i V Example (Hypergraph) V = {A, B, C, D, E, F } S = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}}

Graph Concept: Brief Review Primal Graph Primal Graph of a Hypergraph Nodes Vertices Two nodes connected iff they appear in the same hyperedge For binary contraint networks, Hypergraph and Primal graph are identical Example (Primal Graph) V = {A, B, C, D, E, F } E = {{A, B}{A, C}{B, C}{A, E}{A, F } {E, F }{C, D}{C, E}{D, E}}

Graph Concept: Brief Review Dual Graph Dual Graph of a Hypergraph Nodes Hyperedges Two nodes connected iff they share at least one vertex Edges are labeled by the shared vertices Example (Dual Graph) V = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}} E = {{{A, E, F }{A, B, C}}{{A, E, F }, {C, D, E}} {{A, E, F }, {A, C, E}}{{A, B, C}, {C, D, E}} {{C, D, E}, {A, C, E}}{{A, B, C}, {A, C, E}}}

Constraint s and Graph Representation Graph for Constraint s Any constraint network can be associated with a hypergraph Contraint network R = {X, D, C} with C = {R S1,, R Sr } Hypergraph H R = (X, H) where H = {S 1,, S r } Dual Graph H d R = (H, E) where < S i, S j > E iff S i S j { } Dual Problem R d = {H, D, C } D = {D 1,, D r }, D i set of tuples accepted by R Si C = {C 1,, C k }, C k =< S i, S j >, enforces equality for the set variables X k = S i S j

ity of Constraint If the graph representation of a problem is acyclic then we can solve problem efficiently Even cyclic graphs can have a tree-like structure relative to solution techniques Some arcs could be redundant In general it is hard to recognise redundant constraints

ity of Dual Problem Redundant Constraints for Dual Problems For the dual graph representation we can use a simple procedure to check whether a constraint is redundant All constraints force equality over shared variables A constraint and its corresponding arc can be deleted if the variables labeling the arc are contained in any alternative path between the two endpoints Because the constraint will be enforced by the other paths. This property is called running intersection or connectedness

The remaining structure is a tree Example: ity of Dual Problem Example ( Dual Problem) Consider this dual graph: V = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}} E = {{{A, E, F }{A, B, C}}{{A, E, F }, {C, D, E}} {{A, E, F }, {A, C, E}}{{A, B, C}, {C, D, E}} {{C, D, E}, {A, C, E}}} We can remove redundant constraints: {{A, E, F }{A, B, C}} because the alternative path (AEF ) AE (ACE) AC (ABC) enforce constraint on A {{A, E, F }{C, D, E}} because the alternative path (AEF ) AE (ACE) CE (CDE) enforce constraint on E {{C, D, E}{A, B, C}} because the alternative path (CDE) CE (ACE) AC (ABC) enforce constraint on C

Main Concepts Arc Subgraph of a graph G = {V, E}: any graph G = {V, E } such that E E Running Intersection property: G dual graph of an hypergraph, G an arc subgraph satisfies the running intersection properties if given any two nodes of G that share a variable, there exists a path of labeled arcs, each containing the variable. Join Graph: an arc subgraph of the dual graph that satisfies the running intersection properties Join Tree: an acyclic join graph Hypertree: a Hypergraph whose dual graph has a join tree : a network whose hypergraph is an hypertree

Solving Algorithm for Solving Algorithm 1 Tree Solver Require: An Constraint R, A join-tree T of R Ensure: Determine consistency and generate a solution d = {R 1,, R r } order induced by T (from root to leaves) for all j = r to 1 and for all edges < j, k > in the T with k < j do R k π Sk (R K R j ) if we find the empty relation then EXIT and state the problem has NO SOLUTION end if end for Select a tuple in R 1 for all i = 2 to r do Select a tuple that is consistent with all previous assigned tuples R 1,, R i 1 end for return The problem is CONSISTENT return the selected SOLUTION

Example: Solving Problem Example (Applying Tree Solver) Consider this join-tree: V = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}} E = {{{A, E, F }, {A, C, E}}{{C, D, E}, {A, C, E}} {{A, B, C}, {A, C, E}}} Assume constraints are given by R ABC = R AEF = {(0, 0, 1)(0, 1, 0)(1, 0, 0)} R CDE = R ACE = {(1, 1, 0)(0, 1, 1)(1, 0, 1)} d = {R ACE, R CDE, R AEF, R ABC }

Recognising s Main methods To apply the tree solver algorithm we need to know whether a network is acyclic This can not be decided simply by checking whether there are cycles in the primal or dual graph Two main methods Dual based Recognition Primal based Recognition

Dual Based Recognition Dual Based Recognition: Theoretical Result Maier 1983 If a hypergraph has a join tree then any maximum spanning tree of its dual graph is a join tree Weight of the arc are the number of shared variables

Dual Based Recognition: Procedure Main idea Build the dual graph of the hypergraph Compute a maximum spanning tree (weight = number of shared variables) Check whether the hypertree is a join tree Efficient because there is only one path for each couple of nodes

Dual Based Recognition: algorithm Dual ity Algorithm 2 Dualicty Require: A hypergraph H R = (X, S) of a constraint network R = (X, D, C) Ensure: A join tree T = (S, E) of H R if R is acyclic T = (S, E) generate a maximum spanning tree of the weighted dual constraint graph of R for all couples u, v where u, v S do if the unique path connecting them in T does not satisfy the running intersection property then EXIT (R is not acyclic) end if end for return R is acyclic and T is a join tree

Dual Based Recognition: Example Example (Dual Based Recognition) Consider this dual graph: V = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}} E = {{{A, E, F }{A, B, C}}{{A, E, F }, {C, D, E}} {{A, E, F }, {A, C, E}}{{A, B, C}, {C, D, E}} {{C, D, E}, {A, C, E}}} If we find a MST weighting edges with number of shared variables we obtain T : V = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}} E = {{{A, E, F }, {A, C, E}}{{C, D, E}, {A, C, E}} {{A, B, C}, {A, C, E}}} Which satisfies the running intersection property.

Primal Based Recognition Primal Based Recognition: main concepts A hypergraph has a join tree iff its primal graph is chordal and conformal [Maier 1983] Conformal A primal graph is conformal to a hypergraph if there is a one to one mapping between maximal cliques and scopes of constraints Chordal A primal graph is chordal if every cycle of length at least 4 has a chord (an edge connecting two vertices that are non adjacent in the cycle) Checking whether a graph is chordal and conformal can be done efficiently using a max-cardinality order

Primal Based Recognition using max cardinality order max cardinality order max-cardinality order is an ordering over vertices such that: first node is chosen arbitrarily then the node that is connected to a maximal number of already ordered nodes is selected (breaking ties arbitrarily) Chordal Graph if in a max-cardinality order each vertex and all its ancestors form a clique Find Maximal clique just list nodes in the order and consider each node ancestors

Primal Based Recognition: Procedure Main idea 1 build a max-cardinality order 2 Test whether the graph is chordal use the max-cardinality order check if ancestors form a clique 3 Test whether the graph is conformal use the max-cardinality order extract maximal cliques, check conformality

Primal Based Recognition: algorithm Primal ity Algorithm 3 Primalicty Require: A constraint network R = (X, D, C) and its primal graph G Ensure: A join tree T = (S, E) of H R if R is acyclic Build d m = {x 1,, x n} max-cardinality order Test Chordality using d m : for all i = n to 1 do if the ancestors of x i are not all connected then EXIT (R is not acyclic) end if end for Test Conformality using d m : Let {C 1,, C r } be the maximal cliques (a node and all its ancestors) for all i = r to 1 do if C i corresponds to scope of one constraints C then (R is acyclic) else EXIT (R is not acyclic) end if end for Create a join tree of the cliques (e.g., create a maximum spanning tree were weights are number of shared variables) return R is acyclic and T is a join tree

Example: Primal based recognition Example (Primal based recognition) Consider this hypergraph V = {A, B, C, D, E, F } S = {{A, E, F }{A, B, C}{C, D, E}{A, C, E}} decide whether this constraint network is acyclic using the primal based recongition procedure.

Compiling network to tree-like structures Aim: Compile network to acyclic structure Solve the acyclic structure efficiently using a tree-solver alg. : grouping subsets of constraints to form a tree-like structure Solve each subproblem (replace the set of relations with the solution of the problem) Solve the acyclic network If all steps are tractable this process is very efficient

Approaches Join Tree Given a constraint network Computes an acyclic equivalent constraint problem Cluster Tree Elimination More general scheme Given a Combine the acyclic problem solving with subproblem solution

Join Tree I Basic Concept Input: Hypergraph H = {X, H}, H set of scopes of constraints Output: Hypertree S = {S, E}, and a partition of the original relations (Hyperedges) into the new hypertree nodes S each node defines a subproblem containing a constraint if the constraint s scope is contained in the node (hyperegde) Each subproblem is solved independently Each subproblem is replaced with one constraint that has the scope of the node and accepts the solution tuples of the subproblem The smaller the node size, the better.

Join Tree II Basic Steps 1 Choose an order of variable 2 Create an induced graph given the ordering to ensure the running intersection property 3 Create a join tree Identify all maximal cliques in the induced graph C 1,, C t Create a tree structure T over the cliques (e.g., create a maximum spanning tree were weights are number of shared variables) 4 Allocate constraints to any clique that contains its scope (P i subproblem associated with C i ). 5 Solve each P i with R i its set of solutions 6 Return C = {R 1,, R t}

Induced graph Induced Graph and Induced Width Given graph G :< V, E > and order d over V Ancestors: neighbours that precedes the vertices in the ordering G induced graph of G over d is obtained by: process variables from last to first when processing v, add edges to connect all ancestors of v The width of a node is the number of ancestors of the node The width of a graph is the maximal width of its nodes The induced width w (d) of G given d is the width of G The induced width w of G is minimum induced width over all possible orderings

Induced Graph and chordality Induced Graph and chordality A graph is chordal iff it has a perfect elimination ordering [Fulkerson and Gross 1965] Perfect elimination ordering: ordering of the vertices such that, for each vertex v, v and its ancestors form a clique An induced graph < G, d > is chordal: d is a perfect elimination ordering for G

Example Example (Creating the join tree) Consider the following graph and assume it is a primal graph of binary contraint newtork: Variables: A, B, C, D, E, F Edges: (A, B)(A, C)(A, E)(B, E)(B, D)(C, D)(D, F ) Consider the orderings d 1 = F, E, D, C, B, A d 2 = A, B, C, D, E, F

Example contd. Example (Creating the join tree) The resulting join trees are: d 1 Cliques: Q 1 = (A, B, C, E), Q 2 = (B, C, D, E), Q 3 = (D, E, F ) Edges: < Q 1, Q 2 >, < Q 2, Q 3 > d 1 Cliques: Q 1 = (D, F ), Q 2 = (A, B, E), Q 3 = (B, C, D), Q 4 = (A, B, C) Edges: < Q 1, Q 3 >, < Q 2, Q 4 >, < Q 3, Q 4 >

Creating the chordal graph max-cardinality order Creating the chordal graph using a max-cardinality order is more efficient do not add useless edges if graph is already chordal

Ensuring the graph is conformal conformality When finding the maximal cliques we might violate conformality could create maximal cliques that have no mapping to constraints Conformality is enforced in later steps by creating a unique constraint for each sub problem

Complexity of JTC Complexity The running time of join tree clustering is dominated by computing the set of solutions of each sub problem This is exponential in the size of the clique Running time is dominated by running time to solve the subproblem of the maximal clique Size of maximal cliques is the induced width of the graph plus one The order used to compute the cliques is crucial Finding the best ordering is hard

Finding a Complete Solution Constraint Propagation Once we have solved the subproblems we still need to force arc-consisteny expand local solution to a global solution (if problem is consistent) We can use Tree-Solver for this

Exercise: Finding a Complete Solution Tree Solving Consider the following contraint network Variables: A, B, C, D, E, F Domains: id i = {0, 1} Constraints: (A B)(A C)(A E)(B = E) (B D)(C D)(D F ) Solve this constraint network using the JTC algorithm using the following orderings d 1 = F, E, D, C, B, A d 2 = A, B, C, D, E, F