CONSTRAINT Networks Chapters 1-2

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

Variations of the Turing Machine
Angstrom Care 培苗社 Quadratic Equation II
Constraint Satisfaction Problems
AP STUDY SESSION 2.
1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
David Burdett May 11, 2004 Package Binding for WS CDL.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Custom Services and Training Provider Details Chapter 4.
CALENDAR.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Wants.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
60 Great Ways to Use MS Word in the Classroom Using MS Word in the classroom is a practice that should be social as well as technical The social organisation.
1 Combination Symbols A supplement to Greenleafs QR Text Compiled by Samuel Marateck ©2009.
Break Time Remaining 10:00.
Discrete Math Recurrence Relations 1.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Chapter 3 Logic Gates.
Business and Economics 6th Edition
Outline Minimum Spanning Tree Maximal Flow Algorithm LP formulation 1.
Linear Programming, A Geometric Approach
Bellwork Do the following problem on a ½ sheet of paper and turn in.
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Functions, Graphs, and Limits
Chapter 1: Expressions, Equations, & Inequalities
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Artificial Intelligence
1 Using Bayesian Network for combining classifiers Leonardo Nogueira Matos Departamento de Computação Universidade Federal de Sergipe.
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Copyright Tim Morris/St Stephen's School
1.step PMIT start + initial project data input Concept Concept.
1 Dr. Scott Schaefer Least Squares Curves, Rational Representations, Splines and Continuity.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Chapter 5 Relations and Functions
FIGURE 3-1 Basic parts of a computer. Dale R. Patrick Electricity and Electronics: A Survey, 5e Copyright ©2002 by Pearson Education, Inc. Upper Saddle.
SAT Solver CS 680 Formal Methods Jeremy Johnson. 2 Disjunctive Normal Form  A Boolean expression is a Boolean function  Any Boolean function can be.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
CONSTRAINT Networks Chapters 1-2 Compsci-275 Spring 2009 Spring
1 Binary C ONSTRAINT P ROCESSING Chapter 2 ICS-275A Fall 2007.
C ONSTRAINT Networks Chapters 1-2 Compsci-275 Fall
Presentation transcript:

CONSTRAINT Networks Chapters 1-2 Compsci-275 Spring 2009 Spring 2009

Class Information 11:00 - 12:20 pm Instructor: Rina Dechter Days: Monday & Wednesday Time: 11:00 - 12:20 pm 11:00 - 12:20 pm Class page: http://www.ics.uci.edu/~dechter/ics-275a/spring-2009/ Spring 2009

Text book (required) Rina Dechter, Constraint Processing, Morgan Kaufmann Spring 2009

Outline Motivation, applications, history CSP: Definition, and simple modeling examples Mathematical concepts (relations, graphs) Representing constraints Constraint graphs The binary Constraint Networks properties Spring 2009

Outline Motivation, applications, history CSP: Definition, representation and simple modeling examples Mathematical concepts (relations, graphs) Representing constraints Constraint graphs The binary Constraint Networks properties Spring 2009

Example: student course selection Context: You are a senior in college Problem: You need to register in 4 courses for the Spring semester Possibilities: Many courses offered in Math, CSE, EE, CBA, etc. Constraints: restrict the choices you can make Unary: Courses have prerequisites you have/don't have Courses/instructors you like/dislike Binary: Courses are scheduled at the same time n-ary: In CE: 4 courses from 5 tracks such as at least 3 tracks are covered You have choices, but are restricted by constraints Make the right decisions!! ICS Graduate program Spring 2009

Student course selection (continued) Given A set of variables: 4 courses at your college For each variable, a set of choices (values) A set of constraints that restrict the combinations of values the variables can take at the same time Questions Does a solution exist? (classical decision problem) How many solutions exists? How two or more solutions differ? Which solution is preferrable? etc. Spring 2009

The field of Constraint Programming How did it started: Artificial Intelligence (vision) Programming Languages (Logic Programming), Databases (deductive, relational) Logic-based languages (propositional logic) SATisfiability Related areas: Hardware and software verification Operation Research (Integer Programming) Answer set programming Graphical Models; deterministic Spring 2009

Practical applications Radio resource management (RRM) Databases (computing joins, view updates) Temporal and spatial reasoning Planning, scheduling, resource allocation Design and configuration Graphics, visualization, interfaces Hardware verification and software engineering HC Interaction and decision support Molecular biology Robotics, machine vision and computational linguistics Transportation Qualitative and diagnostic reasoning Spring 2009

Outline Motivation, applications, history CSP: Definitions and simple modeling examples Mathematical concepts (relations, graphs) Representing constraints Constraint graphs The binary Constraint Networks properties Spring 2009

A Constraint Networks Example: map coloring Variables - countries (A,B,C,etc.) Values - colors (red, green, blue) Constraints: A B red green red yellow green red green yellow yellow green yellow red Constraint graph C A B D E F G A E A collection of constraints that are related to each other in a particular domain is called “a constraint network” They are defined by a set of variables, their possible values and a set of constraints. I will demonstrate this through a simple example of map-coloring… You have a map and you want to color the counties in the map by a given set of colors such that adjacent counties have different colors. We can associate each county with a variable, the colors that can be assigned are the “domain” of the variables. For each two variables that represent adjacent countries we will have a not-equal constraint, A solution is an assignment of a value to each variable such that no constraint is violated. We can associate a graph with a constraint network: the variables are the nodes, and an edge connect any two variables Appearing in a single constraint (constraint can be defined on more than two variables.). D F B G C Spring 2009

Constraint Satisfaction Tasks Example: map coloring Variables - countries (A,B,C,etc.) Values - colors (e.g., red, green, yellow) Constraints: A B C D E… red green blue blu gre … Are the constraints consistent? Find a solution, find all solutions Count all solutions Find a good solution In summary, … as set of constraints can captured by a graph and it represents its set of all solutions Spring 2009

Information as Constraints I have to finish my talk in 30 minutes 180 degrees in a triangle Memory in our computer is limited The four nucleotides that makes up a DNA only combine in a particular sequence Sentences in English must obey the rules of syntax Susan cannot be married to both John and Bill Alexander the Great died in 333 B.C. What are constraints? “Constraints” have negative connotation in human discourse. They mean “restrictions,” such as in the sentence: “I have to finish my talk in 30 minute.” But any piece of information is “constraint” If you have a piece of information that does not constrain the set of possible scenarios then it is ill-defined and the information is worth nothing. In logic we say that it is a tautology. Any fact, expressed positively, has value only so-far-as it restricts the set of possible scenarios or possible worlds. So I will use the notion of “constraint: in that broad sense. As we heard from Geoff and Jim, the English language has syntax rules, which are constraints, and even historical fact are constraints (on the set of possible histories). Spring 2009

Constraint Network; Definition A constraint network is: R=(X,D,C) X variables D domain C constraints R expresses allowed tuples over scopes A solution is an assignment to all variables that satisfies all constraints (join of all relations). Tasks: consistency?, one or all solutions, counting, optimization Spring 2009

Example: The N-queens problem The network has four variables, all with domains Di = {1, 2, 3, 4}. (a) The labeled chess board. (b) The constraints between variables. Spring 2009

A solution and a partial consistent tuple Not all consistent instantiations are part of a solution: A consistent instantiation that is not part of a solution. The placement of the queens corresponding to the solution (2, 4, 1,3). c) The placement of the queens corresponding to the solution (3, 1, 4, 2). Spring 2009

Example: Crossword puzzle Variables: x1, …, x13 Domains: letters Constraints: words from {HOSES, LASER, SHEET, SNAIL, STEER, ALSO, EARN, HIKE, IRON, SAME, EAT, LET, RUN, SUN, TEN, YES, BE, IT, NO, US} Spring 2009

Constraint graphs of the crossword puzzle and the 4-queens problem. Spring 2009

Example: configuration and design Spring 2009

Configuration and design Want to build: recreation area, apartments, houses, cemetery, dump Recreation area near lake Steep slopes avoided except for recreation area Poor soil avoided for developments Highway far from apartments, houses and recreation Dump not visible from apartments, houses and lake Lots 3 and 4 have poor soil Lots 3, 4, 7, 8 are on steep slopes Lots 2, 3, 4 are near lake Lots 1, 2 are near highway Spring 2009

Configuration and design Variables: Recreation, Apartments, Houses, Cemetery, Dump Domains: {1, 2, …, 8} Constraints: derived from conditions Spring 2009

Huffman-Clowes junction labelings (1975) 3-dimensional interpretation of 2-dimentional drawing in block world pictures examples. Spring 2009

Figure 1.5: Solutions: (a) stuck on left wall, (b) stuck on right wall, (c) suspended in mid-air, (d) resting on floor. Spring 2009

Example: Sudoku Constraint propagation 2 Variables: 81 slots Domains = {1,2,3,4,5,6,7,8,9} Constraints: 27 not-equal Constraint propagation 2 2 3 4 6 As I will disuss later, algorithms for answering constraint satisfaction queries are not likely to be efficient. Namely, we may have to wait a very long time when we ask if there is a solution. But one reason the area of constraint network gained its popularity is by highlighting some computational pattern that is popular with human. We call it constraint propagation. …. So, while constraint propagation are huge effective helper in solving many problems associated with deterministic constraints. Each row, column and major block must be alldifferent “Well posed” if it has unique solution: 27 constraints Spring 2009

Outline Motivation, applications, history CSP: Definition, representation and simple modeling examples Mathematical concepts (relations, graphs) Representing constraints Constraint graphs The binary Constraint Networks properties Spring 2009

Mathematical background Sets, domains, tuples Relations Operations on relations Graphs Complexity Spring 2009

Two graphical representation and views of a relation: R = {(black, coffee), (black, tea), (green, tea)}. Spring 2009

Operations with relations Intersection Union Difference Selection Projection Join Composition Spring 2009

Figure 1.8: Example of set operations intersection, union, and difference applied to relations. Spring 2009

selection, projection, and join operations on relations. Spring 2009

Outline Motivation, applications, history CSP: Definition, representation and simple modeling examples Mathematical concepts (relations, graphs) Representing constraints Constraint graphs The binary Constraint Networks properties Spring 2009

Constraint’s representations Relation: allowed tuples Algebraic expression: Propositional formula: Semantics: by a relation Spring 2009

Constraint Graphs: Primal, Dual and Hypergraphs A (primal) constraint graph: a node per variable arcs connect constrained variables. A dual constraint graph: a node per constraint’s scope, an arc connect nodes sharing variables =hypergraph Spring 2009

Graph Concepts Reviews: Hyper Graphs and Dual Graphs A hypergraph Dual graphs A primal graph Spring 2009

Propositional Satisfiability  = {(¬C), (A v B v C), (¬A v B v E), (¬B v C v D)}. Spring 2009

Constraint graphs of 3 instances of the Radio frequency assignment problem in CELAR’s benchmark Spring 2009

Figure 2.7: Scene labeling constraint network Spring 2009

A combinatorial circuit: M is a multiplier, A is an adder Spring 2009

The constraint graph and constraint relations of the scheduling problem example. Spring 2009

More examples Given P = (V, D, C ), where Example I: Define C ? {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 Spring 2009

Example: temporal reasoning Give one solution: ……. Satisfaction, yes/no: decision problem Spring 2009

Outline Motivation, applications, history CSP: Definition, representation and simple modeling examples Mathematical concepts (relations, graphs) Representing constraints Constraint graphs The binary Constraint Networks properties Spring 2009

Properties of binary constraint networks: A graph  to be colored by two colors, an equivalent representation ’ having a newly inferred constraint between x1 and x3. Equivalence and deduction with constraints (composition) Spring 2009

Relations vs netwroks Can we represent the relations x1,x2,x3 = (0,0,0)(0,1,1)(1,0,1)(1,1,0) X1,x2,x3,x4 = (1,0,0,0)(0,1,0,0) (0,0,1,0)(0,0,0,1) Spring 2009

Relations vs netwroksCan we represent Can we represent the relations x1,x2,x3 = (0,0,0)(0,1,1)(1,0,1)(1,1,0) X1,x2,x3,x4 = (1,0,0,0)(0,1,0,0) (0,0,1,0)(0,0,0,1) Most relations cannot be represented by networks: Number of relations 2^(k^n) Number of networks: 2^((k^2)(n^2)) Spring 2009

The minimal and projection networks The projection network of a relation is obtained by projecting it onto each pair of its variables (yielding a binary network). Relation = {(1,1,2)(1,2,2)(1,2,1)} What is the projection network? What is the relationship between a relation and its projection network? {(1,1,2)(1,2,2)(2,1,3)(2,2,2)}, solve its projection network? Spring 2009

Projection network (continued) Theorem: Every relation is included in the set of solutions of its projection network. Theorem: The projection network is the tightest upper bound binary networks representation of the relation. Spring 2009

Projection network Spring 2009

The Minimal Network (partial order between networks) Spring 2009

The N-queens constraint network. The network has four variables, all with domains Di = {1, 2, 3, 4}. (a) The labeled chess board. (b) The constraints between variables. Spring 2009

Figure 2.11: The 4-queens constraint network: (a) The constraint graph. (b) The minimal binary constraints. (c) The minimal unary constraints (the domains). Spring 2009

Minimal network The minimal network is perfectly explicit for binary and unary constraints: Every pair of values permitted by the minimal constraint is in a solution. Binary-decomposable networks: A network whose all projections are binary decomposable The minimal network repesenst fully binary-decomposable networks. Ex: (x,y,x,t) = {(a,a,a,a)(a,b,b,b,)(b,b,a,c)} is binary representable but what about its projection on x,y,z? Spring 2009