CPSC 3520 - DAY 9 FEBRUARY 8, 2018 ================================================================================ /*LISTPROCESS.PRO*/ someOper(X,R) :- R is X*X. listProcess([],[]). listProcess([AH|AT],[RH|RT]) :- someOper(AH,RH),listProcess(AT,RT). A binary constraint satisfaction problem is defined by -A set of variables -A domain of values for each variable -A set of constraints between each pair of variables. Often this binary constraint takes the form of a (binary) relation. -A solution of a CSP is a consistent assignment of all variables to values in such a way that all constraints are satisfied. -Note a CSP is consistent assignment of all variables to values in such a way that all the constraints are satisfied. -Note a CSP can have zero solutions, a unique solution (one) or many solution. -Many important applications, such as planning, resource scheduling, parsing and engineering design can be cast within the framework of Constraint satisfaction problems You could have many, no, one solutions. Labeling and Complexity Given n objects to be labelled and the set of m possible labels on each, note that, without further constraints, m^n possible and valid labeling solutions exist. Example Problems: image detection/labeling. Definition: Adjacency. For simplicity, first consider a single binary constraint, namely that of region adjacency. To regions which share a boundry are said to be adjacent. Adjacency is a symmetric relation which is easily depicted graphically via an adjacency graph. sky | | | car ---- road ----- trees \ / \ / \ / \ / grass Adjacency graph for allowed constraints