Graph Based Filtering Nicolas Beldiceanu LINA, FRE CNRS 2729 École des Mines de Nantes Nicolas.Beldiceanu@emn.fr
Constraint & Graphs/OR: Peoples (companies) • J.-C. Régin ( Ilog , France - CPLEX & Solver ), M. Minoux (Paris 6) • Artelys (France), Dash Optimization (England) • T. Walsh (NICTA Australia), C. G. Quimper (Waterloo) • G. Pesant , M. Gendreau (Polytechnique Montréal) • N. Beldiceanu (Nantes), I. Katriel (Max-Plank, Saarbrücken) • P. Van Henteryck (Brown), I. Katriel (Max-Plank, Saarbrücken) • P. Baptiste (École Polytechnique & Thalès, France)
Overview of the Presentation • Getting into the Topic • Describing Global Constraints • Graph Based Filtering • Conclusion
A First Example of Global Constraint: circuit DEFINITION Cover a directed graph by a set of circuits in such a way that each vertex belongs to exactly one circuit. Other interpretation: number of cycles of a permutation. S6 S1 S3 CONSTRAINT (routing) circuit(Ncircuits,Successors) S5 S2 S4 circuit(Ncircuits, {S1,S2,S3,S4,S5,S6})
Example of Global Constraint: circuit DEFINITION Cover a directed graph by a set of circuits in such a way that each vertex belongs to exactly one circuit. CONSTRAINT circuit(Ncircuits,Successors) S6 S1 S3 S5 S2 S4 circuit( 2, { 2,4,1,3,6,5 } )
Representation of the Graph S1 :: {2,6} S2 :: {3,4} S6 S1 S3 S3 :: {1} S4 :: {2,3} S5 S2 S4 S5 :: {2,6} S6 :: {2,5} One variable for each node i Values are the potential successors of i
Constraint Propagation S6 S1 S3 S6 S1 S3 S5 S2 S4 S5 S2 S4 circuit(N, {S1,S2,S3,S4,S5,S6}) N ≤ 2 S6 ≠ 2 S2 ≠ 3 S4 ≠ 2
Constraint Propagation as Maintaining Graph Invariants Invariant : maintain a maximum cardinality matching µ of size 6 µ (G((X,Y), E) ≥ 6 S1 1 S1 S6 S3 S2 2 S1,S5:{2,6} ⇒ S4 ≠ 2 S5 S2 S4 S3 3 S4:{3} ⇒ S2 ≠ 3 S4 4 S5 5 S6 6 X E Y
Constraint Propagation as Maintaining Graph Invariants One other invariant for the circuit constraint is: The number of circuits N is greater than or equal to the number of strongly connected components of the graph G to cover. N ≥ nscc(G)
The Thesis Constraint Propagation = Maintaining Graph Invariants Focus first on formula (invariants) and then on how to interpret these formula (algorithm)
The Whole Idea (1) Describe global constraints in terms of graph properties (2) Maintain graph invariants involving those graph properties (3) Build a data base of graph invariants (4) Extract relevant invariants and interpret them
• Getting into the Topic • Describing Global Constraints • Graph Based Filtering • Conclusion
Global Constraints Common structures in discrete combinatorial problems. 1 2 4 3 6 4 2 3 2 6 6 2 9 1 3 3 6 3 1 2 element(3,{6,9,2},2) nvalue(2,{6,3,6,6}) symmetric_alldiff({3,4,1,2}) nvalue( N , L ) symmetric_alldiff( L ) element( X , L , Y ) L in [1,n], alldifferent( L ), N =| L | L [ X ]= Y X i =j ⇔ X j =i ( matching of card. n/2 )
Main Idea of the Classification Global Constraints as: Graph Properties on Structured Network of Elementary Constraints of the Same Type
3 5 3 3 Initial network • vertex: variable • arc: equality ctr 3 3 3 8 Variables get fixed: 3 3 3 • some equalities hold, • some equalities do not hold 3 3 3 Ask propertie on sub-graph of constraints that still hold (i.e., one single connected component)
Examples of Graph Generator • CYCLE • LOOP • GRID • PATH • CLIQUE • CIRCUIT • PRODUCT • CHAIN
Examples of Graph Properties • NVERTEX : cardinality of V( G ) • NEDGE : cardinality of E( G ) • NSOURCE : number of vertices without any predecessor • NSINK : number of vertices without any successor • NCC : number of connected components of graph G • MIN_NCC : number of vertices of the smallest c.c. of graph G • MAX_NCC : number of vertices of the largest c.c. of graph G • NSCC : number of strongly connected components of graph G • MIN_NSCC : number of vertices of the smallest s.c.c. of graph G • MAX_NSCC : number of vertices of the largest s.c.c. of graph G • MAX_IN_DEGREE : number of predecessors of the vertex of G that has the maximum number of predecessors (without considering loops)
nvalue( NVAL , VARIABLES ) • A R G U M E N T : NVAL : dvar VARIABLES : collection( var -dvar) • R E S T R I C T I O N (S) : NVAL ≥ 0 NVAL ≤ | VARIABLES | required( VARIABLES.var ) • V E R T E X G E N E R A T O R : VARIABLES • E D G E G E N E R A T O R : CLIQUE • E D G E A R I T Y : 2 • E D G E C O N S T R A I N T : VARIABLES.var [1] = VARIABLES.var [2] • G R A P H P R O P E R T Y : NSCC = NVAL nvalue( 4 , { var - 3 , var - 1 , var - 7 , var - 1 , var - 6 })
Collections of items: VARIABLES Vertices generator: IDENTITY V 1 V 2 V 3 V 4 V 5 Edge generator: CLIQUE V 2 V 1 V 3 V 5 V 4
V 2 V 1 V 3 Edge constraint: V 5 V 4 = = V 2 = = = V 1 V 3 = = = = = = = = = Graph property: = V 5 V 4 = NSCC= NVAL = 1 = 3 7 = = = = 6 1 nvalue( 4 , { var - 3 , var - 1 , var - 7 , var - 1 , var - 6 })
Global Constraint “Space” Structure of the initial graph e h loop t f o y h t = p r 1 asymetric e a p r g o = r l P a path n 3 7 i = f = equivalence = = 6 1 circuit transitive reflexive nvalue ( 4 , { 3 , 1 , 7 , 1 , 6 clique }) symetric d e y s t c l t chain g n e n e n o n n o r o t p s s c m s k f f c n o o o r i s c a s r r e t e n d f f b b o o e e m m n t r r c u e e u o e b b n n p n m m product m n u u o o n n c c Graph property 4 1 2 3
A Catalog of Global Constraints 16 graph properties: NARC, NVERTEX, 240 (graph) NCC, NSCC, MIN_NCC, MAX_NCC, MIN_NSCC, MAX_NSCC, ... 6 classes: ALPHA ACYCLIC, 250 constraints 100 (automata) BERGE ACYCLIC, SLIDING CYCLIC, CENTERED CYCLIC, ... 10 (not classified) ( period, choquet, … )
• Getting into the Topic • Describing Global Constraints • Graph Based Filtering − Introduction − Bounds of graph properties − Filtering back from the bounds to the arcs − Invariants linking several graph characteristics − Taking advantage from the graph structure • Conclusion
Intermediate Graph Initial graph Final graph Intermediate graph nvalue (3,{ x 1 , x 2 , x 3 , x 4 }) x 1 = x 4 x 1 ≠ x 3 x 2 ≠ x 3 x 3 ≠ x 4 Some vertices/arcs belong for sure the the final graph ( T -vertices, T -arcs) Some vertices/arcs may belong to the final graph ( U -vertices, U -arcs)
Graph Based Filtering Reasoning on one single graph property: (1) From the status of the vertices/arcs get bounds on that property (2) From limits on the bounds of that property propagate back to status Reasoning on several graph properties on the same graph: (3) Use invariants linking several properties (1) min( NSCC ) ≥ 2 max( NSCC ) ≤ 3 x 2 x 1 (2) NSCC ≥ 3 ⇒ x 1 ≠ x 2 , x 2 ≠ x 4 x 3 x 4 (3) (Turán, 1941)
• Getting into the Topic • Describing Global Constraints • Graph Based Filtering − Introduction − Bounds of graph properties − Filtering back from the bounds to the arcs − Invariants linking several graph characteristics − Taking advantage from the graph structure • Conclusion
no isolated vertices Bounds ( ) in the final graph
Minimum Number of Arcs cardinality of a maximum matching 3 3 1 A solution reaching 5 arcs Intermediate digraph : Arcs to be undetermined : Arcs to be true : Vertices to be true with all adjacent arcs to be undetermined
Minimum Number of Vertices cardinality of a minimum hitting set 3 1 A solution reaching 4 vertices Intermediate digraph : True vertices that are not the extremity of any true arcs and that have not a true vertex as neighbour : Undetermined vertices that has at least one true vertex as neighbour : Undetermined arcs such that at least one of their extremities is a true vertex
• Getting into the Topic • Describing Global Constraints • Graph Based Filtering − Introduction − Bounds of graph properties − Filtering back from the bounds to the arcs − Invariants linking several graph characteristics − Taking advantage from the graph structure • Conclusion
Filtering Back From the Maximum Number of Arcs
Filtering Back From the Maximum Number of Arcs 1 11 5 Intermediate digraph
• Getting into the Topic • Describing Global Constraints • Graph Based Filtering − Introduction − Bounds of graph properties − Filtering back from the bounds to the arcs − Invariants linking several graph characteristics − Taking advantage from the graph structure • Conclusion
Motivation A lot of global constraints use more than one graph characteristics. Example : consider the nvalue constraint and suppose we want a balanced assignment by restricting the min. and max. numbers of occurrences of any value effectively used. balanced_nvalue ( 4 , 1 , 2 , { 3 , 1 , 7 , 1 , 6 }) = 1 = MIN_NSCC= 1 3 7 = = MAX_NSCC= 2 = = 6 1 This involves constraining the MIN_NSCC and MAX_NSCC graph characteristics.
Recommend
More recommend