Constraint satisfaction problems involve finding values for variables that satisfy constraints or rules. They have a set of variables, domains for the variables, and constraints on the variables. Common constraint types include unary, binary, and global constraints. Constraint propagation techniques like node consistency and arc consistency are used to infer constraints. Local search algorithms iteratively modify variable values to find solutions. Cryptarithmetic problems are a type of constraint satisfaction problem involving substituting digits with symbols in arithmetic equations.
Constraint satisfaction problems involve finding values for variables that satisfy constraints or rules. They have a set of variables, domains for the variables, and constraints on the variables. Common constraint types include unary, binary, and global constraints. Constraint propagation techniques like node consistency and arc consistency are used to infer constraints. Local search algorithms iteratively modify variable values to find solutions. Cryptarithmetic problems are a type of constraint satisfaction problem involving substituting digits with symbols in arithmetic equations.
Constraint satisfaction is a technique where a problem is solved when its values satisfy certain constraints or rules of the problem. Such type of technique leads to a deeper understanding of the problem structure as well as its complexity. Constraint satisfaction depends on three components, namely: •X: It is a set of variables. •D: It is a set of domains where the variables reside. There is a specific domain for each variable. •C: It is a set of constraints which are followed by the set of variables. Solving Constraint Satisfaction Problems The requirements to solve a constraint satisfaction problem (CSP) is: •A state-space •The notion of the solution. An assignment of values to a variable can be done in three ways: •Consistent or Legal Assignment: An assignment which does not violate any constraint or rule is called Consistent or legal assignment. •Complete Assignment: An assignment where every variable is assigned with a value, and the solution to the CSP remains consistent. Such assignment is known as Complete assignment. •Partial Assignment: An assignment which assigns values to some of the variables only. Such type of assignments are called Partial assignments. Types of Domains in CSP There are following two types of domains which are used by the variables : •Discrete Domain: It is an infinite domain which can have one state for multiple variables. For example, a start state can be allocated infinite times for each variable. •Finite Domain: It is a finite domain which can have continuous states describing one domain for one specific variable. It is also called a continuous domain. Constraint Types in CSP With respect to the variables, basically there are following types of constraints: •Unary Constraints: It is the simplest type of constraints that restricts the value of a single variable. •Binary Constraints: It is the constraint type which relates two variables. A value x2 will contain a value which lies between x1 and x3. •Global Constraints: It is the constraint type which involves an arbitrary number of variables. Some special types of solution algorithms are used to solve the following types of constraints: •Linear Constraints: These type of constraints are commonly used in linear programming where each variable containing an integer value exists in linear form only. •Non-linear Constraints: These type of constraints are used in non- linear programming where each variable (an integer value) exists in a non-linear form. Constraint Propagation In local state-spaces, the choice is only one, i.e., to search for a solution. But in CSP, we have two choices either: •We can search for a solution or •We can perform a special type of inference called constraint propagation. There are following local consistencies which are discussed below: •Node Consistency: A single variable is said to be node consistent if all the values in the variable’s domain satisfy the unary constraints on the variables. •Arc Consistency: A variable is arc consistent if every value in its domain satisfies the binary constraints of the variables. •Path Consistency: When the evaluation of a set of two variable with respect to a third variable can be extended over another variable, satisfying all the binary constraints. It is similar to arc consistency. •k-consistency: This type of consistency is used to define the notion of stronger forms of propagation. Here, we examine the k-consistency of the variables. In constraint satisfaction, local search is an incomplete method for finding a solution to a problem. It is based on iteratively improving an assignment of the variables until all constraints are satisfied. In particular, local search algorithms typically modify the value of a variable in an assignment at each step. The new assignment is close to the previous one in the space of assignment, hence the name local search. All local search algorithms use a function that evaluates the quality of assignment, for example the number of constraints violated by the assignment. This amount is called the cost of the assignment. The aim of local search is that of finding an assignment of minimal cost, which is a solution if any exists. Crypt arithmetic Problem is a type of constraint satisfaction problem where the game is about digits and its unique replacement either with alphabets or other symbols. In crypt arithmetic problem, the digits (0-9) get substituted by some possible alphabets or symbols. The task in cryptarithmetic problem is to substitute each digit with an alphabet to get the result arithmetically correct. The rules or constraints on a cryptarithmetic problem are as follows: •There should be a unique digit to be replaced with a unique alphabet. •The result should satisfy the predefined arithmetic rules, i.e., 2+2 =4, nothing else. •Digits should be from 0-9 only. •There should be only one carry forward, while performing the addition operation on a problem. •The problem can be solved from both sides, i.e., lefthand side (L.H.S), or righthand side (R.H.S)