Catalan Satisfiability Problem^{1}
Abstract
An tree is usually a binary plane tree, with internal nodes labelled by logical connectives, and with leaves labelled by literals chosen in a fixed set of variables and their negations. In the present paper, we introduce the first model of such Catalan trees, whose number of variables is a function of , the size of the expressions. We describe the whole range of the probability distributions depending on the functions , as soon as it tends jointly with to infinity. As a byproduct we obtain a study of the satisfiability problem in the context of Catalan trees.
Our study is mainly based on analytic combinatorics and extends the Kozik’s pattern theory, first developed for the fixed Catalan tree model.
Keywords:
Random Boolean expressions; Boolean formulas; Boolean functions; Probability distribution; Satisfiability; Analytic combinatorics.1 Introduction
Since years many scientists of different areas, e.g. computer scientists, mathematicians or statistical physicists, are studying satisfiability problems (like SAT problems) and some questions that arise around them: for example, phase transitions between satisfiable and unsatisfiable expressions or constraints satisfaction problems. The classical 3SAT problem takes into consideration expressions of a specific form: conjunction of clauses that are themselves disjunctions of three literals. The literals are chosen among a finite set whose size is linked to the size of the expression. Then one question consists of deciding if a large random expression is satisfiable or not. Actually we know among other things, see [1] for example, that the satisfiability problem is related to the ratio between the size of the expression and the number of allowed literals. There is a phase transition such that, when the ratio is smaller than a critical value, the random expression is satisfiable with probability tending to when the size of the expression tends to infinity, while when the ratio is larger than the critical value, the probability tends to .
An interesting paper [2] about constraints satisfaction problems deals with random expressions. Using generating functions, in the context of analytic combinatorics’ tools, the authors describe precisely the phase transition between satisfiable and unsatisfiable expressions.
Still dealing with Boolean expressions, but in a completely distinct direction, researchers have studied the complete probability distribution on Boolean functions induced by random Boolean expressions. The first approach, by Lefmann and Savický [3], consists in fixing a finite set of variables, allowing the two logical connectives and and choosing uniformly at random a Boolean expression of size in this logical system. Their model is usually called the Catalan model. Lefmann and Savický first proved the existence of a limiting probability distribution on Boolean functions when the size of the random Boolean expressions tends to infinity. Since the seminal paper by Chauvin et al. [4], almost all quantitative studies of such Boolean distributions are deeply related to analytic combinatorics: a survey by Gardy [5] provides a wide range of models with various numerical results. Later, Kozik [6] proved a strong relation between the limiting probability of a given function and its complexity (i.e. the minimal size of an expression representing the function). His approach lies in two separate steps: (i) first let the size of the Boolean expressions taken into consideration tend to infinity, and then (ii) let the number of variables used to label the expressions tend to infinity. His powerful machinery, the pattern theory, easily classifies and counts large expressions according to structural constraints. The main objection to this model is about the two consecutive limits that cannot be interchanged: the number of allowed variables cannot depend on the size of the expressions. Genitrini and Kozik have proposed another model [7, 8] that allows to understand the bias by constructing random Boolean expressions built on an infinite set of variables. However, according to our knowledge, no possibility to link the number of variables to the size has yet been presented, and understanding satisfiability problems in this context is not yet possible.
Our paper extends the Catalan model in order to fit in the satisfiability context. By using an equivalence relationship on Boolean expressions, we manage to let both the number of variables and the size of expressions tend jointly to infinity. The number of variables is a function of the size of the expressions and thus we deal with satisfiability in the context of Catalan expressions. Furthermore by extending the techniques of Kozik, we describe in details the probability distribution on functions and exhibit some threshold for the latter distribution: as soon as the number of variables is large enough compared to the size of the expressions, the general behaviour of the induced probability on Boolean functions does not change by adding more variables.
The paper is organized as follows. Section 2 introduces our unified model based on an equivalence relationship of Boolean expressions. Then, Section 3 states our three main results: (1) the satisfiability question for random Catalan expressions; (2) the link between the probability of a class of functions and the complexity of the functions taken into account; (3) the behaviour of the probability related to the dynamic between the number of variables and the size of the expressions. Section 4 is devoted to the technical core of the paper. Finally Section 5 applies our approach to trees and proves the main results.
Almost all proofs are given in the appendices.
2 Probability distributions on equivalence classes of Boolean functions
2.1 Contextual definitions
A Boolean function is a function from into . The set of Boolean functions is denoted by . In the following, will be an element of . A variable can be negated (), and we call literal a variable or its negation. The two connectives taken into account, and , are respectively denoted by and .
An Boolean expression is seen as an tree i.e. a binary plane tree with leaves labelled by a literal and with internal nodes labelled by connectives. Each tree computes (or represents) a Boolean function. Obviously an infinite number of trees compute the same Boolean function. The size of an tree is its number of leaves: remark that, for all , there is an infinite number of trees of size .
The complexity of a Boolean function , denoted by , is defined as the size of its minimal trees , i.e. the smallest trees computing . Although a Boolean function is defined on an infinite set of variables, it may actually depend only on a finite subset of essential variables: given a Boolean function , we say that the variable is essential for , if and only if (where is the restriction of to the subspace of where ). We denote by the number of essential variables of . Remark that the complexity and the number of essential variables of a Boolean function are only related by the following inequality: .
2.2 Equivalence relationships
Analytic combinatorics’ tools (cf. [9]) are based on the notion of combinatorial classes. A combinatorial class is a denumerable (or finite) set of objects on which a size notion is defined such that each object has a nonnegative size and the set of objects of any given size is finite. Thus our class of trees is not a combinatorial class since there is an infinite number of trees of a given size. To use analytic combinatorics, we define an equivalence relationship on Boolean trees.
In the rest of the paper, we define a treestructure to be an tree in which leaves labels have been removed (but internal nodes remain labelled).
Definition 1
Let and be two trees. Trees and are equivalent if (1) their treestructures are identical, if (2) two leaves are labelled by the same variable in if and only of they are labelled by a same variable in , and if (3) two leaves are labelled by the same literal in if and only of they are labelled by a same literal in .
This equivalence relationship on Boolean trees induces straightforwardly an equivalence relationship on Boolean functions. For example, both functions and are equivalent. An important remark is that all functions of an equivalence class have the same complexity and the same number of essential variables. In the following, we will denote by the equivalence class of the Boolean function .
2.3 Probability distribution
Let be an increasing sequence that tends to infinity when tends to infinity. In the following, we only consider trees such that: for all , the set of variables that appear as leaflabels (negated or not) of a tree of size has cardinality at most . Remark that if for all , this hypothesis is not a restriction. Therefore, we will assume that , for all .
Definition 2
We denote by the number of equivalence classes of trees of size in which at most different variables appear as leaflabels. We define the ordinary generating function as .
Proposition 1
The number of classes of trees of size satisfies:
where is the number of non labelled binary trees
Proof
Once the treestructure of the binary tree is chosen (factor ), we partition the set of leaves into parts such that two leaves that belong to the same part are labelled by the same variable. It gives the contribution . Then, we choose to label each leaf by a positive or negative literal: contribution . The equivalence relationship states that a tree and the one obtained from it by replacing the positive literals corresponding to a fixed variable by its negation (and conversely) are equivalent. Thus, for each class we doublecount the number of trees: correction . ∎
Given a set of equivalence classes of trees and the number of elements of of size , we define the ratio of by . For a given Boolean function , we denote by the number of equivalence classes of trees of size that compute a function of , and we define the probability of as the ratio of :
One goal of this paper consists in studying the behaviour of the probabilities when the size of the trees tends to infinity.
3 Results
We state here our main result: the behaviour of for all fixed function in the framework of trees. Saying that is fixed means that its complexity (and its number of essential variables) is independent from .
The main idea of this part is that a typical tree computing a Boolean function is a minimal tree of in which has been plugged a large tree that does not distort the function computed by the minimal tree.
Since this main idea is identical in other framework (e.g. logic of implication [10]), we are convinced that many recent results in quantitative logics could be translated in our new model too.
Definition 3
Let be a fixed class of Boolean functions. We denote by (resp. ) the common complexity (resp. number of essential variables) of the functions of . The multiplicity of the class , denoted by , is the number : it corresponds to the number of repetitions of variables in a minimal tree of .
Theorem 3.1
Let be an increasing sequence of integers tending to when tends to . A random Catalan expression is satisfiable with probability tending to , when the size of the expression tends to infinity.
Theorem 3.2
Let be an increasing sequence of integers tending to when tends to . There exists a sequence such that (when tends to ) and such that, for all fixed equivalence class of Boolean functions , there exists a positive constant satisfying

if, for large enough , , then, asymptotically when tends to ,

if, for large enough , , then, asymptotically when tends to ,
Let us first remark that the constant is independent from (and from ).
Moreover both constant functions and are alone in their respective equivalence classes, and
their complexity is .
In the finite context [4, 6], each Boolean function is studied separately instead of being considered among its equivalence class. We can translate the result obtained by Kozik in terms of equivalence classes by summing over all Boolean functions belonging to a given equivalence class: remark that there are functions in the equivalence class of a given Boolean function , therefore, the result of Kozik is equivalent to: for all fixed Boolean function , asymptotically when tends to infinity,
Of course, the interchanging of both limits is not possible, but the finite model is not so far from being an extreme case
of our new model: the finite context looks like a degenerate case of our model where there
exists an fixed integer such that for all . However, remark that we assume in the present paper that tends to when tend to infinity: the case is thus not a particular case of our results.
4 Technical key points
In this section, we state the technical core of our results, and we demonstrate how a threshold does appear according to the behaviour of as tends to infinity.
4.1 Threshold induced by ’s behaviour
Definition 4
Let us define the following quantity: . The number quantitatively represents the labelling constraints of leaflabelling by variables (cf. Proposition 1).
The following proposition, which can be seen as some particular case of Bonferroni inequalities allows to exhibit bounds on .
In view of these inequalities and of the expression of (cf. Definition 4), it is natural to study the following sequences:
Lemma 1
Let be a positive integer.

The sequence is unimodal. More precisely, there exists a integer such that is strictly increasing on and strictly decreasing on .

Moreover, the sequence is increasing and asymptotically satisfies:
The proof of this lemma is postponed to Appendix A.
We are now ready, to understand the asymptotic behaviour of : roughly speaking, before the threshold (), is equivalent to the sum of a few of its last terms, and after , it is equivalent to the sum of a few terms around .
Lemma 2
Let be an increasing sequence such that for all integer and tends to when tends to .

If, for all large enough , , then, for all sequences such that and , we have, asymptotically when tends to ,
(1) 
If, for large enough , , then, for all sequences such that and , for all sequences such that , and , we have, asymptotically when tends to ,
(2)
This lemma is proved in Appendix A and allows us to deduce the following results on the behaviour of , when tends to :
Lemma 3
Let be a sequence of integers that tends to when tends to . Let us assume that for large enough , then, asymptotically when tends to infinity,
Lemma 4
Let be a sequence of integers that tends to when tends to . Let us assume that for large enough , then, asymptotically when tends to infinity,
4.2 Adjustment of Kozik’s pattern language theory
In 2008, Kozik [6] introduced a quite effective way to study Boolean trees: he defined a notion of pattern that permits to easily classify and count large trees according to some constraints on their structures. Kozik applied this pattern theory to study trees with a finite number of variables. This theory has then been extended to different models of Boolean trees (see for example paper [13]).
We adapt the definitions of patterns to our new model and then we extend results of Kozik’s paper.
Definition 6

A pattern is a binary tree with internal nodes labelled by or and with external nodes labelled by or . Leaves labelled by are called pattern leaves and leaves labelled by are called placeholders. A pattern language is a set of patterns

Given a pattern language and a family of trees , we denote by the family of all trees obtained by replacing every placeholder in an element from by a tree from .

We say that is unambiguous if, and only if, for any family of trees, any tree of can be built from a unique pattern from in which has been plugged trees from .
The generating function of a pattern language is , where is the number of elements of with pattern leaves and placeholders.
Definition 7
We define the composition of two pattern languages as the pattern language of trees which are obtained by replacing every placeholder of a tree from by a tree from .
Definition 8
A pattern language is subcritical for a family if the generating function of has a squareroot singularity , and if is analytic in some set for some positive .
Definition 9
Let be a pattern language, be a family of trees and a subset of , whose cardinality does not depend on . Given an element of ,

the number of its repetitions is the number of its pattern leaves minus the number of different variables that appear in the labelling of its pattern leaves.

the number of its restrictions is the number of its pattern leaves that are labelled by variables from , plus the number of its repetitions.
Definition 10
Let be the family of the trees with internal nodes labelled by a connective and leaves without labelling, i.e. the family of treestructures.
The generating function of satisfies , that implies and
thus its dominant singularity is .
We can, for example, define the unambiguous pattern language by induction as follows: , meaning that a pattern from is either a single pattern leaf, or a tree rooted by whose two subtrees are patterns from , or a tree rooted by whose left subtree is a pattern from and whose right subtree is a placeholder. Its generating function verifies, by symbolic arguments, and is equal to . It is thus subcritical for .
On the lefthand side of Fig. 1, we have depicted a Boolean tree that computes the constant function . It has pattern leaves, repetition and restrictions.
The following keylemma is a generalization of Kozik’s one [6, Lemma 3.8]:
Lemma 5
Let be an unambiguous pattern, and the families of trees. Let (resp. ) be the number of labelled (with at most variables) trees of of size and with repetitions (resp. at least Lrepetitions). We assume that is subcritical for the family of the unlabelledleaves trees. Then, asymptotically when tends to infinity,
Proof
The number of labelled trees of of size and with at least repetitions is given by:
where is the number of treestructures with Lpattern leaves and the number corresponds to the number of leaflabellings of these trees giving at least repetitions. The following enumeration contains some doublecounting and we therefore get an upper bound:
The factor corresponds to the polarity of each leaf (the variable labelling it is either negated or not); the index stands for the number of different variables involved in the repetitions; the binomial factor chooses the pattern leaves that are involved in the repetitions; the Stirling number partition splits leaves into parts; finally, the factor chooses which variable is assigned to each class of leaves. Therefore,
Let be the generating function of the pattern . Then, for all ,
Thus,
Since and have the same singularity because of the subcriticality of the pattern according to , the previous sum is constant when tends to infinity and so we conclude:
∎
5 Behaviour of the probability distribution
Once we have adapted the pattern theory to our model, we are ready to quantitatively study it. A first step is to understand the asymptotic behaviour of . It is indeed natural to focus on this “simple” function before considering a general class ; and moreover, it happens to be essential for the continuation of the study. In addition, the methods used to study tautologies (mainly pattern theory) will also be the core of the proof for a general equivalence class. We prove in this section the main Theorem 3.2 for both classes and of complexity zero, using the duality of both connectives and and both positive and negative literals. The main ideas of the proof for a general equivalence class will be detailed in Section 5.2, but the details will be postponed into Appendix D.
5.1 Tautologies
Let us recall that a tautology is a tree that represents the Boolean function . Let us consider the family of tautologies. In this part, we prove that the probability of is equivalent to the ratio of a simple subset of tautologies.
Definition 11 (cf. righthand side of Fig. 1)
A simple tautology is an tree that contains two leaves labelled by a variable and its negation and such that all internal nodes from the root to both leaves are labelled by connectives. We denote by the family of simple tautologies.
Proposition 3
The ratio of simple tautologies verifies
Moreover, asymptotically when tends to infinity, almost all tautologies are simple tautologies.
The detailed proof is given in Appendix B.
The latter proposition gives us for free the proof of Theorem 3.1. In fact, both dualities between the two connectives and positive and negative literals transform expression computing to expressions computing , which implies . Moreover, the only expressions that are not satisfiable compute the function and tends to as tends to infinity, which proves Theorem 3.1.
5.2 Probability of a general class of functions
With similar arguments than those used for tautologies, we prove that the probability of the class of projections (i.e. ) is equivalent to . The proof is detailed in Appendix C.
Let us turn now to the general result: the behaviour of for all fixed . The main idea of this part is that, roughly speaking, a typical tree computing a Boolean function in is a minimal tree of in which has been plugged a single large tree. Here we give the main ideas of the proof of Theorem 3.2, the complete proof is given in Appendix D.
Proof (sketch)
For a given class of Boolean functions our goal is to obtain an asymptotic equivalent to .

We first define several notions of expansions of a tree: the idea is to replace in a tree, a subtree by , where is chosen such that the expanded tree still computes the same function.

The ratio of minimal trees of expanded once is of the order of .

The ratio of trees computing a function from is equivalent to the ratio of minimal trees expanded once.
The most technical part of the proof is the last one, because we need a precise upper bound of . But the ideas are more or less the same as those developed for the class . ∎
6 Conclusion
We focus on the logical context of connectives because of the richness of this logical system (normal forms, functional completeness). However the implicational logical system (e.g. [10, 8]) could also be studied in this new context and we deeply believe the general behaviour to be identical. Indeed, the key idea is that each repetition induces a factor , and this remains true in all those models – although pattern theory does not adapt to every model, e.g. models with implication. Extending our results to these models would give nice unifications of the known results of the literature: papers [6, 10, 8] and [14, 13].
With our new model, we can now relate the large number of results that have been obtained during the last decade on quantitative logics to problems about satisfiability. Our Catalan model of expressions behaves differently since, asymptotically, almost all expressions are satisfiable, whatever the ratio between the number of variables and the size of expressions.
To conclude, the specific form of expressions in problems deeply bias the probability distribution on Boolean functions.
Appendix A Proofs of the technical core
Proof (of Lemma 1)
(i) Let us prove that the sequence is logconcave, i.e. that the sequence is decreasing. Let be an integer in . By Definition of :
and consequently, for all ,
The function is strictly decreasing.
Since tends to and tends to when tends to infinity,
there exists a unique such that is strictly increasing on
and strictly decreasing on .
(ii) Let us denote by the single solution of equation:
(3) 
First remark that the sequence is increasing. We indeed know: and , which implies that . Therefore, since is decreasing, we have that , for all large enough . Therefore, the sequence is asymptotically increasing.
Since, asymptotically when tends to infinity,
we have that and therefore, tends to infinity. Thus, Equation (3) evaluated in is equivalent to
(4) 
which implies when tends to infinity. We easily deduce from this asymptotic relation that and that when tends to infinity. Since , we conclude that when tends to infinity. ∎
In view of Proposition 2, we have the following bounds:
(5) 
Proof (of Lemma 2 (i))
Via Proposition 2, we can bound : for all ,
(6) 
Let us assume that for all large enough , and let us prove that the two bounds of Equation (6) are of the same asymptotic order when tends to .
Remark that for all integer , : Equation (6) implies
Let us split the sum into two sums: the last summands, and the rest.
By assumption, and we therefore can choose large enough such that . Let us prove that is negligible in front of , and thus in front of . Recall that is increasing on , which implies
For all large enough , via Stirling formula,
Since , we have , and
because, by hypothesis, , which implies . Since , and in view of Equation (4), . Therefore,
Since , we can conclude that
It implies , which ends the proof. ∎
Proof (of Lemma 2, (ii))
Assume that for all large enough . Let us split the sums of the two bounds of Equation (6) into three parts: the first from index 1 to , the second from index to , and the third from index to . Remark that, if , then the third part equals zero and the second part is truncated:
By arguments similar to those developped in the proof of assertion (i), we can prove that is negligible in front of , and thus in front of . Therefore, if , assertion (ii) is proved. Let us now assume that :to end the proof, we have to prove that is negligible in front of , and thus in front of .