DOC PREVIEW
CORNELL CS 4700 - Constraint Satisfaction

This preview shows page 1-2-3-26-27-28 out of 28 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 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 28 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 28 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 28 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 28 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 28 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Constraint SatisfactionMoving to a different formalism… SEND + MORE ------ MONEY Consider state space for cryptarithmetic (e.g. DFS). Is this (DFS) how humans tackle the problem? Human problem solving appears more sophisticated! For example, we derive new constraints on the fly. → little or no search!Constraint Satisfaction Problems (CSP) A powerful representation for (discrete) search problems A Constraint Satisfaction Problem (CSP) is defined by: X is a set of n variables X1, X2,…, Xn each defined by a finite domain D1, D2,…Dn of possible values. C is a set of constraints C1, C2,…, Cm. Each Ci involves a subset of the variables; specifies the allowable combinations of values for that subset. A solution is an assignment of values to the variables that satisfies all constraints.Cryptarithmetic as a CSP Variables: 1 2 3112233{0,...,9}; {0,...,9};0 {0,...,9};{0,...,9}; {0,...,9}; {0,...,9};{0,...,9}; {0,...,9}; {0,...,9};0 0 10*10*10*each letter has a different digit TWF U RX X XRXX W W U XX T T O XXF              Constraints:(F T,F U,etc.); TWO + TWO FOUR  Auxiliary variables 1 1 1Unary Constraints: Restriction on single variable Binary Constraints: Restriction on pairs of variables Higher-Order Constraints: Restriction on more than two variables Preferences vs. Constraints Types of ConstraintsMap Coloring Problem Western Australia Northern Territory Queensland New South Wales South Australia Victoria TasmaniaConstraint Hypergraph TWO + TWO FOUR T U W R O X2 F X1 X3Types of variables • Discrete domains – Boolean {T,F}  3-Sat, K-Sat – Finite domains {a,b,c…} – Infinite (e.g. all integers) • constraints represented using language, • e.g. X<Y, Y>Z+5 • Continuous domains – Linear  linear programming – NonlinearConstraint Satisfaction Problems (CSP) For a given CSP the problem is one of the following: 1. find all solutions 2. find one solution · just a feasible solution, or · A “reasonably good” feasible solution, or · the optimal solution given an objective 3. determine if a solution existsInitial State - state in which all the variables are unassigned. Successor function - assign a value to a variable from a set of possible values. Goal test - check if all the variables are assigned and all the constraints are satisfied. Path cost - assumes constant cost for each step How to View a CSP as a Search Problem?Branching Factor Approach 1- any unassigned variable at a given state can be assigned a value by an operator: branching factor as high as sum of size of all domains. Approach 2 - since order of variable assignment not relevant, consider as the successors of a node just the different values of a single unassigned variable: max branching factor = max size of domain. Prefer BFS or DFS? B=BFS D=DFSCSP – Goal Decomposed into Constraints Backtracking Search: a DFS that • chooses values for variables one at a time • checks for consistency with the constraints. Decisions during search: • Which variable to choose next for assignment. • Which value to choose next for the variable.Example WA=red NT=green Q=blue WA=green WA=red NT=green Q=red WA=red NT=green WA=red NT=blue WA=blue WA=redMinimum Remaining Values (MRV) • Idea: Assign most constrained variable first • Prune impossible assignments fairly early • Degree heuristic: choose higher degree first Which is best order according to MRV heuristic? – A = NT, SA, WA, Q, NSW, V, T – B = T, V, SA, NSW, WA, NT, Q – C = SA, Q, NSW, V, NT, WA, TForward Checking • Idea: Reduce domain of unassigned variables based on assigned variables. • Each time variable is instantiated, delete from domains of the uninstantiated variables all of those values that conflict with current variable assignment. • Identify dead ends without having to try them via backtracking • E.g. if last variable has zero options, no need to go that deep to find outGeneral Purpose Heuristics Variable and value ordering: Degree heuristic: assign a value to the variable that is involved in the largest number of constraints on other unassigned variables. Minimum remaining values (MRV): choose the variable with the fewest possible values. Least-constraining value heuristic: choose a value that rules out the smallest number of values in variables connected to the current variable by constraints.Comparison of CSP Algorithms Problem BT BT+MRV BT+FC BT+FC+MRV USA (>1,000K) (>1,000K) 2K 60 N-queens (>40,000K) 13,500K (>40,000K) 817KConstraint Propagation (Arc Consistency) • Arc Consistency - state is arc-consistent, if every variable has some value that is consistent with each of its constraints (consider pairs of variables)Constraint Propagation (Arc Consistency) • Arc Consistency - state is arc-consistent, if every variable has some value that is consistent with each of its constraints (consider pairs of variables)Example: Arc Consistency Task: 3-color Solution:Constraint Propagation (K-Consistency) • K-Consistency generalizes arc-consistency (2-consistency). • Consistency of groups of K variables. • Path consistencyConstraint learning • When assignments fail, is there a way to learn new constraints? – Conflict-directed back-jumping looks to find the root cause of a failure and adds it as a new constraintSubstructureMore substructure: SymmetriesLocal Search for CSPs + = 2 1 2 3 1 2 2 2 3 2 3 0 2 2Remarks Dramatic recent progress in Constraint Satisfaction. Methods can now handle problems with 10,000 to 100,000 variables, and up to 1,000,000


View Full Document

CORNELL CS 4700 - Constraint Satisfaction

Download Constraint Satisfaction
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 Constraint Satisfaction 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 Constraint Satisfaction 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?