Complexity Analysis of Mixed Constraint Satisfaction Problems

This paper analyzes the resolution complexity of a random CSP model named model RB, the instance of which is composed by constraints with different length. For model RB, the existence of phase transitions has been established and the threshold points have been located exactly. By encoding the random instances into CNF formulas, it is proved that almost all instances of model RB have no tree-like resolution proofs of less than exponential size. Thus the model RB can generate abundant hard instances in the threshold. This result is of great significance for algorithm testing and complexity analysis in NP-complete problems.


Introduction
Constraint satisfaction problem (CSP) is originated from artificial intelligence.It is a very important branch in the field of artificial intelligence, and it is a problem widely studied in computer science, information science, discrete mathematics and other interdisciplines.At present, a number of problems restricting the development of computer science, automatic control, system engineering and other disciplines can be modeled as CSPs.At the same time, CSPs are widely used in related application fields such as resource allocation, pattern recognition, temporal reasoning and image recognition.
CSP is composed of a set of variables and a set of constraints.Each variable takes a value from the corresponding non-empty domain.The number of elements in the domain can be fixed, or change with the number of variables.Each constraint has a corresponding incompatible assignment set to restrict the values of variables appearing in the constraint.The constraint set randomly selected constitutes a random instance of CSP.Given a random instance, if there exists an assignment to the variables satisfying all the constraints in the instance simultaneously, we call this assignment a solution.Usually, most of the CSPs are NP-complete problems.A lot of theoretical research and experimental results show that for many NP-complete problems we can define a control parameter (such as constraint density, constraint tightness, etc.).There is a critical value of the control parameter, below which the probability of an instance being satisfiable goes to 1, and above which it goes to 0 as the number of variables approaches infinity.People call this phenomenon the phase transition.The critical value is a satisfiability phase transition point.
Random k-SAT (k-satisfiability.Every clause of random k-SAT is randomly and independently generated.Each clause contains just k different variables) problem is a typical CSP with a fixed domain (The variable is Boolean, i.e. 0 and 1 or T and F), and the first NP-complete problem proved by Cook. Research shows that when 2 k = , 2-SAT is in P class [1] [2].We can get the satisfiability phase transition point 1 α = ( α represents the ratio of the number of con- straints and the number of variables).When 3 k ≥ , it belongs to NP-complete problem [3].Although the phase transition phenomenon has been established, it is hard to get the accurate phase transition point rigorously.The currently known upper and lower bound of the phase transition region of the 3-SAT problem is 4.4898 [4] and 3.52 [5], respectively.It is shown by Mertens et al. that the satisfiability phase transformation of 3-SAT problem occurs near 4.2667 [6] experimentally.In order to study the transition behavior between P and NPcomplete problem, Monasson et al. [7] proposed the model ( ) Model RB (Revised B) is a nontrivial random CSP with growing variable domain.Specifically, in order to overcome the trivial gradual unsolvability of model B in the standard model CSP [9] [10] (that is the binary model CSP), Xu et al.
proposed a new CSP model, i.e. model RB [11].This model is a modification of model B in terms of domain of variables and the number of constraints, which avoids model B's disadvantage of failure to generate hard instances.In [11], it has been strictly proved that phase transitions do exist for model RB as the number of variables approaches infinity.Moreover, the phase transition points are also known exactly.Later, Xu et al. theoretically proved that random instances generated by model RB in phase transition region had the exponential tree-like resolution complexity, which meant that these instances were almost all X.M. Shi hard [12].Later, an experiment also proved that near the phase transition threshold the hardness of finding solutions grows exponentially with the problem size [13].Therefore, hard instances generated based on model RB are widely applied in all kinds of algorithm competitions such as CSP and SAT [14]

Model RB mix
The random instance of model RB mix is composed of the variable set , where ln m rn n = ( 0 r > is called the constraint density).Each variable i x takes values from its corresponding domain i D .Here, means that the domain of variables grows polynomially with the variable number n.We divide m constraints into  groups.Each group contains ln Here, The constraints in each group are generated in the following way.
Step 1: i m i k -ary constrains are selected randomly and repeatably ( Each i k -ary constrain is composed of i k different variables selected randomly from n variable sets.Here, i k is called the constraint length. Step ( ) Theorem 2 Assume that ( ) From the above two theorems, we can know that under the condition that the domain of variables is not too small ( 1 which means that model RB mix has the satisfiability phase transition phenomenon, and it can get the accurate phase transition point.Therefore, model RB mix is a mixed random CSP with accurate phase transition and a large domain.

Main Results
Assume that I is a random instance generated by model RB mix .We can get the following theorem.Theorem 3 If s p p > , then I almost has no resolution proof of the length less than As we know, for the unsatisfiable random instance I, there must be the shortest resolution proof which can reason empty clauses.Its length is the lower bound of time consumed by any algorithm based on the resolution principle.Therefore, from Theorem 3 we can know that the solution algorithm of unsatisfiable instances of model RB mix has the complexity of exponential size.Thus in the phase transition region model RB mix can generate a large number of hard instances.

Proof of Theorem 3
This paper uses the resolution method to analyze the complexity of model RB mix .The general form is CNF formula for SAT problem.The so-called CNF formula refers to the conjunction expression ( ∧ ) of clause (disjunctive form ∨ of posi- tive literal l or negative literal l ¬ ).Therefore, we first must encode the ran- dom instance I of model RB mix according to a certain rules into CNF formula, then the resolution complexity of I is the complexity of the corresponding CNF formula.
In model RB mix , assume that the domain of each variable i x is The following three types of clauses are required to encode I into CNF formula.
(1) Clauses of the domain： Each variable i x is taken from its domain i D , i.e.
A value clause at most: Ensure that each variable takes a value from its domain at most at a time, i.e.
(3) Conflicted clause: It is used to remove the assignment in the uncoordinated set, so that the constraint is satisfied.For example, { } 3, 5 is an element in the uncoordinated assignment set limiting the value of 1 x and 2 x .Then the conflicted clause is  G π is a tree, π is called the tree-like resolution.
For the unsatisfiable formula F, there must be the shortest resolution proof deriving  .Its length is the lower bound of time consumed by any algorithm based on the resolution principle.
Ben-Sasson and Wigderson gave the following theorem used to prove the lower bound of the resolution length of CNF formula [23].
Theorem 4 Assume that F is a CNF formula with n variables, then we have: We want to use Theorem 4 to prove the important conclusion Theorem 3 in this paper.We need to use the following five lemmas.
Before giving Lemma 1, we first give the following definition.Definition 6 (Subproblem) Assume that I is an instance of a CSP, then the instance composed of subsets of constraint set in I is called a subproblem of I.
Lemma 1 Assume that I is a random instane generated by model RB mix , then For the sufficiently large n, here exists a constant 1 0 c > , so that ( ) Let ( ) ) ( ) Before giving Lemma 2, we first give the following definitions.
Definition 7 (i-constraint assignment group) Assume that i constraints contain variable x.If assignments are made for variables except x in i constraints, the such assignment group is called i-constraint assignment group, written as ix T .
Definition 8 (flawed i-constraint assignment) The assignment of given variable x is ) Next, let B = { ix T is not flawed}, then we have ( ) ( ) Pr Pr B σ = {σ is not flawed for ix T , x D σ ∈ }.It's worth noting that for model Here, ( ) And for 0,1, , j σ =  , we have ( ) ( ) From ( ) Pr 1 1 1 Because the maximum choices of i-constraint assignment group ix T are as follows ( ) ( ) ( ) , so when n is sufficiently large, constant 2 0 Thus, we have ( ) I at least contains one variable x with the maximum degree of ln n κβ (the degree of variable is defined as the number of constraints containing the variable).After x and constraints containing x are removed, the remaining subproblem 2 I can be satisfied ( So the maximum number of variables with the degree higher than 3 ln n κβ is 3 cn .Next, we will prove that these variables are in clause C.
Assume that variable x whose degree is not greater than not 3 ln n κβ is not in clause C. Assume that 2 I is the remaing subproblem after x and constraints containing x are removed.Because 1 I is the smallest subproblem, clause C cannot be derived from the corresponding CNF formula of 2 I .So any assign- ment of variable x does not meet the corresponding CNF formula of 1 I , and ix T is defective.This is contradictory with Lemma 2. So variables whose degree is not greater than 3 ln n κβ are all in clause C.
So ( ) The conclusion is established.
Finally, from Lemma 5 and Theorem 4, we can get Theorem 3.That is unsatisfiable random instances generated by model RB mix have no resolution proof whose complexity is less than the exponential size.

Conclusion
In

ing with 2 - 2 -
clause and 3-clause.Here, clauses and pm 3-clauses.Obviously, when 0 p = , it is a 2-SAT problem, and when 1 p = , it is a 3-SAT problem.Later, It is rigorously proved by Achlioptas et al.[8] that when 2 5 p < the model had transition characteristics similar to those of 2-SAT problem, and we could get the exact satisfiability phase transition point.When 2 5 p ≥, the model has transition characteristics similar to those of 3-SAT problem, and we can't get the exact phase transition point.This means that phase transition characteristics of model ( )2 p + -SAT are determined by the ratio of 2-clauses and 3-clauses.
is determined by the proportion of 2-clauses and 3-clauses, while the phase transition phenomenon of model RB mix has nothing to do with the number of constraints with different lengths.It has been proved that model RB mix mixed with constraints with different lengths has the exact satisfiability phase transition phenomenon similar to that of model RB, and the phase transition points can be located exactly.We know that if the new model CSP has the exact satisfiability phase transition phenomenon and can generate a large number of hard instances, the model has important significance for testing of CSP algorithm.For model RB mix , we use the resolution method (its general form is for logic formula) to encode random instances generated by model RB mix into the conjunctive normal form in SAT problem, i.e.CNF formula.By using five lemmas, we prove a famous theorem about the resolution length.Therefore, it is proved that the random instances generated by model RB mix almost have no resolution complexity for which the resolution length is less than the exponential size.This shows that model RB mix is hard for algorithms based on resolution, so model RB mix can generate a large number of hard instances in the phase transition region.It is proved in this paper that almost all instances of model RB mix have no tree-like resolution proofs of less than exponential size.Thus, we not only introduce new families of random CSP instances hard to solve, which can be useful in the experimental evaluation of CSP algorithms, but also propose a CSP model with both many hard instances and exact phase transitions.
as long as the constraint tightness is low enough or the constraint density is big enough ( ln r k α ≥ ), when n → ∞ , with the continuous increase of r or p, The probability of a random instance generated by model RB mix being satisfiable suddenly changes from 1 to 0, X. M. Shi

Definition 1 ( 2 ( 3 (
Length of the clause) The number of variables appearing in Clause C is called length of C , written as Length of CNF) The maximum length of all the clauses in F of CNF formula F is called the length of F, i.e.Resolution) The clause sequence

.
, so that almost every subproblem with the size of s cn ≤ Here, the subproblem with the size of s refers to s variables contained in the subproblem of I.Proof Assume that A = {I has at least 0 ln m s n β = constraints and a subproblem with the size of s cn ≤ }.We prove that

Lemma 3
Assume that I is a random instance generated by model RB mix , then almost any subproblem with the size of s cn ≤ of I can be satisfied.Proof Assume that I has the unsatisfiable subproblem with the size of s cn ≤ in I is, and the minimum unsatisfiable subproblem is 1 I .According toLemma 1, this paper, we analyze the resolution complexity of a mixed constraint satisfaction problem named model RB mix .It is theoretically proved that unsatisfiable random instances generated by model RB mix almost have no complexity whose resolution length is smaller than the exponential size.As a result, based on the resolution algorithm the random instance of model RB mix has complexity of exponential size.The conclusion shows that model RB mix with different length constraints not only has accurate satisfiability phase transition phenomenon, but also can generate a large number of hard instances in the phase transition region.Therefore, model RB mix is a large-domain nontrivial random constraint satisfaction problem with mixed constraints and accurate phase transition.In the later work, we can also verify the hardness of model RB mix in the experiment, and further study the solving algorithm.
Derived length) The length for C is derived from F is the minimum length of π , written as ( ) t C C = ) is called a resolution in which C is derived from F. If and only if each i C be- longs to F, or i C is derived from j C and k C (1 , node of clause.In which,  is the root node, the child nodes are two clauses with which we can reason out  , until the leaf node.Obviously, the clause complexity of leaf node ( ) ( ln i n κβ ≤), so that 2 I can be satisfied, but 1 I is unsatisfiable.In means that forx D σ ∀ ∈ ( ), ix T σ cannot make 1 I satisfiable, so ix T is defective.There- fore, for ln i n κβ ≤ I has a flawed ix T , which is contradictory with Lemma 2, so the assumption is not established.Thus, Lemma 3 is proved.