Foundations of Constraint Processing, Spring 2008 April 16, 2008 Tree-Structured CSPs 1 Foundations of Constraint Processing CSCE421/821, Spring 2008: www.cse.unl.edu/~choueiry/S08-421-821/ Berthe Y. Choueiry (Shu-we-ri) Avery Hall, Room 123B [email protected]Tel: +1(402)472-5444 Tree-Based Methods
26
Embed
Foundations of Constraint Processing, Spring 2008 April 16, 2008 Tree-Structured CSPs1 Foundations of Constraint Processing CSCE421/821, Spring 2008: choueiry/S08-421-821
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
• A CSP can be solved in a backtrack-free manner when it is strong w+1-consistent, where w is the width of the constraint network– Compute w the width of the graph– Reinforce strong w-consistency– May add arcs to the graph, increasing width and
requiring higher-level of strong consistency, etc.
• Approach is of little practical use• Except for trees, width = 1
Tree-Structured CSPs 3
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Tree-structured CSPs
• Trees have w = 1
• Enforcing 2-consistency does not alter the width
• Tree-structured CSPs can be solved in polynomial time– Apply Revise(Vi,Vj) for all nodes from leaves
to root– Instantiate variables from root to leaves
Tree-Structured CSPs 4
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Exploiting tree structures
• Cycle-Cutset Method – Dechter and Pearl 1997– Dechter Section 10.1.1 pages 273—276
• Independent Set Decomposition– Gompert, FLAIRS 2005
• Graph Reduction (GRED) – Unpublished work by Yaling Zheng 2007
Tree-Structured CSPs 5
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Cycle-Cutset Method (1)• Identify a cycle cutset S in the CSP (nodes when
removed yield a tree)• Decompose the CSP into 2 partitions
– The nodes in S– The nodes in T, forming a tree
• Idea– Solve the nodes in S– Try to extend the solution to nodes in T– Iterate
Tree-Structured CSPs 6
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Cycle-Cutset Method (2)
• Find a solution to nodes in S (S is smaller than initial problem)
• Repeat until you find a solution – For every solution to S
• Apply DAC from S to T• If no domain is wiped-out, solve T (quick)
• If |S|=c, time is O(dc.(n-c)d2)=O(ndc+2)
• Finding the smallest cutset is NP-hard
Tree-Structured CSPs 7
Foundations of Constraint Processing, Spring 2008
April 16, 2008
GRED [Yaling Zheng]
• After each assignment and FC/MAC step– Check the connectivity of the remaining CSP– Identify “dangling trees” using Graham’s graph
reduction operator
• For each dangling tree, – Do DAC from leaf to root – Domain wipe-out indicates unsolvability
• Restrict search to nodes outside the identified dangling trees
• Given an ordering– The width of a group of j consecutive nodes is
• the number of nodes
• preceding the j nodes in the group and
• connected to any of them
– The j-width of a node is the minimum, for k=1 to j, of the width of the k consecutive nodes up to and including the node.
– The j-width of an ordering is the maximum j-width of all nodes in the ordering
• The j-width of a graph is the minimum of all j-width of all orderings
Tree-Structured CSPs 10
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Separable Graphs (graphs with articulation points)
• Consider a CSP whose graph has articulation nodes
• Assume that the largest biconnected component has size b
• Build a tree whose nodes are the biconnected components, considering that the articulation node belong to the parent
• Build an ordering using a preorder traversal of the tree– The (b-1)-width of the ordering is 1
Tree-Structured CSPs 11
Foundations of Constraint Processing, Spring 2008
April 16, 2008
b-Bounded Search
• If for any level h in the search, – We can instantiate variable at level h+1– Considering its possible values, and– Reconsidering at most b-1 previous variables
• In a graph with articulation nodes, – let b be the size of the largest biconnected
component– Ordering the graph ‘along’ its biconnected
components guarantees b-bounded search
Tree-Structured CSPs 12
Foundations of Constraint Processing, Spring 2008
April 16, 2008
j-bounded search and j-width• There is an ordering
– That guarantees k-bounded backtrack search – If the graph strongly (i,k)-consistent, where i = j-width
• Problem: enforcing strong (i,k)-consistency may increase the j-width..
• Idea: Consider (1,k)-consistency– (Strong) (1,k)-consistency can be enforced without
altering the structure of the graph – Cost: time exponential in k+1
Tree-Structured CSPs 13
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Achieving (1,k)-consistency
• Achieving (strong) k-consistency via the constraint synthesis algorithm– Freuder shows that it also achieves (strong)
(i,j)-consistency for i+j=k, time exponential in k
• Consider the original CSP– Remove the filtered values from the domains,
updating the binary constraints– The resulting network is (1,k)-consistent w/o
altering the graph
Tree-Structured CSPs 14
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Graphs with articulation points
• Graphs whose largest biconnected component if b have (b-1)-width = 1
• Enforcing (1,b-1)-consistency • Can be enforced in time exponential in b• While guaranteeing (b-1)-bounded search
Result• A CSP can be solved in time exponential in b where b
– Create a tree structure over the cliques– Repeat
• Solve a clique (all solutions), at each node in tree• Apply DAC from leaves to root• Generate solutions in a BT-free manner
Tree-Structured CSPs 17
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Tree-Clustering Method: Complexity
• n: number of variables• Triangulation: O(n2)
– MinFill and MaxCardinality: O(n+e)
• Finding cliques: linear in n• Solving clusters: O(kr), k is domain size, r is size of
largest clique• Generating a solution O(n t log t)
– t is #tuples in each cluster, (sorted) domain of a ‘super’ variable – in best case, we have n cliques
• Complexity bounded by size of largest clique:– O(n2)+O(kr)+O(n t log t)=O(n kr log kr)=O(n r kr)
Tree-Structured CSPs 18
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Tree Decompositions• Tree must obey specific properties• Inspired from Database Theory (acyclic queries)• Studied for non-binary CSPs• Complexity of solving the CSP is bounded by a ‘width’
parameter – Max number of nodes in cluster– Max number of constraints in cluster
• Used to characterize tractable classes of CSPs• Little use beyond theoretical characterization, except
BTD/BTD+ by Jégou et al.
Tree-Structured CSPs 19
Foundations of Constraint Processing, Spring 2008
April 16, 2008
Tree decomposition Def 9.4, p. 257
• A tree decomposition (T, ,) of a CSP P=(X,D,C) where