weighted spanning tree constraint with explanations
play

Weighted Spanning Tree Constraint with Explanations CPAIOR 2016 - PowerPoint PPT Presentation

Weighted Spanning Tree Constraint with Explanations CPAIOR 2016 Diego de U na, Graeme Gange, Peter Schachte and Peter J. Stuckey Presented by Peter J. Stuckey May 31, 2016 University of Melbourne CIS Department NICTA/Data61 Victoria


  1. Weighted Spanning Tree Constraint with Explanations CPAIOR 2016 Diego de U˜ na, Graeme Gange, Peter Schachte and Peter J. Stuckey Presented by Peter J. Stuckey May 31, 2016 University of Melbourne — CIS Department NICTA/Data61 Victoria

  2. Table of Contents 1. Background Spanning Trees in the Real World Variants of the Minimum Spanning Tree The WST constraint 2. Explaining Kruskal’s algorithm Kruskal’s algorithm with mandatory and forbidden edges Example Propagation rule 3. Experimental Results Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 2

  3. Background

  4. Spanning Trees in the Real World • Off-shore Wind Farm Planning (Klein et al., 2015) : Minimize the amount of cable needed to connect a network of turbines such that: • The degree of each turbine is less than 4. • The number of turbines on each branch connected to the main transformer is less than 7. • Cables between turbines don’t cross each other. • Electrical and computer networks: there is a maximum number of cables that can be connected to a single switch (Wang et al., 1994) . • Data Compression uses the Spanning trees with bounds on the diameter (Bookstein et al., 1991) . Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 4

  5. Variants of the Minimum Spanning Tree Most variants of the Minimum Spanning Tree are NP-hard: • Capacitated MST: where a root is chosen and each subtree under the root has a maximum number of nodes (Papadimitriou et al., 1984) . • Degree-constrained MST: minimum or maximum degree of nodes (Narula et al., 1980) . • Constrained MST: two weights per edge (costs of building and maintenance, for instance) with a bound on one and an objective on the other (Ravi et al., 1996) . • Diameter-constrained MST: bound on the diameter of the tree (Achuthan et al., 1992) . • ... Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 5

  6. The WST constraint Given: • a graph G = ( N , E ) • a weight function ws : E �→ N • a set B containing a Boolean variable c e for each edge. • an integer variable w the constraint wst ( N , E , ws , B , w ) ensures that B describes a sub-tree T of G that spans all nodes in G and is of cost w . c e = true ⇔ e ∈ T Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 6

  7. Previous work & Constribution Brief literature review on the WST constraint: • The MST constraint (Dooms et al., 2006) : ensure a graph is an MST. Cannot compromise cost for side constraints. � • The WST constraint (Dooms et al., 2007)(R´ egin, 2008) : first appearance of the constraint we study. No explanations � Contributions: • Explanations for the lower bound of the WST constraint. • Explanations for a propagation rule previously introduced. Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 7

  8. Explaining Kruskal’s algorithm

  9. Kruskal’s algorithm revisited Kruskal’s algorithm main idea: • Add cheapest edge until tree is formed. • Use a priority queue to retrieve edges. • Before adding an edge, ensure it does not form a cycle. • Use Union-Find to test acyclicity. Observations: • When adding an edge e = ( u , v ), if u and v are already connected, all edges between them are cheaper (or equal to) than e . • If we skip an edge e = ( u , v ), a more expensive (or equal) edge will be used to connect u and v . Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 9

  10. Kruskal’s algorithm with mandatory and forbidden edges It is easy to modify Kruskal’s algorithm to incorporate information about which edges MUST be in the tree and which edges CANNOT be in the tree. Mandatory edges: Pre-add mandatory edges as long as they don’t form cycles. Forbidden edges: Simply skip them. Some more expensive group of edges will con- nect the endnodes. Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 10

  11. Explaining Kurskal’s algorithm We need to explain failure when the cost of the cheapest possible Spanning Tree given the current decisions is above the limit w . 1. Run Kruskal’s algorithm while identifying: • a subset of forbidden edges to add in the explanations, • a substitute edge for each edge 2. Identify mandatory edges that could be substituted by cheaper edges such that the total cost was below the limit. Substitute edge e s is a substitute of e ∈ T iff replacing e with e s in T yields a spanning tree. Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 11

  12. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Initial graph Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 12

  13. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Mandatory edges pre-added. Forbidden edges appear dotted in grey Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 13

  14. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( h , a ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 14

  15. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( e , i ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 15

  16. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( f , g ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 16

  17. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: cannot add edge ( b , c ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 17

  18. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ∅ h 2 g f Forbidden edge 1 3 We will have to connect b to c through 4 3 some more expensive edges, thus we a e b add it to the explanation: ¬ c ( b , c ) 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: cannot add edge ( b , c ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 18

  19. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ¬ c ( b , c ) h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( b , a ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 19

  20. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ¬ c ( b , c ) h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: cannot add edge ( g , e ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 20

  21. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ¬ c ( b , c ) Substitute edge h 2 Node g and e are already con- g f 1 nected. 3 4 Edge ( g , e ) could be used instead 3 a e b of ( g , f ), ( f , a ), ( a , d ) or ( d , e ). 2 2 We say ( g , e ) substitutes those 5 10 4 d edges. c i 100 Fig. 1 : Following Kruskal’s algorithm: cannot add edge ( g , e ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 21

  22. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ¬ c ( b , c ) h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( a , f ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 22

  23. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ¬ c ( b , c ) h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( c , a ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 23

  24. Explaining Kurskal’s algorithm: Step 1 (Example) Why is the cost of the spanning tree greater than 27 given the current decisions? Explanation = ¬ c ( b , c ) h 2 g f 1 3 4 3 a e b 2 2 5 10 4 d c i 100 Fig. 1 : Following Kruskal’s algorithm: add edge ( a , d ) Peter J. Stuckey WST Constraint with Explanations CPAIOR 2016 24

Recommend


More recommend