Chapter 2) CSP solving-An overview.ppt
《Chapter 2) CSP solving-An overview.ppt》由会员分享,可在线阅读,更多相关《Chapter 2) CSP solving-An overview.ppt(25页珍藏版)》请在麦多课文档分享上搜索。
1、Chapter 2) CSP solving-An overview,Overview of CSP solving techniques: problem reduction, search and solution synthesis Analyses of the characteristics of CSPs Explanation of how these characteristics could be exploited in solving CSPs Looking at features of CSPs for solving CSPs efficiently,Soundne
2、ss and completeness,Definition 2-1: An algorithms is sound if every result that is returned by it is indeed a solution; in CSPs, that means any compound label which is returned by it contains labels for every variable, and this compound label satisfies all the constraints in the problem.Definition 2
3、-2: An algorithm is complete if every solution can be found by it.,Domain specific vs. general algorithm,Efficiency can be gained by encoding domain specific knowledge into the problem solver. (ex. One can find algorithms which solve N-queens problem more efficiently) Good reasons for studying gener
4、al algorithms Tailor made algorithms are costly Tailored algorithms are limited to the problems for which they are designed General algorithms can often form the basis for the development of specialized algorithms,Types of algorithms in CSP,Three types of algorithms Problem reduction (filtering or p
5、re-processing) Search (to find solutions) Solution synthesis (bottom up building of solutions),Problem reduction,A class of techniques for transforming a CSP into problems which are hopefully easier to solve or recognizable by reducing the size of the domains and constraints. Useful when used togeth
6、er with search or problem synthesis methods.Definition 2-3: We call two CSPs equivalent if they have identical sets of variables and identical sets of solution tuples. Definition 2-4: A problem P=(Z,D,C) is reduced to P=(Z,D,C) if (a) P and P are equivalent; (b) every variables domain in D is a subs
7、et of its domain in D; and (c ) C is more restrictive than, or as restrictive as, C (i.e. all compound labels that satisfies C will satisfy C). We write the relationship between P and P as reduced(P,P).,Problem reduction,If constraints are seen as sets of compound labels Reducing a problem = removin
8、g elements from the constraints If constraints are seen as functions Reducing a problem = modifying the constraint functionsDefinition 2-5: A value in a domain is redundant if it is not part of any solution tuple.Because the removal of them from their corresponding domains does not affect the set of
9、 solution tuples in the problemDefinition 2-6: A compound label in a constraint is redundant if it is not a projection of any solution tuple.,Reduction of a problem,Reason of the possibility because the domains and constraints are specified in the problems, and that constraints can be propagated.Inv
10、olvement of two possible tasks (1) removing redundant values from the domains of the variables; (2) tightening the constraints so that fewer compound labels satisfy them.Reduced problems are possibly easier for the following reasons (1) the domains of the variables in the reduced problem are no larg
11、er than the domains in the original problem. (2) the constraints of the reduced problem are at least as tight as those in the original problem.,Minimal problems,Definition 2-7: A graph which is associated to a binary CSP is called a minimal graph if no domain contains any redundant values and no con
12、straint contains any redundant compound labels. In other words, every compound label in every binary constraint appears in some solution tuples. Definition 2-8: A CSP is called a minimal problem if no domain contains any redundant values and no constraint contains any redundant compound labels.Reduc
13、ing a problem to its minimal problem can be done by creating dummy constraints for all combinations of variables, and tightening each constraint to the set of compound labels. However, doing so is in general NP-hard, so most problem reduction algorithms limit their efforts to removing only those red
14、undant values and compound labels which can be recognized relatively easily.,Simple backtracking,Z: variables * time complexity= O(|D|Z| * |C|) D: domain * space complexity= ?O(|Z| * |D|) orO(|Z|) if CompLabl is global, orO(|Z|2) if Copied on each recursion C: constraints COMPOUND_LABEL: all the set
15、s of variable that is marked Backtracking(Z, COMPOUND_LABEL, D, C) if Z = return;pick one variable x from Z;repeat pick one value v from Dx;Delete v from Dx;if (COMPOUND_LABEL + violates no constraintsResult = Backtracking(Z-x, COMPOUND_LABEL+, D, C);if (Result NIL) return(Result); until (Dx)return(
16、NIL); ,Characteristics of CSPs search space,There are properties of CSPs which differentiate them from general search problems, which makes problem reduction possible in CSPs. The size of the search space is finite if we assume that the variables are ordered as x1, x2,xn, the number of nodes follows
17、 the formula in page 41. If the variables were ordered by their domain sizes in descending order, then the number of nodes in the search space would be maximal, upper bound. If the variables were ordered by their domain sizes in ascending order, then the number of nodes in the search space would be
18、minimal. The depth of the tree is fixed (ordered var: n, unordered: 2n) Subtrees are similar experiences in searching one subtree may be useful in searching its siblings,Problem reduction and search,Characteristics of problem reduction Pruning off search spaces that contain no solution Reducing the
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CHAPTER2CSPSOLVINGANOVERVIEWPPT
