Rapid Prototyping of a Structured Domain through Indexical Compilation

Size: px
Start display at page:

Download "Rapid Prototyping of a Structured Domain through Indexical Compilation"

Transcription

1 Rapid Prototyping of a Structured Domain through Indexical Compilation Joseph D. Scott Uppsala University Abstract. We report on our experience with rapid prototyping for a new structured domain of bounded-length strings, automatically generating propagator source code from an extended indexical specification. 1 Introduction Many problems can be naturally modeled using structured objects, such as sets, multisets, graphs, strings, etc. Just as constraints afford a generic means of modeling common combinatorial subproblems, structured domains [2] provide for higher-level modeling of variable relations. For example, many problems are naturally modeled in terms of finite sets, which might be modeled ad hoc; instead, constraint solvers provide decision variables and constraints for sets [3, 5]. Developing a new structured domain includes writing all new propagator implementations. Implementing a propagator that is both correct and efficient is time-consuming; the relative complexity of structured domains exacerbates this issue. One way to ease the development process is to leverage the power of existing finite domain solvers, defining a domain variable as a composition of existing finite domain decision variables. For example, a graph decision variable [1] may be viewed as a combination of a set of nodes and a set of edges. Prototyping of a new domain may be accomplished by writing propagators which replace each instance of a variable in the new domain with a collection of decision variables; indeed, this appears to have been exactly the prototyping process in [1]. To further speed prototyping, [4] compiles propagators described in an extended indexical language into implementations for targeted constraint solvers. An indexical [7] is an expression of the form x σ restricting the domain of the decision variable x to the intersection of its current domain and the interval σ. [4] extends indexicals to include arrays and n-ary operators over them. This indexical language is used to write a checker for a constraint; a description for a propagator may then be automatically generated. Several solver-specific backends allow for compilation of this propagator into source code, which can be used as a prototype propagator, and possibly serve as a basis for further refinements. 2 Propagation for Bounded-Length Strings We consider a domain for strings of bounded, but not fixed, length. Specifically, we represent strings as a concatenation of bounded-length substrings: a prefix

2 substring, which starts at the beginning of the string, and a suffix substring, which starts at the end of the string. The suffix substring is the reversal of the second part of the string itself; this allows for inference to be made about both ends of the string, even when the length is unknown. The merits of this method are discussed elsewhere [6]; here, we consider only propagation on the domain. Such a bounded-length string variable may be represented as two arrays of finite domain variables, one to hold the characters of the prefix substring, and the other for the suffix substring. Since neither of these substrings has a fixed length, we include the length of these substrings as two integer variables; the arrays are large enough to hold the largest allowed substrings, and the length of the actual substrings is determined by the domains of the length variables. Also include is an integer for the total length of the string, which equals the sum of the substring lengths. We now describe a propagator for a constraint of string equality over this domain, using the extended indexical language of [4]. Listing 1. Indexical language description of propagator for string equality. 1 def STR_Equal(vint[] Px, vint Pnx, vint[] Sx, vint Snx, vint Lx, 2 vint[] Py, vint Pny, vint[] Sy, vint Sny, vint Ly){ 3 checker{ 4 val(lx) == val(ly) and val(lx) == (val(pnx) + val(snx)) 5 and val(ly) == (val(pny) + val(sny)) 6 and check(str_eqregion_u(px,pnx,py,pny,0)) 7 and check(str_eqregion_u(sx,snx,sy,sny,0)) 8 and check(str_eqregion_b(px,pnx,sy,sny,lx)) 9 and check(str_eqregion_b(sx,snx,py,pny,lx)) 10 } 11 } Listing 1 describes the constraint STR Equal, which states that a pair of strings have equal lengths, and the same characters at each position. Each string is represented by five variables: arrays for the prefix and suffix substrings (Px,Sx), integers for the lengths of the substrings (Pnx, Pny) and the length of the string (Lx). Lines 6 to 9 describe the requirement that the characters are equal in terms of two more primitive constraints, which ensure character-bycharacter equality over slices of a pair of substrings. Each of these constraints takes two substring arrays and their corresponding lengths, plus a variable Offset. STR EqRegion U ensures that the beginnings of the two prefixes (line 6) and of the two suffixes (line 7) are equal. Equality of string length does not imply equal length for the component substrings, however; if the prefix substring lengths are different, then the end of one of the prefix substrings might line up with the end of the suffix substring of the other string. These latter cases are handled by STR EqRegion B (lines 8 and 9); the B refers to the fact that a prefixsuffix pair is bidirectional, as opposed to unidirectional prefix-prefix pairs. The degree of overlap depends on the lengths of both the substrings and the strings; the value of Lx for the Offset variable specifies that the first character of the two substrings occur at a distance equal to the total length of the string.

3 Listing 2. Description of propagator for unidirectional regions. 1 def STR_EqRegion_U(vint[] X, vint Xn, vint[] Y, vint Yn, vint Offset){ 2 checker{ 3 and(i in (max({min(rng(x)),(min(rng(y)) + val(offset))}).. 4 min({((min(rng(x)) + val(xn)) + -1), 5 (((min(rng(y)) + val(offset)) + val(yn)) + -1)}))) 6 (val(x[i]) == val(y[(i + -val(offset))])) 7 } 8 propagator(gen)::dr{ 9 forall(i in (max({min(rng(x)),(min(rng(y)) + max(offset))}).. 10 min({((min(rng(x)) + min(xn)) + -1), 11 (((min(rng(y)) + min(offset)) + min(yn)) + -1)}))){ 12 X[i] in union(ii15 in ({i} + -dom(offset)))(dom(y[ii15])); 13 Y[(i + -val(offset))] in dom(x[i]); 14 Offset in (-rng(y) + {i}); 15 forall(ii8 in rng(y)){ 16 (dom(y[ii8]) inter dom(x[i])) == emptyset -> 17 Offset in (U minus {(-ii8 + i)}); 18 } 19 } 20 } 21 } The checker for STR EqRegion U (Listing 2) is an n-ary and statement. The bound variable i takes the indices of characters in X (given by the expression rng(x)) which line up with some character in Y, requiring the values of these characters to be equal. As described above, the Offset variable determines the distance between the first characters of the two substrings, which is always 0 for STR Equal. Offset is included for the sake of generality, as it is easy to imagine constraints in which two strings do not start at the same position. (The checker for STR EqRegion B is similar, but omitted for reasons of space.) From the provided checkers, the indexical compiler generates propagators. The generated propagator for STR EqRegion U (beginning at line 8 of Listing 2) is quite similar to propagation for the Element constraint, with the difference that there are two arrays instead of one. The generated propagator is correct, but can be improved with minor modification. The statement at line 14 is unnecessary. Furthermore, lines 12 and 13 should be similar: each X[i] is compared to the union of all the array elements in Y which it could be aligned with, and checking for Y should be symmetric. Instead, characters of Y are only compared to those in X once the Offset is fixed, a much weaker condition which is easily corrected manually. Lines disallow any offset which results in the alignment of a character form X and Y with disjoint domains. An additional run of the indexical compiler generates a propagator for STR Equal (Listing 3). In the generated code, the check statements in the STR Equal specification are replaced with the corresponding code from the primitive propagators, then simplified when possible; for example, on lines 3-8, the Offset between Px and Py is 0, so STR EqRegion U simplifies to X[i] == Y[i] for a range of i.

4 Listing 3. Indexical-based propagation for string STR Equal constraint. 1 propagator(gen)::dr{ 2 // restrictions on substring length omitted 3 forall(i in (max({min(rng(px)),min(rng(py))}).. 4 min({((min(rng(px)) + min(pnx)) + -1), 5 ((min(rng(py)) + min(pny)) + -1)}))){ 6 Px[i] in dom(py[i]); 7 Py[i] in dom(px[i]); 8 } 9 // symmetric loop for Sx,Sy omitted 10 forall(i in (max({min(rng(px)), 11 ((min(rng(px)) + max(lx)) + -min(sny))}).. 12 min({((min(rng(px)) + min(pnx)) + -1), 13 ((min(rng(px)) + min(lx)) + -1)}))){ 14 Px[i] in union(ii47 in (dom(lx) + {(-i + -1)}))(dom(Sy[ii47])); 15 Sy[((val(Lx) + -i) + -1)] in dom(px[i]); 16 Lx in (rng(sy) + {(i + 1)}); 17 forall(ii40 in rng(sy)){ 18 (dom(sy[ii40]) inter dom(px[i])) == emptyset -> 19 Lx in (U minus {((ii40 + i) + 1)}); 20 } 21 } 3 Preliminary Results and Future Work Preliminary results are quite promising. The method outlined here was used to prototype propagators of string equality, reversal, concatenation, and substring inclusion, all based on the pair of primitive constraints described here. From an indexical language specification of around 200 lines we generated propagators in Gecode (approximately 3000 lines of code). Generating the prototype in a highlevel language proved very useful in terms of catching logical errors. Moving all indexing calculations into the two primitive constraints was especially useful; these two, relatively short propagators are easily debugged, yielding reliable inlined code that occurs at roughly two dozen positions in the propagators. Current work is focused on refining the generated propagators in terms of efficiency. For example, in Listing 3 the union operation at line 14 is, of course, quite expensive. However, the range of elements in the union changes only slightly on each iteration of the loop at line 10, and can be more efficiently implemented. We also seek to add constraints for language membership and intersection. Future work includes extending the indexical language to directly support structured variables, possibly using an object model to separate a variable s implementation from its interface. Acknowledgements This work supported by grant of the Swedish Research Council (VR). The author would like to thank J-N. Monette for his many helpful comments, and for his frequent coding and debugging support.

5 References 1. Grégoire Dooms, Yves Deville, and Pierre Dupont. CP(Graph): Introducing a Graph Computation Domain in Constraint Programming. In: CP Ed. by Peter van Beek. Vol LNCS. Springer, 2005, pp Carmen Gervet. Constraints over Structured Domains. In: Handbook of Constraint Programming. Ed. by Francesca Rossi, Peter van Beek, and Toby Walsh. Amsterdam: Elsevier, Chap. 17, pp Carmen Gervet. New structures of symbolic constraint objects: sets and graphs. In: Workshop on Constraint Logic Programming (WCLP 93). Extended Abstract Jean-Noël Monette, Pierre Flener, and Justin Pearson. Towards Solver- Independent Propagators. In: CP Ed. by Michela Milano. Vol LNCS. Springer, Jean-François Puget. Set Constraints and Cardinality Operator: Application to Symmetrical Combinatorial Problems. In: Workshop on Constraint Logic Programming (WCLP 93) Joseph D. Scott, Pierre Flener, and Justin Pearson. Bounded Strings for Constraint Programming. In: Tools with Artificial Intelligence (ICTAI 2013). Forthcoming. IEEE, Pascal Van Hentenryck, Vijay A. Saraswat, and Yves Deville. Design, Implementation, and Evaluation of the Constraint Language cc(fd). In: Constraint Programming. Basics and Trends. Ed. by Andreas Podelski. Vol LNCS. Springer, 1995, pp

Bound Consistency for Binary Length-Lex Set Constraints

Bound Consistency for Binary Length-Lex Set Constraints Bound Consistency for Binary Length-Lex Set Constraints Pascal Van Hentenryck and Justin Yip Brown University, Box 1910 Carmen Gervet Boston University, Providence, RI 02912 808 Commonwealth Av. Boston,

More information

Extended Indexicals: User Manual. Jean-Noël Monette

Extended Indexicals: User Manual. Jean-Noël Monette Extended Indexicals: User Manual Jean-Noël Monette Version 1, 4th October 2012 Chapter 1 Introduction This document describes how to use the compiler for extended indexicals. Indexicals have been introduced

More information

Constraint Programming. Marco Kuhlmann & Guido Tack Lecture 1

Constraint Programming. Marco Kuhlmann & Guido Tack Lecture 1 Constraint Programming Marco Kuhlmann & Guido Tack Lecture 1 Welcome! Where am I? Constraint Programming advanced course in Computer Science 6 credit points lecture (2 hours) + lab (2 hours) http://www.ps.uni-sb.de/courses/cp-ss07/

More information

Propagating separable equalities in an MDD store

Propagating separable equalities in an MDD store Propagating separable equalities in an MDD store T. Hadzic 1, J. N. Hooker 2, and P. Tiedemann 3 1 University College Cork t.hadzic@4c.ucc.ie 2 Carnegie Mellon University john@hooker.tepper.cmu.edu 3 IT

More information

Constraint Solving on Bounded String Variables

Constraint Solving on Bounded String Variables Constraint Solving on Bounded String Variables Joseph D. Scott, Pierre Flener, and Justin Pearson Uppsala University, Uppsala, Sweden first.last@it.uu.se Abstract Constraints on strings of unknown length

More information

Two Set-Constraints for Modeling and Efficiency

Two Set-Constraints for Modeling and Efficiency Two Set-Constraints for Modeling and Efficiency Willem-Jan van Hoeve 1 and Ashish Sabharwal 2 1 Tepper School of Business, Carnegie Mellon University 5000 Forbes Avenue, Pittsburgh, PA 15213, U.S.A. vanhoeve@andrew.cmu.edu

More information

Structured Variables

Structured Variables DM841 Discrete Optimization Part II Lecture 13 Structured Variables Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Resume and Outlook Modeling in CP Global

More information

A Global Constraint for Bin-Packing with Precedences: Application to the Assembly Line Balancing Problem.

A Global Constraint for Bin-Packing with Precedences: Application to the Assembly Line Balancing Problem. Proceedings of the Twenty-Third AAAI Conference on Artificial Intelligence (2008) A Global Constraint for Bin-Packing with Precedences: Application to the Assembly Line Balancing Problem. Pierre Schaus

More information

CSC Discrete Math I, Spring Sets

CSC Discrete Math I, Spring Sets CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its

More information

Round 4: Constraint Satisfaction Problems (CSP)

Round 4: Constraint Satisfaction Problems (CSP) Round 4: Constraint Satisfaction Problems (CSP) Tommi Junttila Aalto University School of Science Department of Computer Science CS-E3220 Declarative Programming Spring 2018 Tommi Junttila (Aalto University)

More information

THE CONSTRAINT PROGRAMMER S TOOLBOX. Christian Schulte, SCALE, KTH & SICS

THE CONSTRAINT PROGRAMMER S TOOLBOX. Christian Schulte, SCALE, KTH & SICS THE CONSTRAINT PROGRAMMER S TOOLBOX Christian Schulte, SCALE, KTH & SICS Constraint Programming 2 What is constraint programming? Sudoku is constraint programming 3 Sudoku...is constraint programming!

More information

A Hybrid Algorithm for Compiling Equality. Constraints and its Implementation. Department of Computer and Information Science

A Hybrid Algorithm for Compiling Equality. Constraints and its Implementation. Department of Computer and Information Science URL: http://www.elsevier.nl/locate/entcs/volume30.html 9 pages A Hybrid Algorithm for Compiling Equality Constraints and its Implementation Neng-Fa Zhou Department of Computer and Information Science Brooklyn

More information

Towards Solver-Independent Propagators

Towards Solver-Independent Propagators Towards Solver-Independent Propagators Jean-Noël Monette, Pierre Flener, and Justin Pearson Uppsala University, Department of Information Technology, Uppsala, Sweden {jean-noel.monette,pierre.flener,justin.pearson}@it.uu.se

More information

The All Different and Global Cardinality Constraints on Set, Multiset and Tuple Variables

The All Different and Global Cardinality Constraints on Set, Multiset and Tuple Variables The All Different and Global Cardinality Constraints on Set, Multiset and Tuple Variables Claude-Guy Quimper 1 and Toby Walsh 2 1 School of Computer Science, University of Waterloo, Canada, cquimper@math.uwaterloo.ca

More information

Model Restarts for Structural Symmetry Breaking

Model Restarts for Structural Symmetry Breaking Model Restarts for Structural Symmetry Breaking Daniel Heller, Aurojit Panda, Meinolf Sellmann, and Justin Yip Brown University, Department of Computer Science 5 Waterman Street, P.O. Box 9, Providence,

More information

Solving XCSP problems by using Gecode

Solving XCSP problems by using Gecode Solving XCSP problems by using Gecode Massimo Morara, Jacopo Mauro, and Maurizio Gabbrielli University of Bologna. morara jmauro gabbri@cs.unibo.it Abstract. Gecode is one of the most efficient libraries

More information

A Solver-Independent Platform for Modeling Constrained Objects Involving Discrete and Continuous Domains

A Solver-Independent Platform for Modeling Constrained Objects Involving Discrete and Continuous Domains A Solver-Independent Platform for Modeling Constrained Objects Involving Discrete and Continuous Domains Ricardo Soto 1,2 and Laurent Granvilliers 1 1 LINA, CNRS, Université de Nantes, France 2 Escuela

More information

Search Strategy Simulation in Constraint Booleanization

Search Strategy Simulation in Constraint Booleanization Search Strategy Simulation in Constraint Booleanization Jinbo Huang Optimisation Research Group, NICTA and Research School of Computer Science, Australian National University Abstract Within the recently

More information

PAPER Constructing the Suffix Tree of a Tree with a Large Alphabet

PAPER Constructing the Suffix Tree of a Tree with a Large Alphabet IEICE TRANS. FUNDAMENTALS, VOL.E8??, NO. JANUARY 999 PAPER Constructing the Suffix Tree of a Tree with a Large Alphabet Tetsuo SHIBUYA, SUMMARY The problem of constructing the suffix tree of a tree is

More information

Length-Lex Open Constraints

Length-Lex Open Constraints Carnegie Mellon University Research Showcase @ CMU Tepper School of Business 9-2007 Length-Lex Open Constraints Gregoire Dooms Brown University Luc Mercier Brown University Pascal van Hentenryck Brown

More information

Indexing Variable Length Substrings for Exact and Approximate Matching

Indexing Variable Length Substrings for Exact and Approximate Matching Indexing Variable Length Substrings for Exact and Approximate Matching Gonzalo Navarro 1, and Leena Salmela 2 1 Department of Computer Science, University of Chile gnavarro@dcc.uchile.cl 2 Department of

More information

PROPAGATION-BASED CONSTRAINT SOLVER IN IMS Igor Ol. Blynov Kherson State University

PROPAGATION-BASED CONSTRAINT SOLVER IN IMS Igor Ol. Blynov Kherson State University Інформаційні технології в освіті UDC 0044:37 PROPAGATION-BASED CONSTRAINT SOLVER IN IMS Igor Ol Blynov Kherson State University Abstracts Article compiling the main ideas of creating propagation-based

More information

Dual-Based Approximation Algorithms for Cut-Based Network Connectivity Problems

Dual-Based Approximation Algorithms for Cut-Based Network Connectivity Problems Dual-Based Approximation Algorithms for Cut-Based Network Connectivity Problems Benjamin Grimmer bdg79@cornell.edu arxiv:1508.05567v2 [cs.ds] 20 Jul 2017 Abstract We consider a variety of NP-Complete network

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

Handbook of Constraint Programming

Handbook of Constraint Programming Handbook of Constraint Programming Francesca Rossi, Peter van Beek, Toby Walsh Elsevier Contents Contents v I First part 1 1 Modelling 3 Barbara M. Smith 1.1 Preliminaries... 4 1.2 Representing a Problem.....

More information

On Constraint Problems with Incomplete or Erroneous Data

On Constraint Problems with Incomplete or Erroneous Data On Constraint Problems with Incomplete or Erroneous Data Neil Yorke-Smith and Carmen Gervet IC Parc, Imperial College, London, SW7 2AZ, U.K. nys,cg6 @icparc.ic.ac.uk Abstract. Real-world constraint problems

More information

THE CONSTRAINT PROGRAMMER S TOOLBOX. Christian Schulte, SCALE, KTH & SICS

THE CONSTRAINT PROGRAMMER S TOOLBOX. Christian Schulte, SCALE, KTH & SICS THE CONSTRAINT PROGRAMMER S TOOLBOX Christian Schulte, SCALE, KTH & SICS Constraint Programming 2 What is constraint programming? Sudoku is constraint programming 3 Sudoku...is constraint programming!

More information

Constraint Modeling. with MiniZinc. Jakub Bulín. Department of CU Prague

Constraint Modeling. with MiniZinc. Jakub Bulín. Department of CU Prague Constraint Modeling with MiniZinc Jakub Bulín Department of Algebra @ CU Prague Table of contents 1. Intro & the theory part 2. An overview of MinZinc 3. Examples of constraint models 4. Learn more 1 In

More information

Principles of Optimization Techniques to Combinatorial Optimization Problems and Decomposition [1]

Principles of Optimization Techniques to Combinatorial Optimization Problems and Decomposition [1] International Journal of scientific research and management (IJSRM) Volume 3 Issue 4 Pages 2582-2588 2015 \ Website: www.ijsrm.in ISSN (e): 2321-3418 Principles of Optimization Techniques to Combinatorial

More information

Hybrid Constraint Programming and Metaheuristic methods for Large Scale Optimization Problems

Hybrid Constraint Programming and Metaheuristic methods for Large Scale Optimization Problems Hybrid Constraint Programming and Metaheuristic methods for Large Scale Optimization Problems Fabio Parisini Tutor: Paola Mello Co-tutor: Michela Milano Final seminars of the XXIII cycle of the doctorate

More information

3 No-Wait Job Shops with Variable Processing Times

3 No-Wait Job Shops with Variable Processing Times 3 No-Wait Job Shops with Variable Processing Times In this chapter we assume that, on top of the classical no-wait job shop setting, we are given a set of processing times for each operation. We may select

More information

Protocol Log Analysis with Constraint Programming (Work in progress)

Protocol Log Analysis with Constraint Programming (Work in progress) Protocol Log Analysis with Constraint Programming (Work in progress) Mats Carlsson 1, Olga Grinchtein 2 and Justin Pearson 3 1 SICS, Stockholm, Sweden Mats.Carlsson@sics.se 2 Ericsson AB, Stockholm, Sweden

More information

Table 1 below illustrates the construction for the case of 11 integers selected from 20.

Table 1 below illustrates the construction for the case of 11 integers selected from 20. Q: a) From the first 200 natural numbers 101 of them are arbitrarily chosen. Prove that among the numbers chosen there exists a pair such that one divides the other. b) Prove that if 100 numbers are chosen

More information

Computation with No Memory, and Rearrangeable Multicast Networks

Computation with No Memory, and Rearrangeable Multicast Networks Discrete Mathematics and Theoretical Computer Science DMTCS vol. 16:1, 2014, 121 142 Computation with No Memory, and Rearrangeable Multicast Networks Serge Burckel 1 Emeric Gioan 2 Emmanuel Thomé 3 1 ERMIT,

More information

A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs

A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs Nicolas Lichiardopol Attila Pór Jean-Sébastien Sereni Abstract In 1981, Bermond and Thomassen conjectured that every digraph

More information

EDAA40 At home exercises 1

EDAA40 At home exercises 1 EDAA40 At home exercises 1 1. Given, with as always the natural numbers starting at 1, let us define the following sets (with iff ): Give the number of elements in these sets as follows: 1. 23 2. 6 3.

More information

Global Filtering for the Disjointness Constraint on Fixed Cardinality Sets

Global Filtering for the Disjointness Constraint on Fixed Cardinality Sets TECHNICAL REPORT IC-PARC-04-02 Global Filtering for the Disjointness Constraint on Fixed Cardinality Sets Andrew Sadler and Carmen Gervet IC-PARC Centre for Planning and Resource Control William Penney

More information

The Complexity of Global Constraints

The Complexity of Global Constraints The Complexity of Global Constraints Christian Bessiere LIRMM-CNRS Montpellier, France email: bessiere@lirmm.fr Emmanuel Hebrard and Brahim Hnich and Toby Walsh Cork Constraint Computation Centre University

More information

Towards Automatic Dominance Breaking for Constraint Optimization Problems

Towards Automatic Dominance Breaking for Constraint Optimization Problems Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence (IJCAI 2015) Towards Automatic Dominance Breaking for Constraint Optimization Problems Christopher Mears and Maria

More information

Distance Sequences in Locally Infinite Vertex-Transitive Digraphs

Distance Sequences in Locally Infinite Vertex-Transitive Digraphs Distance Sequences in Locally Infinite Vertex-Transitive Digraphs Wesley Pegden July 7, 2004 Abstract We prove that the out-distance sequence {f + (k)} of a vertex-transitive digraph of finite or infinite

More information

Hybrid Set Domains to Strengthen Constraint Propagation and Reduce Symmetries

Hybrid Set Domains to Strengthen Constraint Propagation and Reduce Symmetries Hybrid Set Domains to Strengthen Constraint Propagation and Reduce Symmetries Andrew Sadler and Carmen Gervet IC Parc, Imperial College London, SW7 2AZ, U.K. {ajs2,cg6}@icparc.ic.ac.uk Abstract. In CP

More information

Interleaving Schemes on Circulant Graphs with Two Offsets

Interleaving Schemes on Circulant Graphs with Two Offsets Interleaving Schemes on Circulant raphs with Two Offsets Aleksandrs Slivkins Department of Computer Science Cornell University Ithaca, NY 14853 slivkins@cs.cornell.edu Jehoshua Bruck Department of Electrical

More information

Towards Implementing Finite Model Reasoning in Description Logics

Towards Implementing Finite Model Reasoning in Description Logics In Proc. of the 2004 Int. Workshop on Description Logics (DL 2004) Towards Implementing Finite Model Reasoning in Description Logics Marco Cadoli 1, Diego Calvanese 2, Giuseppe De Giacomo 1 1 Dipartimento

More information

Constraint Propagation: The Heart of Constraint Programming

Constraint Propagation: The Heart of Constraint Programming Constraint Propagation: The Heart of Constraint Programming Zeynep KIZILTAN Department of Computer Science University of Bologna Email: zeynep@cs.unibo.it URL: http://zeynep.web.cs.unibo.it/ What is it

More information

A Fast Arc Consistency Algorithm for n-ary Constraints

A Fast Arc Consistency Algorithm for n-ary Constraints A Fast Arc Consistency Algorithm for n-ary Constraints Olivier Lhomme 1 and Jean-Charles Régin 2 1 ILOG, 1681, route des Dolines, 06560 Valbonne, FRANCE 2 Computing and Information Science, Cornell University,

More information

An Efficient Algorithm for Computing Non-overlapping Inversion and Transposition Distance

An Efficient Algorithm for Computing Non-overlapping Inversion and Transposition Distance An Efficient Algorithm for Computing Non-overlapping Inversion and Transposition Distance Toan Thang Ta, Cheng-Yao Lin and Chin Lung Lu Department of Computer Science National Tsing Hua University, Hsinchu

More information

CP(Graph): Introducing a Graph Computation Domain in Constraint Programming

CP(Graph): Introducing a Graph Computation Domain in Constraint Programming CP(Graph): Introducing a Graph Computation Domain in Constraint Programming Gregoire Dooms, Yves Deville, Pierre Dupont Department of Computing Science and Engineering Université catholique de Louvain

More information

Unifying and extending hybrid tractable classes of CSPs

Unifying and extending hybrid tractable classes of CSPs Journal of Experimental & Theoretical Artificial Intelligence Vol. 00, No. 00, Month-Month 200x, 1 16 Unifying and extending hybrid tractable classes of CSPs Wady Naanaa Faculty of sciences, University

More information

A Propagator Design Framework for Constraints over Sequences

A Propagator Design Framework for Constraints over Sequences A Propagator Design Framework for Constraints over Sequences Jean-Noël Monette and Pierre Flener and Justin Pearson Uppsala University, Dept of Information Technology 751 05 Uppsala, Sweden FirstName.LastName@it.uu.se

More information

c) the set of students at your school who either are sophomores or are taking discrete mathematics

c) the set of students at your school who either are sophomores or are taking discrete mathematics Exercises Exercises Page 136 1. Let A be the set of students who live within one mile of school and let B be the set of students who walk to classes. Describe the students in each of these sets. a) A B

More information

View-based Propagator Derivation

View-based Propagator Derivation View-based Propagator Derivation Christian Schulte SCALE, KTH & SICS, Sweden joint work with: Guido Tack NICTA & Monash University, Australia Based on:. Christian Schulte, Guido Tack. Constraints 18(1),

More information

DVA337 HT17 - LECTURE 4. Languages and regular expressions

DVA337 HT17 - LECTURE 4. Languages and regular expressions DVA337 HT17 - LECTURE 4 Languages and regular expressions 1 SO FAR 2 TODAY Formal definition of languages in terms of strings Operations on strings and languages Definition of regular expressions Meaning

More information

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2 2.2 Set Operations 127 2.2 Set Operations Introduction Two, or more, sets can be combined in many different ways. For instance, starting with the set of mathematics majors at your school and the set of

More information

Parallel consistency in constraint programming

Parallel consistency in constraint programming Parallel consistency in constraint programming Rolf, Carl Christian; Kuchcinski, Krzysztof Accepted/In press: 9-- Link to publication Citation for published version (APA): Rolf, C. C., & Kuchcinski, K.

More information

Disjoint, Partition and Intersection Constraints for Set and Multiset Variables

Disjoint, Partition and Intersection Constraints for Set and Multiset Variables Disjoint, Partition and Intersection Constraints for Set and Multiset Variables Christian Bessiere ½, Emmanuel Hebrard ¾, Brahim Hnich ¾, and Toby Walsh ¾ ¾ ½ LIRMM, Montpelier, France. Ö Ð ÖÑÑ Ö Cork

More information

Constraint Solving CLFD: Architecture Constraint Propagation Search Interface & Results Conclusion CLFD

Constraint Solving CLFD: Architecture Constraint Propagation Search Interface & Results Conclusion CLFD Constraint Solving : Architecture Constraint Propagation Search Interface & Results Conclusion A Finite Domain Constraint Solver in Common Lisp 20.06.2005 Constraint Solving : Architecture Constraint Propagation

More information

What is Set? Set Theory. Notation. Venn Diagram

What is Set? Set Theory. Notation. Venn Diagram What is Set? Set Theory Peter Lo Set is any well-defined list, collection, or class of objects. The objects in set can be anything These objects are called the Elements or Members of the set. CS218 Peter

More information

Improved upper and lower bounds on the feedback vertex numbers of grids and butterflies

Improved upper and lower bounds on the feedback vertex numbers of grids and butterflies Improved upper and lower bounds on the feedback vertex numbers of grids and butterflies Florent R. Madelaine and Iain A. Stewart Department of Computer Science, Durham University, Science Labs, South Road,

More information

Finite Domain Bounds Consistency Revisited

Finite Domain Bounds Consistency Revisited Finite Domain Bounds Consistency Revisited C.W. Choi 1, W. Harvey 2, J.H.M. Lee 1, and P.J. Stuckey 3 1 Department of Computer Science and Engineering, The Chinese University of Hong Kong, Shatin, N.T.,

More information

Learning techniques for Automatic Algorithm Portfolio Selection

Learning techniques for Automatic Algorithm Portfolio Selection Learning techniques for Automatic Algorithm Portfolio Selection Alessio Guerri and Michela Milano 1 Abstract. The purpose of this paper is to show that a well known machine learning technique based on

More information

Logic, Programming and Prolog (Supplement)

Logic, Programming and Prolog (Supplement) Logic, Programming and Prolog (Supplement) Ulf Nilsson Dept of Computer and Information Science Linköping University ulfni@ida.liu.se http://www.ida.liu.se/labs/logpro/ulfni c Ulf Nilsson, November 26,

More information

SMT-Style Program Analysis with Value-based Refinements

SMT-Style Program Analysis with Value-based Refinements SMT-Style Program Analysis with Value-based Refinements Vijay D Silva Leopold Haller Daniel Kröning NSV-3 July 15, 2010 Outline Imprecision and Refinement in Abstract Interpretation SAT Style Abstract

More information

An Improved Upper Bound for the Sum-free Subset Constant

An Improved Upper Bound for the Sum-free Subset Constant 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 13 (2010), Article 10.8.3 An Improved Upper Bound for the Sum-free Subset Constant Mark Lewko Department of Mathematics University of Texas at Austin

More information

DALL UNIFICAZIONE INSIEMISTICA AI VINCOLI SU INSIEMI FROM SET UNIFICATION TO SET CONSTRAINTS

DALL UNIFICAZIONE INSIEMISTICA AI VINCOLI SU INSIEMI FROM SET UNIFICATION TO SET CONSTRAINTS DALL UNIFICAZIONE INSIEMISTICA AI VINCOLI SU INSIEMI FROM SET UNIFICATION TO SET CONSTRAINTS Gianfranco Rossi 20 SOMMARIO/ABSTRACT In questo articolo riassumiamo brevemente alcuni dei problemi più interessanti

More information

Yip, Yue Kwen Justin. A dissertation submitted in partial fulfillment of the. requirements for the Degree of Doctor of Philosophy

Yip, Yue Kwen Justin. A dissertation submitted in partial fulfillment of the. requirements for the Degree of Doctor of Philosophy The Length-Lex Representation for Constraint Programming over Sets by Yip, Yue Kwen Justin A dissertation submitted in partial fulfillment of the requirements for the Degree of Doctor of Philosophy in

More information

Perfect Derived Propagators

Perfect Derived Propagators Perfect Derived Propagators Christian Schulte 1 and Guido Tack 2 1 ICT, KTH - Royal Institute of Technology, Sweden, cschulte@kth.se 2 PS Lab, Saarland University, Saarbrücken, Germany, tack@ps.uni-sb.de

More information

A Genus Bound for Digital Image Boundaries

A Genus Bound for Digital Image Boundaries A Genus Bound for Digital Image Boundaries Lowell Abrams and Donniell E. Fishkind March 9, 2005 Abstract Shattuck and Leahy [4] conjectured and Abrams, Fishkind, and Priebe [1],[2] proved that the boundary

More information

RECURSIVE AND BACKWARD REASONING IN THE VERIFICATION ON HYBRID SYSTEMS

RECURSIVE AND BACKWARD REASONING IN THE VERIFICATION ON HYBRID SYSTEMS RECURSIVE AND BACKWARD REASONING IN THE VERIFICATION ON HYBRID SYSTEMS Stefan Ratschan Institute of Computer Science, Czech Academy of Sciences, Prague, Czech Republic stefan.ratschan@cs.cas.cz Zhikun

More information

Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy

Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy Programs with infinite loops: from primitive recursive predicates to the arithmetic hierarchy ((quite) preliminary) Armando B. Matos September 11, 2014 Abstract Infinite time Turing machines have been

More information

Introduction to Machine-Independent Optimizations - 1

Introduction to Machine-Independent Optimizations - 1 Introduction to Machine-Independent Optimizations - 1 Department of Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of

More information

The All Different and Global Cardinality Constraints on Set, Multiset and Tuple Variables

The All Different and Global Cardinality Constraints on Set, Multiset and Tuple Variables The All Different and Global Cardinality Constraints on Set, Multiset and Tuple Variables Claude-Guy Quimper 1 and Toby Walsh 2 1 School of Computer Science, University of Waterloo, Canada cquimper@math.uwaterloo.ca

More information

Contents. Introduction

Contents. Introduction Contents Introduction xv Chapter 1. Production Models: Maximizing Profits 1 1.1 A two-variable linear program 2 1.2 The two-variable linear program in AMPL 5 1.3 A linear programming model 6 1.4 The linear

More information

Lecture Notes on Real-world SMT

Lecture Notes on Real-world SMT 15-414: Bug Catching: Automated Program Verification Lecture Notes on Real-world SMT Matt Fredrikson Ruben Martins Carnegie Mellon University Lecture 15 1 Introduction In the previous lecture we studied

More information

Hybrid Constraint Solvers

Hybrid Constraint Solvers Hybrid Constraint Solvers - An overview Why Hybrid Solvers CP and SAT: Lazy Clause Generation CP and LP: Reification of Linear Constraints Conclusions 9 November 2011 Pedro Barahona - EPCL - Hybrid Solvers

More information

Finding a -regular Supergraph of Minimum Order

Finding a -regular Supergraph of Minimum Order Finding a -regular Supergraph of Minimum Order Hans L. Bodlaender a, Richard B. Tan a,b and Jan van Leeuwen a a Department of Computer Science Utrecht University Padualaan 14, 3584 CH Utrecht The Netherlands

More information

1 Computing alignments in only linear space

1 Computing alignments in only linear space 1 Computing alignments in only linear space One of the defects of dynamic programming for all the problems we have discussed is that the dynamic programming tables use Θ(nm) space when the input strings

More information

INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES

INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES RACHEL CARANDANG Abstract. This paper provides an overview of the homology groups of a 2- dimensional complex. It then demonstrates a proof of the Invariance

More information

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np Chapter 1: Introduction Introduction Purpose of the Theory of Computation: Develop formal mathematical models of computation that reflect real-world computers. Nowadays, the Theory of Computation can be

More information

Implementation of replace rules using preference operator

Implementation of replace rules using preference operator Implementation of replace rules using preference operator Senka Drobac, Miikka Silfverberg, and Anssi Yli-Jyrä University of Helsinki Department of Modern Languages Unioninkatu 40 A FI-00014 Helsingin

More information

A Fast and Simple Algorithm for Bounds Consistency of the AllDifferent Constraint

A Fast and Simple Algorithm for Bounds Consistency of the AllDifferent Constraint A Fast and Simple Algorithm for Bounds Consistency of the AllDifferent Constraint Alejandro Lopez-Ortiz 1, Claude-Guy Quimper 1, John Tromp 2, Peter van Beek 1 1 School of Computer Science 2 C WI University

More information

Handbook of Constraint Programming 3 Edited by F. Rossi, P. van Beek and T. Walsh c 2006 Elsevier All rights reserved

Handbook of Constraint Programming 3 Edited by F. Rossi, P. van Beek and T. Walsh c 2006 Elsevier All rights reserved Handbook of Constraint Programming 3 Edited by F. Rossi, P. van Beek and T. Walsh c 2006 Elsevier All rights reserved Chapter 1 Introduction Francesca Rossi, Peter van Beek, Toby Walsh Constraint programming

More information

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Roman Barták Charles University in Prague, Faculty of Mathematics and Physics Institute for Theoretical Computer

More information

ZLoc: A C++ library for local search

ZLoc: A C++ library for local search International Journal of the Physical Sciences Vol. 6(31), pp. 7095-7099, 30 November, 2011 Available online at http://www.academicjournals.org/ijps DOI: 10.5897/IJPS11.1499 ISSN 1992-1950 2011 Academic

More information

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N Mathematical Preliminaries Read pages 529-540 1. Set Theory 1.1 What is a set? A set is a collection of entities of any kind. It can be finite or infinite. A = {a, b, c} N = {1, 2, 3, } An entity is an

More information

Topic 2: Basic Modelling (Version of 30th January 2018)

Topic 2: Basic Modelling (Version of 30th January 2018) Topic 2: Basic (Version of 30th January 2018) Pierre Flener and Jean-Noël Monette Optimisation Group Department of Information Technology Uppsala University Sweden Course 1DL448: for Combinatorial Optimisation

More information

Probability that n Random Points Are in Convex Position* ~n-1 n! (2n-2t) 2 n-l]. n!

Probability that n Random Points Are in Convex Position* ~n-1 n! (2n-2t) 2 n-l]. n! Discrete Comput Geom 13:637-643 (1995) Discrete & Computational Geometry ~) 1995 Springer-Verlag New York Inc. Probability that n Random Points Are in Convex Position* P. Valtr Department of Applied Mathematics,

More information

Lecture 0: Reivew of some basic material

Lecture 0: Reivew of some basic material Lecture 0: Reivew of some basic material September 12, 2018 1 Background material on the homotopy category We begin with the topological category TOP, whose objects are topological spaces and whose morphisms

More information

Coloring 3-Colorable Graphs

Coloring 3-Colorable Graphs Coloring -Colorable Graphs Charles Jin April, 015 1 Introduction Graph coloring in general is an etremely easy-to-understand yet powerful tool. It has wide-ranging applications from register allocation

More information

Lecture 17. Lower bound for variable-length source codes with error. Coding a sequence of symbols: Rates and scheme (Arithmetic code)

Lecture 17. Lower bound for variable-length source codes with error. Coding a sequence of symbols: Rates and scheme (Arithmetic code) Lecture 17 Agenda for the lecture Lower bound for variable-length source codes with error Coding a sequence of symbols: Rates and scheme (Arithmetic code) Introduction to universal codes 17.1 variable-length

More information

2.1 Sets 2.2 Set Operations

2.1 Sets 2.2 Set Operations CSC2510 Theoretical Foundations of Computer Science 2.1 Sets 2.2 Set Operations Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero or more

More information

Efficient validation and construction of border arrays

Efficient validation and construction of border arrays Efficient validation and construction of border arrays Jean-Pierre Duval Thierry Lecroq Arnaud Lefebvre LITIS, University of Rouen, France, {Jean-Pierre.Duval,Thierry.Lecroq,Arnaud.Lefebvre}@univ-rouen.fr

More information

An Alldifferent Constraint Solver in SMT

An Alldifferent Constraint Solver in SMT An Alldifferent Constraint Solver in SMT Milan Banković and Filip Marić Faculty of Mathematics, University of Belgrade (milan filip)@matf.bg.ac.rs May 16, 2010 Abstract The finite domain alldifferent constraint,

More information

A hybrid MIP/CP approach for multi-activity shift scheduling

A hybrid MIP/CP approach for multi-activity shift scheduling A hybrid MIP/CP approach for multi-activity shift scheduling Domenico Salvagnin 1 and Toby Walsh 2 1 DEI, University of Padova 2 NICTA and UNSW, Sydney Abstract. We propose a hybrid MIP/CP approach for

More information

Pbmodels Software to Compute Stable Models by Pseudoboolean Solvers

Pbmodels Software to Compute Stable Models by Pseudoboolean Solvers Pbmodels Software to Compute Stable Models by Pseudoboolean Solvers Lengning Liu and Mirosław Truszczyński Department of Computer Science, University of Kentucky, Lexington, KY 40506-0046, USA Abstract.

More information

MA651 Topology. Lecture 4. Topological spaces 2

MA651 Topology. Lecture 4. Topological spaces 2 MA651 Topology. Lecture 4. Topological spaces 2 This text is based on the following books: Linear Algebra and Analysis by Marc Zamansky Topology by James Dugundgji Fundamental concepts of topology by Peter

More information

IFAD. VDMTools Validated. Design through Modelling. Overview of VDM -SL/++ IFAD. IFAD A/S Forskerparken 10 DK-5230 Odense M Denmark.

IFAD. VDMTools Validated. Design through Modelling. Overview of VDM -SL/++ IFAD. IFAD A/S Forskerparken 10 DK-5230 Odense M Denmark. VDMTools Validated Design through Modelling Overview of VDM -SL/++ www.ifad.dk A/S Forskerparken 10 DK-5230 Odense M Denmark 1 VDM-SL ISO Standard 1996 for flat language Different module proposals A de-facto

More information

Introduction to Constraint Programming

Introduction to Constraint Programming DM841 Discrete Optimization Part II Lecture 1 Introduction to Constraint Programming Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline Course Introduction

More information

Semantic Subtyping with an SMT Solver

Semantic Subtyping with an SMT Solver Semantic Subtyping with an SMT Solver Cătălin Hrițcu, Saarland University, 16 December 2009 Joint work with Andy Gordon (MSR Cambridge), Gavin Bierman (MSR Cambridge), and Dave Langworthy (MS Redmond)

More information

INF121: Functional Algorithmic and Programming

INF121: Functional Algorithmic and Programming INF121: Functional Algorithmic and Programming Lecture 6: Polymorphism, Higher-order, and Currying Academic Year 2011-2012 In the previous episodes of INF 121 Basic Types: Booleans, Integers, Floats, Chars,

More information

Semantics of COW. July Alex van Oostenrijk and Martijn van Beek

Semantics of COW. July Alex van Oostenrijk and Martijn van Beek Semantics of COW /; ;\ \\ // /{_\_/ `'\ \ (o) (o } / :--',-,'`@@@@@@@@ @@@@@@ \_ ` \ ;:( @@@@@@@@@ @@@ \ (o'o) :: ) @@@@ @@@@@@,'@@( `====' Moo! :: : @@@@@: @@@@ `@@@: :: \ @@@@@: @@@@@@@) ( '@@@' ;; /\

More information