DOC PREVIEW
CMU CS 15381 - Lecture5-(CSPs)

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Constraint satisfaction basically boils down to graph coloring.2Graph coloring is NP complete, so any solution is *worst case* exponential time.This is a valid 4-coloring…we’re just not using the 4thcolor!3Note map coloring can be defined as graph coloring. Each state in map is represented as a node in the graph, with edges between nodes if the states are adjacentAll map coloring can be represented as graph coloring, but not all graph coloring can be represented as map coloring. This is because maps are planar graphs.4Complete: every state is colored. Consistent: it’s a valid soln.5Binary CSP can usually be expressed as a graph, because each edge has 2 endpoints, so each edge can be one constraint.6Example ([(V2,V3),{(R,B),…}]): the possible values the tuple (V2,V3) can take7The second example is an easier way to write the first.Higher order example: allDif(X,Y,Z)allDif(X,Y,Z) means X,Y, and Z all must be different.8Note you can convert any CSP to binary. Ex: diff(X,Y,Z)  diff(X,Y), diff(Y,Z), 9diff(Z,X)When you convert to binary, # of constraints can blow upi: column10Qi: row1112131415In addition to what we said before, need to wait for Oi1to finish before Oi2can start, 1612etc.Sij: start time for operation j of job i17jTij: duration of operation j of job i18How to use DFS? For example, you’d have a tree with root as start state, children 19as V1=red, V1=blue, V1=green, and then branch out on V2, etc.How many possible successors? Number of colors.20You’ll get to the bottom of the tree and have to backtrack because you made a dumb assignment.You can check if V1 and V2 don’t violate.How do you pick which node to explore next? Choose the most constrained node. But we’re not going to get that smart yet.212223This can be really slow.2425This works slightly better than DFS.26Place X’s in places that can’t be red anymore. If V1 is red, then V2V4and V5can’t 271 245be assigned red.282930The X’s mean there are whole branches of the search tree that we don’t look at. 31We still need to backtrack, but this is much more efficient. This is an example of pruning a search tree (chopping off branches)32This is even better.33343536Uh oh, V5 can only be one color. Take it. This is a key difference37Now that you set V5, V4can now only be one color!383940Fail-first is good, because you don’t waste your time looking at branches of the 41search tree that can’t possibly work.Pick green for V3as it adds no new constraints (We already know that V4can’t be


View Full Document

CMU CS 15381 - Lecture5-(CSPs)

Documents in this Course
Planning

Planning

19 pages

Planning

Planning

19 pages

Lecture

Lecture

42 pages

Lecture

Lecture

27 pages

Lecture

Lecture

19 pages

FOL

FOL

41 pages

lecture

lecture

34 pages

Exam

Exam

7 pages

Lecture

Lecture

22 pages

Handout

Handout

11 pages

Midterm

Midterm

14 pages

lecture

lecture

83 pages

Handouts

Handouts

38 pages

mdp

mdp

37 pages

HW2

HW2

7 pages

nn

nn

25 pages

lecture

lecture

13 pages

Handout

Handout

5 pages

Lecture

Lecture

27 pages

Lecture

Lecture

62 pages

Lecture

Lecture

5 pages

Load more
Download Lecture5-(CSPs)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture5-(CSPs) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture5-(CSPs) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?