Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Extending the Reach of Constraint Technology through Reformulation.

Slides:



Advertisements
Similar presentations
The Complexity of Linear Dependence Problems in Vector Spaces David Woodruff IBM Almaden Joint work with Arnab Bhattacharyya, Piotr Indyk, and Ning Xie.
Advertisements

Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
A System to Generate Test Data and Symbolically Execute Programs Lori A. Clarke September 1976.
Optimizing Compilers for Modern Architectures Allen and Kennedy, Chapter 13 Compiling Array Assignments.
Reducing Symmetry in Matrix Models Alan Frisch, Ian Miguel, Toby Walsh (York) Pierre Flener, Brahim Hnich, Zeynep Kiziltan, Justin Pearson (Uppsala)
1 Transportation problem The transportation problem seeks the determination of a minimum cost transportation plan for a single commodity from a number.
Case study 5: balanced academic curriculum problem Joint work with Brahim Hnich and Zeynep Kiziltan (CPAIOR 2002)
Generating Implied Constraints via Proof Planning Alan Frisch, Ian Miguel, Toby Walsh Dept of CS University of York EPSRC funded project GR/N16129.
But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!
Leeds: 6 June 02Constraint Technology for the Masses Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Collaborators:
Chris Hall Aerospace and Ocean Engineering
Transforming and Refining Abstract Constraint Specifications Alan Frisch, Brahim Hnich*, Ian Miguel, Barbara Smith, and Toby Walsh *Cork Constraint Computation.
Chapter 4 DECISION SUPPORT AND ARTIFICIAL INTELLIGENCE
Constraint Models for the Covering Test Problems Authors: Brahim Hnich, Steven D. Prestwich, Evgeny Selensky, Barbara M. Smith Speaker: Pingyu Zhang CSE.
Symmetry as a Prelude to Implied Constraints Alan Frisch, Ian Miguel, Toby Walsh University of York.
Architecture-driven Modeling and Analysis By David Garlan and Bradley Schmerl Presented by Charita Feldman.
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel AI Group University of York Toby Walsh 4C.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Representation Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CSE 830: Design and Theory of Algorithms
Matrix Modelling Alan M. Frisch and Ian Miguel (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Toby Walsh (Cork)
Matrix Modelling Pierre Flener (Uppsala) Alan M. Frisch (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Ian Miguel, and Toby Walsh (York)
1 Engineering Computation Part 4. 2 Enrique Castillo University of Cantabria An algorithm that permits solving many problems in Algebra. Applications.
Matching Data Dissemination Algorithms to Application Requirements John Heidermann, Fabio Silva, Deborah Estrin Presented by Cuong Le (CPSC538A)
Alan M. Frisch Ian Miguel Joint work with Matt Grum, Chris Jefferson & Bernadette Martinez Hernandez The Rules of Modelling Automatic Generation of Constraint.
Reducing Symmetry in Matrix Models Alan Frisch, Ian Miguel, Toby Walsh (York) Pierre Flener, Brahim Hnich, Zeynep Kiziltan, Justin Pearson (Uppsala)
Modeling the Covering Test Problem Brahim Hnich, Steven Prestwich, and Evgeny Selensky Cork Constraint Computation Center UCC Supported by SFI.
Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Co-authors Ian Miguel, Toby Walsh, Pierre Flener, Brahim.
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel (York) Toby Walsh (Cork)
8 Systems Analysis and Design in a Changing World, Fifth Edition.
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel AI Group University of York Toby Walsh 4C.
Matrix Modelling: Déjà Vu Pierre Flener (Uppsala) Alan M. Frisch (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Ian Miguel, and Toby Walsh (York)
Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)
Modelling a Steel Mill Slab Design Problem Alan Frisch, Ian Miguel, Toby Walsh AI Group University of York.
Graph Algorithms. Overview Graphs are very general data structures – data structures such as dense and sparse matrices, sets, multi-sets, etc. can be.
1.1 Chapter 1: Introduction What is the course all about? Problems, instances and algorithms Running time v.s. computational complexity General description.
LINEAR PROGRAMMING SIMPLEX METHOD.
Mathematical Fundamentals
CS32310 MATRICES 1. Vector vs Matrix transformation formulae Geometric reasoning allowed us to derive vector expressions for the various transformation.
Copyright 2002 Prentice-Hall, Inc. Chapter 1 The Systems Development Environment 1.1 Modern Systems Analysis and Design.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
The Multiplicative Weights Update Method Based on Arora, Hazan & Kale (2005) Mashor Housh Oded Cats Advanced simulation methods Prof. Rubinstein.
The Electronic Geometry Textbook Project Xiaoyu Chen LMIB - Department of Mathematics Beihang University, China.
Knowledge representation
Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Graph Algorithms. Definitions and Representation An undirected graph G is a pair (V,E), where V is a finite set of points called vertices and E is a finite.
Modelling for Constraint Programming Barbara Smith CP 2010 Doctoral Programme.
Constraint Programming Research at York 1. Modelling 2. Symmetry Breaking 3. SAT 4. Applications Allocating orders to steel slabs in a steel mill Distribution.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
The AllDifferent Constraint: Efficiency Measures Ian P. Gent, Ian Miguel, Peter Nightingale.
CP Summer School Modelling for Constraint Programming Barbara Smith 4. Combining Viewpoints, Modelling Advice.
PHARMACOECONOMIC EVALUATIONS & METHODS MARKOV MODELING IN DECISION ANALYSIS FROM THE PHARMACOECONOMICS ON THE INTERNET ®SERIES ©Paul C Langley 2004 Maimon.
The E ngineering Design Process Foundations of Technology The E ngineering Design Process © 2013 International Technology and Engineering Educators Association,
Chapter 1 Introduction n Introduction: Problem Solving and Decision Making n Quantitative Analysis and Decision Making n Quantitative Analysis n Model.
The E ngineering Design Process Advanced Design Applications The E ngineering Design Process Teacher Resource – The First Five Days: Day 2 © 2014 International.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
1 Simple provisioning, complex consolidation – An approach to improve the efficiency of provisioning oriented optical networks Tamás Kárász Budapest University.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Robust Planning using Constraint Satisfaction Techniques Daniel Buettner and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science.
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Of An Expert System.  Introduction  What is AI?  Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES.
10.3 Reformulation The Lex-Leader Method Shant Karakashian 1.
Database Design, Application Development, and Administration, 6 th Edition Copyright © 2015 by Michael V. Mannino. All rights reserved. Chapter 5 Understanding.
Chapter 10: Process Implementation with Executable Models
CSCI N207 Data Analysis Using Spreadsheet
Resolution Proofs for Combinational Equivalence
Vector Spaces RANK © 2012 Pearson Education, Inc..
Presentation transcript:

Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Extending the Reach of Constraint Technology through Reformulation

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation2 Combination of Two Papers Matrix Modelling: Exploiting Common Patterns in Constraint Programming. Pierre Flener, Alan M. Frisch, Brahim Hnich, Zeynep Kiziltan, Ian Miguel, Toby Walsh Towards CSP Model Reformulation at Multiple Levels of Abstraction. Alan M. Frisch, Brahim Hnich, Ian Miguel, Barbara Smith, Toby Walsh

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation3 Formulation Bottleneck Useful for solving a wide range of important, complex problems including scheduling, allocation, layout. Modelling a problem as a constraint program requires moderate/great expertise. Hence constraint technology is used almost exclusively by large enterprises on problems with large payoff.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation4 Reducing the Formulation Bottleneck Systematise the knowledge of the expert. –Can recognise patterns in problems and match them to patterns of problem formulations. –Can choose among alternatives. Embed this knowledge in a “compiler” that can reformulate a high-level problem specification into a set of constraints that can be executed efficiently.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation5 Matrix Models A problem formulation involving one or more (multi-dimensional) matrices of decision variables. Often has row and column symmetry. 0 vs 72 vs 72 vs 60 vs 41 vs 63 vs 54 vs 5Period 3 0 vs 5 1 vs 4 3 vs 7 Week 5 3 vs 4 0 vs 6 1 vs 5 Week 6 1 vs 31 vs 22 vs 54 vs 66 vs 7Period 4 5 vs 65 vs 70 vs 31 vs 72 vs 3Period 2 2 vs 43 vs 64 vs 70 vs 20 vs 1Period 1 Week 7Week 4Week 3Week 2Week 1 Round Robin Tournament Schedule

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation6 Matrix Models are Prevalent Commonly used to implement sets, subsets, partitions, relations, functions, permutations… Of 31 problems in CSPlib ( 27 have natural matrix models, most already published and arguably the most natural models. Many have row and column symmetries.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation7 Overview I Transforming a CSP instance. II Refining a problem formulation. III Matrix Models – Symmetry breaking & channelling IV Conclusions

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation8 Part I: Transforming a CSP Instance

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation9 CGRASS A system that automatically transforms a CSP instance to one that can be solved more efficiently Transformations: –Introduce implied constraints. –Replace constraints with more powerful ones. –Remove redundant constraints. –Introduce new variables. –Introduce symmetry-breaking constraints.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation10 Performance of CGRASS Given the naïve model of an instance of the Golomb Ruler Problem, CGRASS can automatically transform it to an efficient CSP formulation (roughly that of Smith, Stergiou & Walsh, 1999). As Golomb Ruler instances grow in size the time it takes CGRASS to transform the instance grows rapidly.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation11 What Else? Transform problems, not problem instances However, transforming the Golomb Ruler problem (formulated as a CSP) requires sophisticated mathematical reasoning. But transforming an abstract, set-based formulation (sets, subsets, cardinality…) of the Golomb ruler problem is much simpler !

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation12 The Moral of the Story Transformations must be made at the appropriate level of abstraction. (Some may be best at level of CSP instances.) Refinement rules as well as transformation rules are needed.

Part II: Refining a Problem Formulation

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation14 Two Steps to Automatic Refinement F Competency: Formulate formal rules for generating alternative refinements. The goal is to generate a set of models that include those generated by experts (perhaps some that are better!). Following on from F [Hnich, forthcoming]. Performance: Generate only the good ones.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation15 SONET Fibre-Optic Communications Problem In a communications network there are client nodes and it is known which pairs of nodes must communicate. Traffic can only be routed between pairs of distinct nodes if they are installed on the same SONET ring. Each node may be installed on multiple rings with each installation requiring a dedicated ADM. There are a fixed number of rings available, and each can service a maximum number of ADMs. Configure the network so as to minimize the number of ADMs used.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation16 An Instance of the SONET Problem Three rings and five nodes (n1, n2, n3, n4, n5) Communication between n1 & n3, n1 & n4, n2 & n3, n2 & n4, n3 & n5 Each ring holds maximum of four nodes. n2 n1 n3 n4 n3 n5

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation17 Abstract Mathematical Formulation Given: c: ring capacity, R: set of rings, N: set of nodes, D: set of unordered pairs of nodes that communicate Find: rings-nodes: R  N Such that: 1)| rings-nodes| is minimised 2)|rings-nodes(r,_)|  c, for all r in R 3)rings-nodes(_,n)  rings-nodes(_,n)   for all {n,n’} in D

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation18 Refinement: Alternative Nodes Rings rings-nodes  r,n   rings-nodes iff rings-nodes[r,n] = 1

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation19 Refinement: Alternative 1 1.| rings-nodes| is minimised Minimise(  r  R, n  N rings-nodes[r,n] ) 2.|rings-nodes(r,_)|  c, for all r  R (  n  N rings-nodes[r,n])  c, for all r  R 3.(rings-nodes(_,n)  rings-nodes(_,n)   for all {n,n}  D  r  R (rings-nodes[r,n]  rings-nodes[r,n])  0 for all {n,n,}  D

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation20 Refinement Creates Symmetry R and N are sets. They are refined to indices of a matrix, which are totally ordered. Unless some constraint differentiates the elements of a set, our refinement has distinguished indistinguishable objects; it has introduced symmetry.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation21 Refinement Should Break Symmetry Elements of R are indistinguishable. n1 and n2 are indistinguishable. Other elements of N are distinguished by D. In rings-nodes, two rows are indistinguishable and all columns are indistinguishable. Need to break row and column symmetries.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation22 Refinement: Alternative 2 Set of nodes NodesOnRing Rings  r,n   rings-nodes iff N  NodesOnRing[r]

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation23 Refinement: Alternative 2 Constraints (1) and (3) can be translated to this representation. Constraint (2) cannot be expressed directly with this representation. So use 2D matrix from first alternative and channel.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation24 Summary of SONET Reformulation Refinement paper presents five different refinements, including that of Smith [ ERCIM 2002]. All produced somewhat systematically by hand. The first uses a single representation, others channel among two or three representations. Three complex implied constraints have been added to the abstract formulation and have been refined to each concrete formulation.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation25 Refinement Rules 3.rings-nodes(_,n)  rings-nodes(_,n)   for all {n,n}  D  r  R (rings-nodes[r,n]  rings-nodes[r,n])  0 for all {n,n}  D

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation26 Refinement Rules Atomic :  (R) = i 1, …, i n . R m [i 1, …, i n ] Intersect :  (   ’   i 1, …, i n .  (  i 1, …, i n  )  (  ’  i 1, …, i n  Cardinality :  (|   i 1, …, i n   X 1  …  X n  (  i 1, …, i n 

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation27 Example of Refinement Refine |A  B|, where A, B are relations over X 1  X 2.  ( |   |  Apply cardinality rule    i 1, i 2   X 1  X 2  (   i 1, i 2  Apply intersect rule and lambda reduction    i 1, i 2   X 1  X 2  (  i 1, i 2  (  i 1, i 2  Apply atomic rule and lambda reduction    i 1, i 2   X 1  X 2 A m [i 1, i 2 ]  B m [i 1, i 2 ]

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation28 Automatic Generation of Channelling Constraints  r,n  in rings-nodes iff rings-nodes[r,n] = 1  r,n  in rings-nodes iff n  NodesOnRing[r] rings-nodes[r,n] = 1 iff n  NodesOnRing[r]

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation29 Part III: Matrix Models -- Symmetry Breaking and Channelling

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation30 Index Symmetry in One Dimension Indistinguishable Rows ABC DEF GHI [A B C]  lex [D E F]  lex [G H I]

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation31 Index Symmetry in Multiple Dimensions Remove row and column symmetry by adding constraints that rows and cols are lex ordered. Are these always consistent? (yes) Does this remove all symmetry? (only sometimes) Breaking Row and Column Symmetries in Matrix Models P. Flener, A.M. Frisch, B. Hnich, Z. Kiziltan, I. Miguel, J. Pearson, T. Walsh

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation32 Enforcing Lex Ordering Constraint How efficiently can one maintain GAC on a lex ordering constraint? (linear in size of vectors) Global Constraints for Lexicographic Orderings A.M. Frisch, B. Hnich, Z. Kiziltan, I. Miguel, T. Walsh

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation33 Channelling Many matrix models involve channelling Matrix paper identifies four types of channelling between matrices and discusses efficient implementation.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation34 Part IV: Conclusion

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation35 Hypothesis It is possible to build a compiler that can take a problem specified in an abstract, high-level language and refine and transform it into a constraint program that can be efficiently executed.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation36 Evidence in Support of Hypothesis CGRASS can take a CSP instance and perform certain simple transformations to make it easier to solve. Our formal rules for refining an abstractly-specified problem into an executable specification. Hnich’s compiler refines function variables. The executable specifications that are generated often contain matrices of decision variables. We are developing new technology for solving such matrix models (symmetry breaking, channelling and other patterns).

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation37 Hypotheses Without reasoning at a high level of abstraction, automatically transforming a constraint program to an efficient one is unreasonably difficult.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation38 Evidence in Support of Hypotheses We have observed that the complexity of a transformation varies greatly with the level of abstraction of a problem specification.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation39 Major Open Questions Can complex transformations that increase efficiency be automated? Can the choice among alternative refinements be automated? If we succeed in building such a compiler would the reach of constraint programming be extended?

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation40 The End

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation41 Exploiting Common Patterns Published in journals with analyses of properties. Catalogued in textbooks with guidance on selection. Implemented in program libraries. Supported by high-level languages. Exploited by intelligent compilers. This would bring constraint technology to BSc’s.

CP'2002: 8 Sept 2002Extending the Reach of Constraint Technology through Reformulation42 Example of Refinement Refine |A  B|, where A, B are relations over X 1  X 2.  ( |   |     i 1, i 2   X 1  X 2  (   i 1, i 2     i 1, i 2   X 1  X 2  i 1, i 2 .(  (  i 1, i 2  (  i 1, i 2  i 1, i 2     i 1, i 2   X 1  X 2  (  i 1, i 2  (  i 1, i 2     i 1, i 2   X 1  X 2 i 1, i 2 .(A m [i 1, i 2 ]) (  i 1, i 2  )  i 1, i 2 .(B m [i 1, i 2 ]) (  i 1, i 2  )    i 1, i 2   X 1  X 2 A m [i 1, i 2 ]  B m [i 1, i 2 ]