Revisiting the tree constraint Performing GAC in linear time Jean-Guillaume Fages and Xavier Lorca Jean-Guillaume Fages and Xavier Lorca CP'11 TASC - Nantes 1
Contents • Preamble • Theoretical contribution • Experiments and results CP'11 TASC - Nantes 2
Introduction • Preamble – Anti-arborescence partitioning – Anti-arborescence partitioning – Vocabulary • Theoretical contribution • Experiments and results CP'11 TASC - Nantes 3
Anti-arborescence partitioning Directed graph such that each connected component has one loop (the root) and such that each node has exactly one successor successor An input graph (directed) An anti-arborescence partition CP'11 TASC - Nantes 4
Anti-arborescence partitioning First step for p aths partitioning* • Vehicle routing • Vehicle routing • Mission planning DEPOT *(with a 1-predecessor propagator) CUSTOMERS CP'11 TASC - Nantes 5
Anti-arborescence partitioning Tree constraint introduced by X. Lorca et. al. [CPAIOR’05] [CPAIOR’05] Based on strong articulation points properties � Ensures GAC � Cardinality pruning in O(n+m) � Structural pruning in O(nm) CP'11 TASC - Nantes 6
Anti-arborescence partitioning Different from any weighted spanning tree constraint � Work on a real tree ( undirected ) � Work on a real tree ( undirected ) � Take cost into account J-C. Régin, L-M Rousseau, M. Rucher and W-J Van Hoeve [CPAIOR’10] J-C. Régin [CPAIOR'08] G. Dooms and I. Katriel [CPAIOR’07] I. Aron and P. Van Hentenryck [UAI’02] CP'11 TASC - Nantes 7
Vocabulary • Graph variable of an input graph G = (V,A) Introduced by G. Dooms et. al. [CP’05] Introduced by G. Dooms et. al. [CP’05] Defined by: – Envelope (max) G E = (V E ,A E ) Nodes and arcs that potentially figures in a solution – Kernel (min) G K = (V K ,A K ) Nodes and arcs that figure in every solution G K ⊆ G E ⊆ G CP'11 TASC - Nantes 8
Vocabulary • Flow graph s s Directed graph G(s) such that each Directed graph G(s) such that each node is reachable from the source s by a directed path • Dominator A node x dominates y (x ≠ y) in a flow graph G(s) iff all path from s to y go through x CP'11 TASC - Nantes 9
Theoretical contribution • Preamble • Theoretical contribution – New pruning condition – Algorithm • Conclusion CP'11 TASC - Nantes 10
New pruning condition Necessary and sufficient condition for structural pruning: (v,u) in G is infeasible iff: (v,u) in G E is infeasible iff: – v has another successor in the kernel (trivial) OR – All paths in G E from u to any potential root w go through v � Use of domination concept, identified by L. Quesada et. al. as useful for graph accessibility problems [PADL’06] CP'11 TASC - Nantes 11
New pruning condition (v,u) in G E is infeasible � � v dominates u in G Es -1 (s) � � s s Add a fictive Inverse sink s G E G Es G Es -1 (s) CP'11 TASC - Nantes 12
New pruning condition (v,u) in G E is infeasible � � v dominates u in G Es -1 (s) � � s s Add a v dominates fictive v Inverse v v u, w and x sink s w w u u w w u u w w u u x x G E G Es G Es -1 (s) CP'11 TASC - Nantes 13
Algorithm Procedure: 1. Build/Update G Es -1 (s) 2. Compute dominance tree of G Es -1 (s) 3. FOR EACH arc (x,y) in G E IF ( x dominates y in G Es -1 (s) ) 4. Es G E � G E \{(x,y)} 5. 6. END IF 7. END FOR CP'11 TASC - Nantes 14
Algorithm Computing the dominance tree of a digraph in O(n+m) [l.2] � Alstrup et. al. O(n+m) [SAIM’99] � Alstrup et. al. O(n+m) [SAIM’99] � Buschbaum et. al. O(n+m) [TOPLAS’98] � Lengauer-Tarjan O( α (n,m).m) [TOPLAS’79] α is the inverse of Ackermann function so it is « almost » a constant α (n,m) ≤ 5 for any practical input graph [Gabriel Nivasch, ETH Zürich] CP'11 TASC - Nantes 15
Algorithm Answering O(m) dominance requests in O(n+m) [l. 3-4] Preprocessing (DFS) Starting at the fictive source node Starting at the fictive source node Storage of preorder and postorder labels Request: x dominates y � x ancestor of y in the dominance tree � (preorder(y)>preorder(x)) ∧ (postorder(y)<postorder(x)) 1-8 8-7 2-6 2-6 7-5 3-4 6-3 4-1 5-2 CP'11 TASC - Nantes 16
Experiments and results • Preamble • Theoretical contribution • Experiments and results – Different models – Scalability and data structures – Conclusion – Conclusion CP'11 TASC - Nantes 17
Different models Experiments on randomly generated instances: � Connected directed graphs � Connected directed graphs � Various graph densities Models • Binary decomposition model • Original tree constraint • New tree constraint ( LT algorithm) 1. Matrix representation (BitSets) 2. List representation (Linked lists) CP'11 TASC - Nantes 18
Different models � The decomposition model is unstable � The previous tree constraint does not scale � The new tree constraint looks reliable and fast CP'11 TASC - Nantes 19
Scalability and data structures Sparse graph ( d + =5 ) Complete graph ( d + =n ) � Important scaling factor from 2.5 to 12.85 � Impact of the data structure CP'11 TASC - Nantes 20
Conclusion � Simpler formulation of the tree constraint � Ensures GAC in O(n+m) worst case time complexity � Ensures GAC in O(n+m) worst case time complexity � Outperforms all previous approaches by an important scaling factor � Points � Points out out the the impact impact of of the the chosen chosen data data structure structure according to the input graph density � Great perspectives such as path partitioning problems CP'11 TASC - Nantes 21
Thank you for listening If you have any question... If you have any question... Do not forget CP'11 TASC - Nantes 22
Recommend
More recommend