Constraint Networks (cont.) Emma Rollón Postdoctoral researcher at UCI April 1st, 2009.

Slides:



Advertisements
Similar presentations
February 7, 2002 A brief review of Linear Algebra Linear Programming Models Handouts: Lecture Notes.
Advertisements

Artificial Intelligence 15. Constraint Satisfaction Problems
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Constraint Programming Peter van Beek University of Waterloo.
Maximal Independent Subsets of Linear Spaces. Whats a linear space? Given a set of points V a set of lines where a line is a k-set of points each pair.
CS188: Computational Models of Human Behavior
CONSTRAINT Networks Chapters 1-2
PROLOG MORE PROBLEMS.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Error-Correcting codes
4.5 Generalized Permutations and Combinations
Constraint Satisfaction Problems Russell and Norvig: Chapter
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Boolean Satisfiability The most fundamental NP-complete problem, and now a powerful technology for solving many real world problems.
Global Constraints Toby Walsh NICTA and University of New South Wales
Sep 15, 2014 Lirong Xia Computational social choice The easy-to-compute axiom.
2 x /10/2015 Know Your Facts!. 8 x /10/2015 Know Your Facts!
SAT Encoding For Sudoku Puzzles
1 Undirected Graphical Models Graphical Models – Carlos Guestrin Carnegie Mellon University October 29 th, 2008 Readings: K&F: 4.1, 4.2, 4.3, 4.4,
Blackbox Reductions from Mechanisms to Algorithms.
13-Optimization Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
16.410: Eric Feron / MIT, Spring 2001 Introduction to the Simplex Method to solve Linear Programs Eric Feron Spring 2001.
5 x4. 10 x2 9 x3 10 x9 10 x4 10 x8 9 x2 9 x4.
CS 478 – Tools for Machine Learning and Data Mining Clustering: Distance-based Approaches.
Constraint Optimization We are interested in the general non-linear programming problem like the following Find x which optimizes f(x) subject to gi(x)
SATISFIABILITY Eric L. Frederich.
Variational Inference Amr Ahmed Nov. 6 th Outline Approximate Inference Variational inference formulation – Mean Field Examples – Structured VI.
Chapter 8: The Solver and Mathematical Programming Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Probabilistic sequence modeling II: Markov chains Haixu Tang School of Informatics.
A study of Correlated Equilibrium Polytope By: Jason Sorensen.
Shannon Expansion Given Boolean expression F = w 2 ’ + w 1 ’w 3 ’ + w 1 w 3 Shannon Expansion of F on a variable, say w 2, is to write F as two parts:
Constraint Satisfaction taking advantage of internal structure of states when paths don’t matter.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
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.
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
CONSTRAINT Networks Chapters 1-2 Compsci-275 Spring 2009 Spring
1.2 – Open Sentences and Graphs
Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
Game Theory.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
1 Constraint Satisfaction and Backtrack Search 22c:31 Algorithms.
Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Jim Little UBC CS 322 – CSP 1 September 27, 2014 Textbook §
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
March 10, 2015Applied Discrete Mathematics Week 6: Counting 1 Permutations and Combinations How many different sets of 3 people can we pick from a group.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Modelling for Constraint Programming Barbara Smith CP 2010 Doctoral Programme.
DISCRETE COMPUTATIONAL STRUCTURES CS Fall 2005.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
QMB 4701 MANAGERIAL OPERATIONS ANALYSIS
Chapter 5 Constraint Satisfaction Problems
C ONSTRAINT Networks Chapters 1-2 Compsci-275 Fall
Chapter 2) CSP solving-An overview Overview of CSP solving techniques: problem reduction, search and solution synthesis Analyses of the characteristics.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
1 Constraint Satisfaction Problems: Formulation, Arc Consistency & Propagation 1 Brian C. Williams October 13 th, 2004 Slides adapted from:
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Constraint Satisfaction Problems (CSPs) Introduction
Lecture 7: Constrained Conditional Models
The Pigeonhole Principle
Optimization Problems
COCS DISCRETE STRUCTURES
Constraint Satisfaction Problems vs. Finite State Problems
Constraint Satisfaction Problems (CSPs) Introduction
Instructor: Vincent Conitzer
Permutations and Combinations
Integer Linear Programming
Presentation transcript:

Constraint Networks (cont.) Emma Rollón Postdoctoral researcher at UCI April 1st, 2009

Agenda 1Combinatorial problems 2Local functions 3Global view of the problem 5Examples 4Some bits on modelling

Decision Optimization MO Optimization Combinatorial Problems Combinatorial Problems

Decision Optimization MO Optimization Combinatorial Problems Combinatorial Problems  Given a finite set of solutions …  … choose the best solution.  Observations:  The set of alternatives can be exponentially large.  The definition of best depends on each problem.  Given a finite set of solutions …  … choose the best solution.  Observations:  The set of alternatives can be exponentially large.  The definition of best depends on each problem. Combinatorial Problems

Optimization MO Optimization Combinatorial Problems Map coloring  Given a set of regions and k colors …  … color each region …  … such that no two adjacent regions have the same color  Given a set of regions and k colors …  … color each region …  … such that no two adjacent regions have the same color Decision Combinatorial Problems C A B D E F G C A B D E F G C A B D E F G …  What if the problem is unfeasible?  Users may have preferences among solutions Experiment: if I give you the whole bunch of solutions and tell you to choose one not all of you will choose the same one.

MO Optimization Combinatorial Problems Map coloring (optimization) Optimization Decision Combinatorial Problems  Given a set of regions and k colors …  … find the best map coloring …  … such that no two adjacent regions have the same color …  Best: using as much blue as possible.  Given a set of regions and k colors …  … find the best map coloring …  … such that no two adjacent regions have the same color …  Best: using as much blue as possible. C A B D E F G

MO Optimization Combinatorial Problems Combinatorial Auctions  Given a set G of goods and a set B of bids …  … find the best subset of bids …  r(b i )=v i revenue of bid b i  … subject to bids’ compatibility.  Best = maximize benefit (sum)  Given a set G of goods and a set B of bids …  … find the best subset of bids …  r(b i )=v i revenue of bid b i  … subject to bids’ compatibility.  Best = maximize benefit (sum) Optimization Decision auctioner bids b1b1 b2b2 b3b3 b4b4 Combinatorial Problems

Combinatorial Problems Portfolio Optimization  Given a set I of investments …  … find the best portfolio (subset of investments) …  Best =  Given a set I of investments …  … find the best portfolio (subset of investments) …  Best = MO Optimization Optimization Decision maximize return minimize risk Combinatorial Problems

Graphical Models  Those problems that can be expressed as:  A set of variables  Each variable takes its values from a finite set of domain values  A set of local functions  Main advantage:  They provide unifying algorithms: oSearch oComplete Inference oIncomplete Inference  Those problems that can be expressed as:  A set of variables  Each variable takes its values from a finite set of domain values  A set of local functions  Main advantage:  They provide unifying algorithms: oSearch oComplete Inference oIncomplete Inference Combinatorial Problems MO Optimization Optimization Decision Graphical Models Combinatorial Problems

Many Examples Combinatorial Problems MO Optimization Optimization Decision x1x2x1x2 x3x3 x4x4 Graph ColoringTimetabling EOS Scheduling … and many others. Combinatorial Problems Bayesian Networks Graphical Models

 Local function where var(f) = Y  X: scope of function f A: is a set of valuations  In constraint networks: functions are boolean Local Functions x1x1 x2x2 f aatrue abfalse ba bbtrue x1x1 x2x2 aa bb relation

 Join :  Logical AND: x1x1 x2x2 aa bb x2x2 x3x3 aa ab ba x1x1 x2x2 x3x3 aaa aab bba Local Functions Combination x1x1 x2x2 f aatrue abfalse ba bbtrue x2x2 x3x3 g aa ab ba bbfalse x1x1 x2x2 x3x3 h aaa true aab aba false abb baa bab bba true bbb false

Global View of the Problem x1x1 x2x2 x3x3 h aaa true aab aba false abb baa bab bba true bbb false x1x1 x2x2 aa bb x2x2 x3x3 aa ab ba x1x1 x2x2 x3x3 aaa aab bba C1C1 C2C2 Global View The problem has a solution if the global view is not empty The problem has a solution if there is some true tuple in the global view The logical OR over all tuples in the global view is true ≡ Does the problem a solution? TASK

Global View of the Problem x1x1 x2x2 x3x3 h aaa true aab aba false abb baa bab bba true bbb false x1x1 x2x2 aa bb x2x2 x3x3 aa ab ba x1x1 x2x2 x3x3 aaa aab bba C1C1 C2C2 Global View What about counting? x1x1 x2x2 x3x3 h aaa 1 aab 1 aba 0 abb 0 baa 0 bab 0 bba 1 bbb 0 Number of true tuples Sum over all the tuples true is 1 false is 0 logical AND? TASK

Representing a problemModelling  If a CSP M = represents a problem P, then every solution of M corresponds to a solution of P and every solution of P can be derived from at least one solution of M  The variables and values of M represent entities in P  The constraints of M ensure the correspondence between solutions  The aim is to find a model M that can be solved as quickly as possible  Good rule of thumb: choose a set of variables and values that allows the constraints to be expressed easily and concisely

Representing a problemModelling Example: Magic Square Problem Arrange the numbers 1 to 9 in a 3 x 3 square so that each row, column and diagonal has the same sum. Variables and Values 1.A variable for each cell, domain is the numbers that can go in the cell 2.A variable for each number, domain is the cells where that number can go What about constraints?  It’s easy to define them: x1 + x2 + x3 = x4 + x5 + x6 = …  Definetely not easy … x1x2x3 x4x5x6 x7x8x9

Global ConstraintsModelling  A global constraint is a constraint defined over a large set of variables and with specific semantics  The commonest: AllDifferent constraint Variables: one for each slot Domains: {1, 2, 3, 4, 5, 6, 7, 8, 9} Constraints: - pairwise not equal constraints - alldifferent for each row, columns, 3x3 square  Solvers provide algorithms for locally reasoning about them  There is a trade-off time spent in local reasoning and time saved in global reasoning

A symmetry transforms any solution into another: 1.Sometimes symmetry is inherent in the problem: chessboard symmetry 2.Sometimes it’s introduced in modelling: golfers problem Symmetry causes wasted solving effort: after exploring choices that don’t lead to a solution, symmetrically equivalent choices may be explored SymmetriesModelling Problem: 32 golfers want to play in 8 groups of 4 each week, so that any two golfers play in the same group at most once. Find a schedule for n weeks. One model has 0/1 variables x ijkl : x ijkl = 1 if player i is the j th player in the k th group in week l, and 0 otherwise. Symmetry: The players within each group could be permuted in any solution to give an equivalent solution Problem: 32 golfers want to play in 8 groups of 4 each week, so that any two golfers play in the same group at most once. Find a schedule for n weeks. One model has 0/1 variables x ijkl : x ijkl = 1 if player i is the j th player in the k th group in week l, and 0 otherwise. Symmetry: The players within each group could be permuted in any solution to give an equivalent solution

Examples Propositional Satisfiability  = {(A v B), (C v ¬ B)} Given a proposition theory does it have a model? Can it be encoded as a constraint network?  Variables:  Domains:  Relations: {A, B, C} D A = D B = D C = {0, 1} AB BC If this constraint network has a solution, then the propositional theory has a model

Examples Radio Link Assignment Given a telecommunication network (where each communication link has various antenas), assign a frequency to each antenna in such a way that all antennas may operate together without noticeable interference. Encoding?  Variables: one for each antenna  Domains: the set of available frequencies  Constraints: the ones referring to the antennas in the same communication link

Examples Radio Link Assignment Given a telecommunication network (where each communication link has various antenas), assign a frequency to each antenna in such a way that all antennas may operate together without noticeable interference. Encoding?  Variables: one for each antenna  Domains: the set of available frequencies  Constraints: the ones referring to the antennas in the same communication link

Examples Scheduling problem Encoding?  Variables: one for each task  Domains: D T1 = D T2 = D T3 = D T3 = {1:00, 2:00, 3:00}  Constraints:  Five tasks: T1, T2, T3, T4, T5  Each one takes one hour to complete  The tasks may start at 1:00, 2:00 or 3:00  Requirements:  T1 must start after T3  T3 must start before T4 and after T5  T2 cannot execute at the same time as T1 or T4  T4 cannot start at 2:00 T4 1:00 2:00

Examples Scene-labelling problem (Huffman-Clowes labelling)

Examples Numeric constraints Can we specify numeric constraints as relations? {1, 2, 3, 4} { 3, 5, 7 } { 3, 4, 9 } { 3, 6, 7 } v2 > v4 V4 V2 v1+v3 < 9 V3 V1 v2 < v3 v1 < v2 It can be formulated as an integer linear program and apply specific (and efficient) algorithms.

Examples Temporal reasoning Does it have a solution?