Non-binary constraints Dual & Hidden Variable Encodings REFORMULATION.

Slides:



Advertisements
Similar presentations
Levels of Consistency Node Consistency (NC) Arc-consistency (AC) Path Consistency (PC) Generalised arc-consistency (GAC) Bounds consistency Inverse Path.
Advertisements

Constraint Satisfaction Patrick Prosser. An Example, Exam Timetabling Someone timetables the exams We have a number of courses to examine how many? Dept.
Maximal Independent Sets of a Hypergraph IJCAI01.
Constraint Satisfaction Problems
1 CMSC 471 Fall 2002 Class #6 – Wednesday, September 18.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Find the equation of the tangent line. 1.Find the equation for the slopes of the tangent lines 2.Find the slope for the specific x. 3.Find the order pair.
Foundations of Constraint Processing More on Constraint Consistency 1 Foundations of Constraint Processing CSCE421/821, Spring
Non-binary constraints Toby Walsh Dept of CS University of York England.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.6) February, 01, 2010.
Anagh Lal Monday, April 14, Chapter 9 – Tree Decomposition Methods Anagh Lal CSCE Advanced Constraint Processing.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.8) February, 02, 2009.
1 Binary C ONSTRAINT P ROCESSING Chapter 2 ICS-275A Fall 2007.
1 Consistency algorithms Chapter 3. Spring 2007 ICS 275A - Constraint Networks 2 Consistency methods Approximation of inference: Arc, path and i-consistecy.
3.5 Solving Systems of Equations in Three Variables
Substitution Method & Elimination Method
3.1 - Solving Systems by Graphing. All I do is Solve!
Solving Systems Using Elimination Objective: To solve systems of equations algebraically.
Create a Crossword. You should have 24 personal vocabulary words from your reading of Chew on This. You will use at least 20 of them to make a crossword.
Algebra II w/ trig. Substitution Method: 1. Solve an equation for x or y 2. Substitute your result from step 1 into the other equation and solve for the.
Objectives of this Section Graph Inequalities Find Distance on the Real Number Line Evaluate Algebraic Expressions Determine the Domain of a Variable Use.
Slide 1 CSPs: Arc Consistency & Domain Splitting Jim Little UBC CS 322 – Search 7 October 1, 2014 Textbook §
Chapter 7 Section 7.1 Place Systems.
Relaxation and Hybrid constraint processing Different relaxation techniques Some popular hybrid techniques.
Solving Systems of Equations by Graphing  What is a System of Equations?  Solving Linear Systems – The Graphing Method  Consistent Systems – one point.
 Dependent variable (y) – The 2 nd coordinate of ordered pairs; it is the variable that changes depending on the value of the 1 st coordinate  Independent.
Chapter 4.1 Solving Systems of Linear Equations in two variables.
I am Patrick Prosser I am a senior lecturer at Glasgow (and Strathclyde till mid April) I teach algorithms & data structures in java I am a member of.
How Do I Do A “Facturo?” A Facturo is like a crossword puzzle, except each “clue” is a factorable number, and the “letters” are its prime factors. No guessing!
Holt McDougal Algebra Inverses of Relations and Functions 4-2 Inverses of Relations and Functions Holt Algebra 2 Warm Up Warm Up Lesson Presentation.
Modelling for Constraint Programming Barbara Smith CP 2010 Doctoral Programme.
Constraint Satisfaction Basics strongly influenced by Rina Dechter, “Constraint Processing”, 2003.
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
Solving a System of Equations by SUBSTITUTION. GOAL: I want to find what x equals, and what y equals. Using substitution, I can say that x = __ and y.
Linear Equations in Two Variables A Linear Equation in Two Variables is any equation that can be written in the form where A and B are not both zero.
Exponents Tutorial 3f a number, letter, or algebraic expression written above and to the right of another number, letter, or expression called the base.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 6 Binary CSP.
Constraint Satisfaction Basics strongly influenced by Dr. Rina Dechter: “Constraint Processing”
Objective Graph and name ordered pairs (2-9).. Voc.  Coordinate system  Coordinate grid  Origin  X-axis  Y-axis  Quadrants  Ordered pairs  X-coordinate.
Adding a Sequence of numbers (Pairing Method)
Artificial Intelligence Tutorials
Chapter 8 Section 3 Solving System of Equations by the Addition Method.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
Inverses of Relations and Functions
Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
SYSTEMS OF EQUATIONS. SYSTEM OF EQUATIONS -Two or more linear equations involving the same variable.
Warm Up Solve each equation for y. 1.x = -4y 2.x = 2y x = (y + 3)/3 4.x = -1/3 (y + 1)
Constraint Satisfaction Problems/Programming ZUI 2012/2013.
Holt Algebra Inverses of Relations and Functions Graph and recognize inverses of relations and functions. Find inverses of functions. Objectives.
Solving Systems of Equation Using Elimination. Another method for solving systems of equations Eliminate one of the variables by adding the two equations.
Constraint Satisfaction Problems (CSPs) Introduction
1.1 Graph of Equations How to sketch graphs
2.2 Graphs of Equations.
Computer Science cpsc322, Lecture 13
Constraint Satisfaction Problems (CSPs) Introduction
Graphs of Equations In Two Variables; Intercepts; Symmetry
Solve Systems of Equations by Elimination
Quadratics 40 points.
Computer Science cpsc322, Lecture 13
Running example The 4-houses puzzle:
Advanced consistency methods Chapter 8
at Glasgow (and Strathclyde till mid April)
You can find and apply inverses to relations and functions
Revisiting Neighborhood Inverse Consistency on Binary CSPs
Revisiting Neighborhood Inverse Consistency on Binary CSPs
• • • • • Check It Out! Example 1
Reformulating the Dual Graphs of CSPs
Consistency algorithms
Presentation transcript:

Non-binary constraints Dual & Hidden Variable Encodings REFORMULATION

From non-binary to binary REFORMULATION

Binary decomposable constraints allDiff(x,y,z) x ≠ y, x ≠ z, y ≠ z monotone(x,y,z) x < y, y < z even(x + y +z) no way aka network decomposable

Dual Variable Encoding

Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} introduce variables VC1 and VC2 domain of VC1 is set of allowed tuples for x and y in constraint C1 domain of VC2 is set of allowed tuples for y and z in constraint C2 introduce a constraint relation R21 where domain of R21 is allowed tuples between VC1 and VC2 position 2 in tuples in VC1 (agrees in y) position 1 in tuples in VC2 (agrees in y)

Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} VC1: (, ) VC2: (, ) R21: (, ) C1 =  C2 =

Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} VC1: (, ) VC2: (, ) R21: (, ) C1 =  C2 = match on y

Dual Variables Consider the two constraints C1 and C2 C1: even(x + y) C2: odd(y+z) x,y,z in {0,1} VC1: (, ) VC2: (, ) R21: (, ) C1 =  C2 = match on y

Dual VariablesAnother example Due to Stergiou & Walsh

Dual Variables x1 x6 x2 x5 x4 x3 The hypergraph

Hidden Variable Encoding Dual Variable Hyper Graph

Dual Variables x1 x6 x2 x5 x4 x3 Have a C variable for each constraint, with domain the set of allowed tuples Have constraints Rij between those C variables that share variables in the original model to ensure compatible pairs of tuples in positions i and j

Dual Variables Have a C variable for each constraint, with domain the set of allowed tuples Have constraints Rij between those C variables that share variables in the original model to ensure compatible pairs of tuples in positions i and j respectively VC4 (0,0,0) (0,1,1) (1,0,1) VC1 (0,0,1) (0,1,0) (1,0,0) VC2 (0,0,1) (1,0,0) (1,1,1) VC3 (0,1,0) (1,0,0) (1,1,0) (1,1,1) R11 R33 R21 & R33 R31 R22 & R33

Dual Variables (you could) Try this u,v,w,x, y, and z, in {0,1} C1: oddSum(x,y,z) C2: notSame(u,v,w) C3: evenSum(w,x,y)

Hidden Variable Encoding

Hidden Variable Introduces dual variables as before (representing allowed tuples for constraints) Additional “hidden” variables binary constraints from the dual to original variables

Hidden Variables Introduce an additional hidden variable, and use the originals Add k binary constraints from originals to hidden variable Example x,y,z in {0,1} notSame(x,y,z) Allowed tuples are {,,,,, } W is in {,,,,, } W x y z Cxw: W =  x = 1 Cyw: Y =  y = 1 Czw: W =  z = 1

Hidden Variables Have a C variable for each constraint, with domain the set of allowed tuples (as before) Have constraints rij between variable vi and dual variable VCJ to ensure Compatibility between dual and original variables VC4 (0,0,0) (0,1,1) (1,0,1) VC1 (0,0,1) (0,1,0) (1,0,0) VC2 (0,0,1) (1,0,0) (1,1,1) VC3 (0,1,0) (1,0,0) (1,1,0) (1,1,1) v1v2v3v4v6v5 r11 r12 r21 r24 r32 r42 r43 r53 r54 r61 r63 r64

Upside Variables have domains O(m k ) Downside Higher level of consistency (GAC)

Hidden variable encoding AC on hidden variable encoding is equivalent to GAC on original problem

Dual variable encoding AC on dual encoding is stronger than GAC on original encoding AC on dual encoding is stronger than AC on hidden variable encoding

Make a crossword puzzle

An example Given the above grid and a dictionary, fill it. Then go get the clues (not my problem)

Original, non-binary, Encoding A variable for each square Domain of each variable is {a.. z} Constraints are k-ary For example, 1-across is set of 6-tuples 2-down is set of 7 tuples Tuples on 1-across and 2-down must be consistent

Variables 1A 1 across 4D 4 down 2D 2 down 4A 4 across 7D 7 down A4D 2D 7D 4A The Dual Encoding Domains 1A: any 6 letter word 4A: any 8 letter word 4D: any 5 letter word 2D: any 7 letter word 7D: any 3 letter word

A4D 2D 7D 4A 1A-4D: 4th of 1A equals 1st of 4D 1A-2D: 2nd of 1A equals 1st of 2D 2D-4A: 4th of 2D equals 2nd of4D 4D-4A: 4th of 4A equals 4th of 4D 4A-7D: 7th of 4A equals 2nd of 7D Binary Constraints The Dual Encoding