Matrix Modelling Pierre Flener (Uppsala) Alan M. Frisch (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Ian Miguel, and Toby Walsh (York)

Slides:



Advertisements
Similar presentations
2.3 Modeling Real World Data with Matrices
Advertisements

Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Reducing Symmetry in Matrix Models Alan Frisch, Ian Miguel, Toby Walsh (York) Pierre Flener, Brahim Hnich, Zeynep Kiziltan, Justin Pearson (Uppsala)
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.
Leeds: 6 June 02Constraint Technology for the Masses Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Collaborators:
Systems of Linear Equations
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Transforming and Refining Abstract Constraint Specifications Alan Frisch, Brahim Hnich*, Ian Miguel, Barbara Smith, and Toby Walsh *Cork Constraint Computation.
Maths for Computer Graphics
Symmetry as a Prelude to Implied Constraints Alan Frisch, Ian Miguel, Toby Walsh University of York.
Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Extending the Reach of Constraint Technology through Reformulation.
Matrix Modelling Alan M. Frisch and Ian Miguel (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Toby Walsh (Cork)
NOTES ON MULTIPLE REGRESSION USING MATRICES  Multiple Regression Tony E. Smith ESE 502: Spatial Data Analysis  Matrix Formulation of Regression  Applications.
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.
Concatenation MATLAB lets you construct a new vector by concatenating other vectors: – A = [B C D... X Y Z] where the individual items in the brackets.
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.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Matrices Write and Augmented Matrix of a system of Linear Equations Write the system from the augmented matrix Solve Systems of Linear Equations using.
Matrix Solution of Linear Systems The Gauss-Jordan Method Special Systems.
Constraint Patterns Toby Walsh 4C, UCC & Uppsala.
Chapter 5. Loops are common in most programming languages Plus side: Are very fast (in other languages) & easy to understand Negative side: Require a.
ECON 1150 Matrix Operations Special Matrices
Linear Codes.
Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress.
Algebra 3: Section 5.5 Objectives of this Section Find the Sum and Difference of Two Matrices Find Scalar Multiples of a Matrix Find the Product of Two.
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Matrix Arithmetic. A matrix M is an array of cell entries (m row,column ) and it must have rectangular dimensions (Rows x Columns). Example: 3x x.
13.1 Matrices and Their Sums
Lesson 11-1 Matrix Basics and Augmented Matrices Objective: To learn to solve systems of linear equation using matrices.
4.6: Rank. Definition: Let A be an mxn matrix. Then each row of A has n entries and can therefore be associated with a vector in The set of all linear.
Working with Arrays in MATLAB
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Slide Copyright © 2009 Pearson Education, Inc. 7.3 Matrices.
Algebra II Honors Problem of the Day Homework page eoo The following system has been solved and there are infinite solutions in the form of (
Section 4Chapter 4. 1 Copyright © 2012, 2008, 2004 Pearson Education, Inc. Objectives Solving Systems of Linear Equations by Matrix Methods Define.
4.1 Using Matrices Warm-up (IN) Learning Objective: to represent mathematical and real-world data in a matrix and to find sums, differences and scalar.
Matrices: Simplifying Algebraic Expressions Combining Like Terms & Distributive Property.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
Warm Up Perform the indicated operations. If the matrix does not exist, write impossible
EGR 115 Introduction to Computing for Engineers MATLAB Basics 1: Variables & Arrays Wednesday 03 Sept 2014 EGR 115 Introduction to Computing for Engineers.
1.7 Linear Independence. in R n is said to be linearly independent if has only the trivial solution. in R n is said to be linearly dependent if there.
MULTI-DIMENSIONAL ARRAYS 1. Multi-dimensional Arrays The types of arrays discussed so far are all linear arrays. That is, they all dealt with a single.
Arrays and variables 1.Representing tables as arrays in MATLAB 2.Concept of array dimension 3.Correspondence of array dimension to rows and columns 4.Picking.
Precalculus Section 14.1 Add and subtract matrices Often a set of data is arranged in a table form A matrix is a rectangular.
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
2.1 Matrix Operations 2. Matrix Algebra. j -th column i -th row Diagonal entries Diagonal matrix : a square matrix whose nondiagonal entries are zero.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices.
12-1 Organizing Data Using Matrices
Matrices Rules & Operations.
Linear Algebra review (optional)
Matrix Operations.
Matrix Operations.
WarmUp 2-3 on your calculator or on paper..
7.3 Matrices.
4.6: Rank.
Objectives Multiply two matrices.
A more complex LP problem
Multi-Dimensional Arrays
Linear Algebra review (optional)
Matrices.
Introduction to Matrices
Presentation transcript:

Matrix Modelling Pierre Flener (Uppsala) Alan M. Frisch (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Ian Miguel, and Toby Walsh (York)

What is matrix modelling?  Constraint programs with one or more matrix of decision vars  Common patterns in such models

Example: warehouse location  Which warehouses supply which stores?  0/1 matrices Open(warehouse) Supply(warehouse,store)  Constraints Each store has a warehouse: row sum on Supply=1 Warehouse capacity: column sum on Supply <= ci Channelling from Supply to Open

Diversity of matrix models  Combinatorial problems BIBDs, magic squares, projective planes, …  Design Rack configuration, template and slab design, …  Scheduling Classroom, social golfer, …  Assignment Warehouse location, progressive party, …

Why matrix model?  Ease of problem statement Side constraints, variable indexing, …  Improved constraint propagation Symmetry breaking, indistinguishable values, linear models, … We argue that matrix operations should become first class objects in constraint programming languages. MATLAB meet OPL?

Common constraint types  Row or column sum  Weighted row/column sum  Single non-zero entry  Matrix sum  Scalar product  Channelling This pretty much describes all the examples! These constraints should be provided as language primitives? Efficient and powerful propagators developed?

Ease of problem statement  Steel mill slab design  Nasty “colour” constraint Stops it being simple knapsack problem  Channel into matrix model Colour constraint easily and efficiently stated  Easy to combine models Multiple models

Improved propagation  Warehouse location Either 1-d matrix, Supply(store)=warehouse Or 2-d matrix, Supply(store,warehouse)=0/1 2-d matrix is purely linear so can use LP solver

Symmetry breaking  Often rows or columns (or both) are symmetric All weeks (cols) can be permuted in a timetable All slabs (rows) of same size can be permuted  Lex order rows/cols See our talk in Symmetry workshop Alan Frisch

Indistinguishable values  Values in problem can be indistinguishable In progressive party problem: Assign(guest,period)=host But host boats of same size are indistinguishable  Channel into 0/1 matrix with extra dimension Assign3(guest,period,host)=0/1 Value symmetry => variable symmetry

Variable indexing  Use variables to index into arrays E.g. channelling in progressive party problem Assign3(guest,period,Assign(guest,period))=1 compared to Assign3(guest,period,host)=1 iff Assign(guest,period)=host Reduces number of constraints from cubic to quadratic Hooker (and others) argue that such indexing is one of the significant advantages CP has over IP

Conclusions  Matrix models common  Common types of constraints posted on matrices Row/column sum, symmetry breaking, channelling, …  Matrix operations should be made first-class objects in modelling languages MATLAB, EXCEL, …