当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

《Artificial Intelligence:A Modern Approach》教学资源(PPT课件,英文版)Chapter 5-Constraint Satisfaction Problems

资源类别:文库,文档格式:PPT,文档页数:34,文件大小:385.5KB,团购合买
Constraint Satisfaction Problems (CSP) Backtracking search for CSPs Local search for CSPs
点击下载完整版文档(PPT)

Constraint Satisfaction Problems Chapter 5 Section 1 -3 4Feb2004 CS 3243-Constraint Satisfaction 1

4 Feb 2004 CS 3243 - Constraint Satisfaction 1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3

Outline Constraint Satisfaction Problems(CSP) Backtracking search for CSPs Local search for CSPs 4Feb2004 CS 3243-Constraint Satisfaction 2

4 Feb 2004 CS 3243 - Constraint Satisfaction 2 Outline ◼ Constraint Satisfaction Problems (CSP) ◼ Backtracking search for CSPs ◼ Local search for CSPs

Constraint satisfaction problems(CSPs) Standard search problem: state is a "black box"-any data structure that supports successor function,heuristic function,and goal test CSP: state is defined by variables X,with values from domain D goal test is a set of constraints specifying allowable combinations of values for subsets of variables Simple example of a formal representation language 4Feb2004 CS 3243-Constraint Satisfaction 3

4 Feb 2004 CS 3243 - Constraint Satisfaction 3 Constraint satisfaction problems (CSPs) ◼ Standard search problem: ◼ ◼ state is a "black box“ – any data structure that supports successor function, heuristic function, and goal test ◼ ◼ CSP: ◼ ◼ state is defined by variables Xi with values from domain Di ◼ ◼ goal test is a set of constraints specifying allowable combinations of values for subsets of variables ◼ ◼ Simple example of a formal representation language Allows useful general-purpose algorithms with more power

Example:Map-Coloring Queensland South Australia New South Wale Victoria Variables WA,NT Q NSW V SA,T Tasmania Domains D={red,green,blue} Constraints:adjacent regions must have different colors e.g.,WA NT or (WA NT)in {(red,green),(red,blue),(green,red), (green,blue),(blue,red),(blue,green) 4Feb2004 CS 3243-Constraint Satisfaction 4

4 Feb 2004 CS 3243 - Constraint Satisfaction 4 Example: Map-Coloring ◼ Variables WA, NT, Q, NSW, V, SA, T ◼ Domains Di = {red,green,blue} ◼ Constraints: adjacent regions must have different colors ◼ ◼ e.g., WA ≠ NT, or (WA,NT) in {(red,green),(red,blue),(green,red), (green,blue),(blue,red),(blue,green)} ◼

Example:Map-Coloring Northern Territory Queenslan New South Wa Tasmani Solutions are complete and consistent assignments, e.g.,WA red,NT green,Q red,NSW green,V red,SA blue,T green 口 4Feb2004 CS 3243-Constraint Satisfaction 5

4 Feb 2004 CS 3243 - Constraint Satisfaction 5 Example: Map-Coloring ◼ Solutions are complete and consistent assignments, e.g., WA = red, NT = green,Q = red,NSW = green,V = red,SA = blue,T = green ◼

Constraint graph Binary CSP:each constraint relates two variables Constraint gra :s are constraints NT WA SA NS W 4Feb2004 CS 3243-Constraint Satisfaction 6

4 Feb 2004 CS 3243 - Constraint Satisfaction 6 Constraint graph ◼ Binary CSP: each constraint relates two variables ◼ ◼ Constraint graph: nodes are variables, arcs are constraints ◼

Varieties of CSPs Discrete variables finite domains: n variables,domain size d)complete assignments e.g.,Boolean CSPs,incl.~Boolean satisfiability (NP-complete) infinite domains: integers,strings,etc. e.g.job scheduling,variables are start/end days for each job need a constraint language,e.g.,Startob,+5s StartJoba Continuous variables ■ e.g.,start/end times for Hubble Space Telescope observations linear constraints solvable in polynomial time by linear programming 4Feb2004 CS 3243-Constraint Satisfaction 7

4 Feb 2004 CS 3243 - Constraint Satisfaction 7 Varieties of CSPs ◼ Discrete variables ◼ ◼ finite domains: ◼ n variables, domain size d → O(d n ) complete assignments ◼ e.g., Boolean CSPs, incl.~Boolean satisfiability (NP-complete) ◼ infinite domains: ◼ integers, strings, etc. ◼ e.g., job scheduling, variables are start/end days for each job ◼ need a constraint language, e.g., StartJob1 + 5 ≤ StartJob3 ◼ Continuous variables ◼ ◼ e.g., start/end times for Hubble Space Telescope observations ◼ linear constraints solvable in polynomial time by linear programming

Varieties of constraints Unary constraints involve a single variable, ■e.g,SA+green Binary constraints involve pairs of variables, ▣e.g,SA+WA Higher-order constraints involve 3 or more variables, 4Feb2g,cryptarithretis olmssonsraints P

4 Feb 2004 CS 3243 - Constraint Satisfaction 8 Varieties of constraints ◼ Unary constraints involve a single variable, ◼ e.g., SA ≠ green ◼ ◼ Binary constraints involve pairs of variables, ◼ e.g., SA ≠ WA ◼ ◼ Higher-order constraints involve 3 or more variables, ◼ e.g., cryptarithmetic column constraints ◼

Example:Cryptarithmetic T WO +T WO FOUR o Variables:FTUW ROXXX3 ■Domains:{01,2,3,456☑8,y Constraints:Alldiff (FTU,WR,O) ◆ 0+0=R+10·X ■X+W+W=U+10:X2 4 Feb 2002=24Constraint Satisfaction 9 FT0厂0

4 Feb 2004 CS 3243 - Constraint Satisfaction 9 Example: Cryptarithmetic ◼ Variables: F T U W R O X1 X2 X3 ◼ Domains: {0,1,2,3,4,5,6,7,8,9} ◼ Constraints: Alldiff (F,T,U,W,R,O) ◼ ◼ O + O = R + 10 ·X1 ◼ ◼ X1 + W + W = U + 10 ·X2 ◼ ◼ X2 + T + T = O + 10 ·X3 ◼ X3 = F, T ≠ 0, F ≠ 0

Real-world CSPs Assignment problems e.g.,who teaches what class Timetabling problems ◆ e.g.,which class is offered when and where? Transportation scheduling o Factory scheduling FeNetice that mamy sreafowerletiproblems involve real-10

4 Feb 2004 CS 3243 - Constraint Satisfaction 10 Real-world CSPs ◼ Assignment problems ◼ e.g., who teaches what class ◼ ◼ Timetabling problems ◼ ◼ e.g., which class is offered when and where? ◼ ◼ Transportation scheduling ◼ ◼ Factory scheduling ◼ ◼ Notice that many real-world problems involve real￾valued variables

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共34页,可试读12页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有