1 / 4

Constraint Satisfaction

Constraint Satisfaction. Definition . A constraint is a formula of the form: (x = y) (x  y) (x = red) (x  red) Where x and y are variables that can take values from a set (e.g., {yellow, white, black, red, …}) Definition . A constraint formula is a collection of constraints.

chuong
Télécharger la présentation

Constraint Satisfaction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Constraint Satisfaction • Definition. A constraint is a formula of the form: • (x = y) • (x  y) • (x = red) • (x  red) • Where x and y are variables that can take values from a set (e.g., {yellow, white, black, red, …}) • Definition. A constraint formula is a collection of constraints. • Definition. Given a constraint formula is there an instantiation of the variables that makes the formula true • Example: ( x = y)  ( x  z)  (y  z) • Definition.Constraint-SAT: given a constraint formula, is there an instantiation of the variables that makes the conjunction true?

  2. Example of a CSP Problem T[1,1] • 8-queens problem: • Put 8 queens in a chess board such that no queen is threatening another queen • Modeling the 8-queens problem as a CSP problem: • Make 8 variables, one for every queen: Q1, Q2, …, Q8 • Assume that each variable can take a value T[1,1]…T[8,8] • Constraints: homework. See slide 4 T[8,8]

  3. Graph Coloring • Given a graph, we want to: • Assign a color to each node • No two nodes that are connected have the same color assigned to them • We want to use the minimum number of colors possible that satisfiers 1 and 2

  4. Homework Part I: Nov. 15 • CSE 435: Write the constraints for the 8-queen problem. To make things easier use more expressive constraints: • i  j : Q4 = A[i,j] • k if Q3 = A[i,j] then k  j • CSE 335: write pseudo-code of program that receives Q1,…,Q8 and checks if it solves the 8-queen problem • CSE 435: • Formulate Graph coloring as a decision problem • Show that Constraint-SAT can be polynomially transformed into Graph Coloring (that is, we can transform constraint-SAT into a Graph coloring problem, and this transformation can be done in polynomialm time)

More Related