Associative and commutative tree representations for Boolean functions This research was partially supported by the A.N.R. project BOOLE, 09BLAN0011, and by the P.H.C. Amadeus project Probabilities and tree representations for Boolean functions. The Austrian authors’ work has been supported by FWF (Austrian Science Foundation), National Research Area S9600, grant S9604 and ÖAD, grant F03/2010.

# Associative and commutative tree representations for Boolean functions††thanks: This research was partially supported by the A.N.R. project Boole, 09BLAN0011, and by the P.H.C. Amadeus project Probabilities and tree representations for Boolean functions. The Austrian authors’ work has been supported by FWF (Austrian Science Foundation), National Research Area S9600, grant S9604 and ÖAD, grant F03/2010.

Antoine Genitrini Laboratoire LIP6, CNRS UMR 7606 and Université Pierre et Marie Curie, 4 place Jussieu, 75252 Paris cedex 05, France. Email: antoine.genitrini@lip6.fr.    Bernhard Gittenberger Technische Universität Wien, Wiedner Hauptstrasse 8-10/104, A-1040 Wien, Austria. Email: {gittenberger, vkraus}@dmg.tuwien.ac.at.    Veronika Kraus    Cécile Mailler Laboratoire de Mathématiques de Versailles, CNRS UMR 8100 and Université de Versailles Saint-Quentin-en-Yvelines, 45 avenue des États-Unis, 78035 Versailles, France. Email: cecile.mailler@math.uvsq.fr.
July 20, 2019
###### Abstract

Since the 90’s, several authors have studied a probability distribution on the set of Boolean functions on variables induced by some probability distributions on formulas built upon the connectors and and the literals . These formulas rely on plane binary labelled trees, known as Catalan trees. We extend all the results, in particular the relation between the probability and the complexity of a Boolean function, to other models of formulas: non-binary or non-plane labelled trees (i.e. Polya trees). This includes the natural tree class where associativity and commutativity of the connectors and are realised.

## 1 Introduction.

Consider the set of Boolean functions on a set of variables. There are such Boolean functions, as a value from can be assigned to every variable, which gives different assignments, for every assignment the function has output or . In this paper we consider And/Or trees, i.e. trees where internal nodes carry labels from the set and external nodes (leaves) have labels from the set . Obviously, every such tree represents a function from . We consider the uniform distribution on the set of And/Or trees of size (denoting by size the number of leaves) and are interested in the limiting probability of a given function being computed by a random tree of size , as tends to infinity, if it exists.

A lot of work has been going on in this field. Lefmann and Savický [9] were first to prove the existence of the limiting probability of . A survey including various numerical results was done by Chauvin et al. [1] and Gardy [6]. A similar study on implication trees, i.e. Boolean trees where internal nodes carry implication labels () has been done by Fournier et al. [5].
We base our paper on a recent work by Kozik [8] on pattern languages. In his paper, Kozik proves a strong relation between the limiting probability of a given function  and its complexity  (that is the minimal size of a tree computing the function ), asymptotically as the number of variables tends to infinity. We want to study the impact of removing step by step the restrictions on the trees, that is considering first plane, but non-binary or non-plane but binary And/Or trees, and later non-plane and non-binary trees. Considering such tree structures seems quite natural, as the new characteristics correspond to adding the characteristics of associativity (non-binary) and commutativity (non-plane), which are given for the and operator on the level of Boolean logic. Gardy [6] presented some of these models and gave some numerical values of the probabilty distributions on . In this paper we will use some recent method based on binary plane trees to obtain some results on the probability distribution on , when is large.

Kozik has shown that the asymptotic order of depends on for binary plane trees (c.f. [8]). First, we compare the limiting probabilities of the constant function in the different models. Supported by numerical results for equal to 1 and 2, we conjectured that commutativity does not matter. Surprisingly to us, we find that both characteristics have impact on the limiting probability . To be more precise, even if the order of when tends to infinity is the same in all models, the asymptotic leading coefficient differs from model to model. To get more insight, we further compare probabilities of functions of complexity , those are the literals , in a next step.

Finally, we prove that for all tree models compared, the asymptotically relevant fraction of trees computing a given function is given by the set of minimal trees of expanded once in a given way, and give bounds for the arising probability distribution. A similar result is proved in [8] for plane binary And/Or trees and in a paper by Fournier et al.  [5] for implication trees.

## 2 Associative and commutative trees: definitions, generating functions.

Kozik [8] has shown that in binary plane trees the order of magnitude of the limiting probability of a given Boolean function is related to its complexity. We generalise this result and therefore define the complexity of a function by the following:

###### Definition 2.1.

An And/Or tree is a labelled tree, where each internal node is labelled with one of the connectors and each leaf with one of the literals . We define the size of an And/Or tree to be its number of leaves.

###### Definition 2.2.

The complexity of a non-constant function  (i.e. ) is given by the size of a smallest And/Or tree computing  (in the rest of the paper such trees will be called minimal for ), while we define the complexity of and to be .

As it will be clear later, the complexity of a function does not depend on the chosen tree model.

###### Definition 2.3.

We are considering a set of And/Or trees of size . Let be the uniform distribution on , and its image on the set of Boolean functions. We call

 Pn=limm→∞Pm,n

the limiting distribution.

Remark: In all models we will take into consideration, the probability of a function  is equal to the one of its negation. In fact, a tree computing can be relabelled in the following way: each connector is substituted by the other one and each literal by its negation ( and ). The new tree we obtain belongs to the same model as and computes the function .

At first, we will present the result proven by Kozik. This result will be generalised in the forthcoming parts of the paper.

### 2.1 The classical model.

First, let us consider the set of binary plane trees, whose internal nodes are labelled with or , and whose external nodes are labelled with literals chosen in : each such tree computes a Boolean function on variables. We denote by the generating function enumerating this set of trees111More generally, in the rest of this paper, a generating function and its coefficients will be denoted by the same capital letter for the generating function and for its coefficients., and by the generating function of such trees computing the Boolean function . Let us remind some well known results about this generating function:

###### Proposition 2.4.

Binary And/Or trees fulfil the symbolic equation

 T=X | T∧T | T∨T, (1)

where is a leaf. Thus the generating function verifies , and therefore, we have:

 T(z)=1−√1−16nz4

and the singularity of is .

Let us consider the uniform distribution on the set of trees of size and then the probability distribution it induces on the set of Boolean functions on variables. The limit of this distribution when tends to infinity, denoted by has already been studied, in particular by Lefmann and Savický [9], Chauvin et al. [1] and Kozik [8], who has shown the following theorem.

###### Theorem 2.5.

[8, Kozik] Let be a Boolean function. Then

 Pn(f)∼λfnL(f)+1 as n→∞,

where is the complexity of , i.e. the size of a minimal tree computing , and is a constant depending on , which will be specified later in this paper.

Remark: Note that in [8], the result is rigorously proven for the binary plane model, while the actual existence of the constant is suggested. In Section 5 we give bounds for the constant .

###### Definition 2.6.

A variable is essential for a function if there exists an assignment of or to the variables , which we denote by , such that .

Remark: An essential variable of appears in every tree representation of .

Remark: Note that in this theorem, (and thus ) is fixed, and tends to infinity. The set of essential variables of the function is finite (and does not depend on ).

First of all, let us define associative trees, commutative trees and then associative and commutative trees, and the induced distributions on the set of Boolean functions .

### 2.2 The associative plane model.

###### Definition 2.7.

An associative tree is a plane tree where each node has out-degree chosen in . A labelled associative tree is an associative tree in which each external node has a label in and each internal node has an -label or an -label but cannot have the same label as its father. We denote by the family of associative trees and by the set of such trees of size .

Hence these trees are stratified: the root can be labelled either by or and it determines the labels of all other internal nodes.

We denote by the limiting distribution of Boolean functions induced by associative And/Or trees. Our aim is to compare the limiting distributions and .

The generating function enumerating associative trees is given by , where (resp. ) is the generating function of associative trees rooted at an -node (resp. an -node) or is a single leaf. Note that and,

 ^A(z)=2nz+∑k≥2ˇA(z)k=2nz+^A2(z)1−^A(z).

Therefore,

 A(z)=12(1−2nz−√1−12nz+4n2z2) (2)

and its dominant singularity is

 αn=3−2√22n.

Moreover, .

Remark: Thanks to the Drmota-Lalley-Woods theorem (well presented in [4, Chapter 8]), we can show that has indeed a limit when tends to infinity. We denote by (resp. ) the generating function enumerating associative trees computing , whose roots are labelled by (resp. ) or a literal. These generating functions satisfy the following system:

 ⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩^Af(z)=z l1{f % lit.}+∞∑i=2∑g1,…,gi,g1∧⋯∧gi=fˇAg1(z)⋯ˇAgi(z)ˇAf(z)=z l1{f lit.}+∞∑i=2∑g1,…,gi,g1∨⋯∨gi=f^Ag1(z)⋯^Agi(z).

The Drmota-Lalley-Woods theorem says, roughly speaking, that generating functions satisfying a system of functional equation have a dominant singularity of the same type. By transfer theorems (see [3]) this implies similar behaviour of their coefficients and eventually the existence of a limiting distribution. For a similar system of functional equations it was shown in [5, Section 3] that all assumptions of the Drmota-Lalley-Woods theorem indeed hold.

### 2.3 The commutative binary model.

###### Definition 2.8.

A labelled commutative tree on variables is a non-plane binary tree where every internal node is labelled with one of the connectors and every leaf is labelled by a literal . We denote this family of trees by .

We consider the distribution induced over the set of Boolean functions of  variables by the uniform distribution over such trees of size .

Binary commutative trees fulfil the same symbolic equation as in the plane case (c.f. (1)) but because of commutativity, the generating function of all commmutative trees on variables, counting leaves, is given implicitly by

 C(z)=2nz+C(z)2+C(z2), (3)

where the term tracks a possible symmetry if both subtrees of the root are identical. See Gardy [6] for details on this model of expressions and Pólya and Read [10] for more general ideas. The system of equations for the generating functions computing a given Boolean function  is given by

 Cf(z)=z l1{f lit.}+12∑g,h≠fg∧h=fCg(z)Ch(z)+12∑g,h≠fg∨h=fCg(z)Ch(z)+Cf(z)2+Cf(z2).

We can prove all assumptions of the Drmota-Lalley-Woods theorem, hence we conclude that all the and have the same singularity , and therefore converges to a limiting probability distribution , when tends to infinity.

### 2.4 The commutative associative model.

###### Definition 2.9.

Finally we define general labelled trees as commutative and associative trees, with internal nodes labelled by or (with the condition that father and sons cannot have the same label), and external nodes labelled by literals chosen in . We denote by this family of trees.

As in the other models, we consider the distribution induced over the set of Boolean functions by the uniform distribution over such trees of size .

Let be the generating function of general trees, and (resp. ) the generating function of general trees rooted by (or by , resp.) or are a leaf. We have

 P(z)=^P(z)+ˇP(z)−2nz, (4)

with

 ⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩^P(z)=exp(∑i≥1ˇP(zi)i)−1−^P(z)+2nzˇP(z)=exp(∑i≥1^P(zi)i)−1−ˇP(z)+2nz. (5)

Moreover, the generating functions and of general trees computing satisfy the following system:

 ⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩^Pf(z)=z l1{f % lit.}+∞∑l=2∑g1,…gi,g1∧…∧gl=f l∏j=1⎛⎝exp⎛⎝∑i≥1ˇPgj(zi)i⎞⎠−1⎞⎠ˇPf(z)=z l1{f lit.}+∞∑l=2∑g1,…gi,g1∧…∧gl=f l∏j=1⎛⎝exp⎛⎝∑i≥1^Pgj(zi)i⎞⎠−1⎞⎠.

Thus, we can check the hypothesis of the Drmota-Lalley-Woods theorem and conclude that the limiting distribution of , when tends to infinity, exists, and moreover, that all the , and have the same singularity, denoted by .

In the next parts of the paper, we will show that Theorem 2.5 still holds in the associative or commutative cases.

First, we show in Section 3 that the limiting ratio of tautologies is of order , we compute explicitly the limit of when tends to infinity for the different models. If these limits were the same, we could not conclude anything, but in fact they are all different, which permits us to conclude that asymptotically, when tends to infinity, the probability distributions induced by the various models are all different. In Section 4, we extend our results to the limiting probabilities of functions which are literals. In all models, the asymptotic ratio is of order when tends to infinity, but the limiting ratios are different from one model to the other. Finally, we generalise Theorem 2.5 in Section 5.

## 3 Limiting ratio of tautologies.

In this section we compute the limiting probability of the constant function . We recall that trees computing the function are called tautologies.

###### Definition 3.1.

In a tree, if the path from the root to a leaf crosses only - nodes, then this path will be called a -only-path. We extend the definition to the case such that the leaf is equal to the root (i.e. the tree has size 1).

As suggested by Kozik’s results, the limiting probability of tautologies reduces to the limiting probability of so-called simple tautologies, defined by the following:

###### Definition 3.2.

A simple tautology realised by , , is a Boolean expression which has the shape for some Boolean function , i.e. there exists a leaf labelled by and a leaf labelled by , both connected to the root by a "-only-path" (c.f. Figure 2). A simple tautology is a simple tautology realised by any literal . We denote by the number of simple tautologies of size (on variables, is omitted for simplicity), and .

###### Definition 3.3.

Let be a set of variables and be the set of simple tautologies realised by every but not by any other variable .

• is the set of simple tautologies that are realised by exactly one variable:

 K1,m=n⨄i=1STm({xi}),
• is the set of simple tautologies that are realised by exactly two different variables:

 K2,m=n⨄i,j=1i≠jSTm({xi,xj}),

• is the set of simple tautologies that are realised by exactly different variables:

 Kn,m=ST({x1,…,xn}).

We denote by the generating function of simple tautologies realised by . Let . Obviously, , because some tautologies are counted several times in . We get .

To calculate limiting probabilities, we use the singular expansions of the considered generating functions around their dominant singularities. Consider the generating function of a given family of And/Or trees together with the generating function of a subset of such trees.

###### Lemma 3.4.

We assume that and have the same dominant singularity and a square root singular expansion

 T(z)=aT−bT√1−zρ+O(1−zρ),S(z)=aS−bS√1−zρ+O(1−zρ),

around . Then

 limm→∞SmTm=limz→ρS′(z)T′(z).

We call this number, when it exists, the limiting ratio of the set counted by .

###### Proof.

If tends to infinity, transfer lemmas (c.f. [4]) give

 Sm∼bSΓ(12)n−32ρ−mTm∼bTΓ(12)n−32ρ−m⎫⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎬⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎭⇒SmTm∼bSbT.

Derivation of the singular expansions gives

 S′(z) ∼bS2(1−zρ)−12, T′(z) ∼bT2(1−zρ)−12.

Hence the result follows. ∎

Remark: If is the set of trees computing a given function , then, the limiting probability of  is equal to the limiting ratio of because for all ,

 Pm,n(f)=# trees of size m computing f# all trees of size m=SmTm.

### 3.1 Binary plane trees.

In the binary plane model, Kozik has shown that asymptotically, when tends to infinity, all tautologies are simple tautologies. Therefore, to estimate the probability that a binary plane tree computes the function , it suffices to count simple tautologies, and furthermore, thanks to the following proposition, simple tautologies that are realised by only one variable (i.e. the set ).

###### Proposition 3.5.

If tends to infinity, then

 limm→∞1Tmn∑k=1k#Kk,m=limm→∞#K1,mTm+O(1n2).

The proof of the proposition is deferred to the end of this section since further technical concepts are required.

###### Theorem 3.6.

The limiting ratio of simple tautologies, and thus the limiting ratio of tautologies in the binary plane model is

 limm→∞Pm,n(True)=limm→∞STmTm(1+O(1n))=34n+O(1n2), when n tends to % infinity,

where is the total number of plane binary trees and is the number of simple tautologies of size labelled with variables.

###### Proof.

Let us compute the generating function of simple tautologies. First, let be the generating function of trees containing a leaf labelled by which is connected to the root by an -only-path (c.f. Figure 3) and the generating function of trees which are not of such shape. Hence .

The function is given by:

 ¯gx(z)=T(z)2+¯gx(z)2+(2n−1)z.

This equation is obtained by decomposing the tree at its root: if the root is labelled by an , the tree is not of the shape depicted in Figure 3 and both subtrees are arbitrary trees. If the root is labelled by an , neither of the two subtrees may have the shape of Figure 3. If the root is a single leaf, it must not be labelled by . By a symbolic argumentation, the three cases translate to the three terms in the equation. Solving this equation, using the explicit expression of given by Proposition 2.4, we get:

 ¯gx(z)=12−√2+2√1−16nz−16nz+16z4,

and thus

 gx(z)=√2+2√1−16n−16nz+16z−√1−16nz−14. (6)

Let be the generating function of trees given by (or ), where is a tree counted by and is a tree counted by , i.e. simple tautologies realised by , where and lie in different subtrees of the root (c.f. Figure 4).

Obviously, . Recall that is the generating function of simple tautologies realised by the variable , and be the generating function of trees that are not simple tautologies realised by . Again by decomposing and analysing the label of the root, we get:

 ¯¯¯¯¯¯¯STx=T(z)2+(¯¯¯¯¯¯¯STx(z)2−hx(z))+2nz.

In particular, if the root is labelled by an , neither of the two subtrees can be a simple tautology realised by and additionally the whole tree cannot be of the shape depicted in Figure 4. Solving this equation, we obtain an explicit expression for , and yields an expression for , where denotes :

 STx(z) =14(−1−Z +√6+6Z−2√2+2Z−16nz+16z−2Z√2+2Z−16nz+16z−48nz+16z).

By Proposition 3.5, when tends to infinity. Due to Lemma 3.4 we can compute the ratio

 limm→∞GmTm=limz→116nG′(z)T′(z)=34n+O(1n2)

where is given just after Definition 3.3. Thus,

 limm→∞STmTm=34n+O(1n2).

Since, when tends to infinity, asymptotically almost every tautology is a simple tautology, this implies

 limm→∞Pm,n(True)=limm→∞STmTm+O(1n2).

We now go back to Proposition 3.5. In the following, we define pattern languages and some related vocabulary, which can be found in Kozik’s paper [8] for the binary case. Interpreting a given And/Or tree as an element from a pattern language, which is possible if pattern and trees have a similar structure, will lead us to the proof of Proposition 3.5.

###### Definition 3.7.

A pattern language is a set of plane trees with internal nodes labelled by or , and external nodes labelled by or . The leaves labelled by  are called placeholders and those labelled by  are called pattern leaves. We define as the generating function of , with marking the pattern leaves and marking the placeholders.

Given a pattern language , we will denote by the set of plane labelled trees with internal nodes labelled by or , and external nodes labelled by literals or placeholders, such that if we replace every literal by a , we obtain a tree of . Therefore, is the generating function of .

Given a set of trees , we define (resp. ) as the set of trees obtained by taking an element of (resp. ) and plugging an element of in each placeholder.

Given two pattern languages and , we define the composition of and by the pattern language obtained by plugging -patterns into the placeholders of the structures of . The pattern leaves of are then both the pattern leaves of and .

###### Definition 3.8.

A pattern language is unambiguous if for every family every element of can be constructed in only one way.
A pattern language is
subcritical for if the generating function of has a square root singularity and if is analytic in some set .

In the following, we call a variable essential for a tree if and only if it is essential for the function computed by this tree (c.f. Definition 2.6).

###### Definition 3.9.

If is an element of , has -repetitions if equals the difference between the number of its -pattern leaves and the number of distinct variables (and not literals) that appear in its -pattern leaves.
Further, has
-restrictions if equals the number of its -repetitions plus the number of essential variables of that appear at least once in its -pattern leaves.

For an example of repetitions and restrictions, see Figure 5.

###### Theorem 3.10.

[8, Kozik] Let be a binary unambiguous language which is subcritical for . We denote by (resp by ) the number of elements of of size which have (resp. at least ) -restrictions, and by the number of elements of of size . Then,

 limm→∞L[T][≥k]m,nTm∼limm→∞L[T][k]m,nTm∼dnk,

when tends to infinity, and is a constant.

Due to this theorem, we can now prove Proposition 3.5.

###### Proof of Proposition 3.5.

Let us consider the pattern language (c.f. [8]). The set of all trees computing with exactly -restrictions includes . Therefore, thanks to Theorem 3.10, we get

 limm→∞#KmiTm=O(1ni),

when tends to infinity. Therefore,

 limm→∞2#K2,m+…+n#Kn,mTm=O(1n2)+(n−2)O(1n3)=O(1n2).

### 3.2 Associative plane trees.

To compute the limit of when tends to infinity, we define simple tautologies, and prove that asymptotically every tautology is a simple tautology. Therefore, we will generalise Theorem 3.10 to associative trees.

###### Theorem 3.11.

The limiting probability of the function in the associative model, , is given by

 limm→∞Pam,n(True)=51−36√2n+O(1n2).

Let us first show that Theorem 3.10 can be generalised to the associative case, and then use it to show Theorem 3.11.

#### 3.2.1 Generalisation of Kozik’s theorem to associative trees.

###### Theorem 3.12.

Let be an unambiguous pattern language with out-degree different from , which is subcritical for . We denote by (resp by ) the number of elements of of size which have (resp. at least ) -restrictions, and by the number of elements of  of size . Then,

 limm→∞L[A][≥k]m,nAm∼limm→∞L[A][k]m,nAm∼dnk,

when tends to infinity, and is a constant.

The proof of the generalisation works analogously to the one of Theorem 3.10, still we will state the main ideas as they will be useful in the following.

Let be the family of associative trees with leaves unlabelled, and let with -pattern leaves. Further, we fix the set of essential variables and denote by the cardinality of this set, . For any , the number of different leaf-labellings of which give -repetitions and -restrictions is:

 {ll−r}(vk−r)(l−r)k−r–––––(n−v)l−r−(k−r)––––––––––––nm−l2m,

where and are the Stirling numbers of second kind222The Stirling number of second kind counts the number of ways to partition a set of elements into non-empty sets.. In this formula, the different factors represent, from left to right:

• the number of partitions of the -pattern leaves into classes (leaves in the same class will be labelled by the same variable),

• the number of different choices for the essential variables that appear in the -pattern leaves,

• the number of different assignments of these essential variables to the classes of the first term,

• the number of assignments of non-essential variables to the remaining classes of the -pattern leaves,

• the number of assignments of variables to the leaves that are not -pattern leaves,

• the number of ways to distribute the negations.

The following proposition is immediate:

###### Proposition 3.13.

Given an associative tree with leaves unlabelled, the number of leaf-labellings of which make it have -restrictions is:

 (n−v)l−k––––nm−l2mwv,k(l),

where is a polynomial in .

In [8] the following proposition is proved for binary trees and patterns (cf. [8, Lemma 2.7]), but in fact the proof does not rely on binarity and hence the proposition holds for patterns and trees of arbitrary degree.

###### Proposition 3.14.

Let be a set of trees whose generating function has a unique dominating singularity in of the square root type. Let be an unambiguous pattern language, subcritical for . Let denote the number of trees from of size with exactly pattern leaves. Finally, let be a non zero polynolmial of degree . Then,

 limn→∞∑l≥0~L[T](m,l)w(l)tm=cw,

for some non-negative real .

Moreover, if has non-negative values and is positive at some point , and if contains a pattern with non pattern leaves and at least one placeholder, then .

Thanks to those propositions, we can now prove Theorem 3.12 to associative trees:

###### Proof of Theorem 3.12.

Let be an associative pattern and the family of trees from with leaves unlabelled. We have, thanks to Proposition 3.13:

 L[T][k]m,nAm=2m∑l≥0~L[~T](m,l)wk,v(l)(n−v)l−k––––nm−lAm;

and this implies:

 L[T][k]m,nAm≤2m∑l≥0~L[~T](m,l)wk,v(l)nl−knm−l(2n)m~Am.

Thanks to Proposition 3.14, we get:

 limm→∞L[T][k]m,nAm≤limm→∞2m∑l≥0L[T](m,l)wk,v(l)nm−k(2n)m~Am∼ck,vnk,

when tends to infinity. Moreover, we can check that is positive. A lower bound can be proven analogously, the proof for the binary case is given in [8]. It follows that

 limm→∞L[T][k]m,nAm∼dnk,

when tends to infinity. Moreover, we can see that:

 L[T][≥k]m,nAm≤2m∑l≥0~L[~T](m,l)wk,v(l)nm−kAm,

and since

 limm→∞L[T][k]m,nAm≤limm→∞L[T][≥k]m,nAm,

the theorem is proven. ∎

#### 3.2.2 Associative tautologies.

###### Proposition 3.15.

In the associative model, asymptotically when tends to infinity, almost all tautologies are simple tautologies.

The proof is very similar to the proof of the binary case (see [8]). First we need to introduce patterns:

 ⎧⎪ ⎪⎨⎪ ⎪⎩^N=∙|ˇN∧\boxempty|ˇN∧\boxempty∧\boxempty|…ˇN=∙|^N∨^N|^N∨^N∨^N|…R={^N,ˇN}, (7)

where means we start with either an -node or an -node, and use the according pattern or , and then use both partial patterns alternatingly until the process finishes. Then  is an unambigous pattern language.

###### Lemma 3.16.

The pattern is subcritical for associative trees.

###### Proof.

The generating function of the labelled pattern is given by

 p(x,y)=^p(x,y)+ˇp(x,y)−2nx,

where (resp. ) is the generating function of the partial labelled patterns (resp. ). These two generating functions satisfy the following system:

 ⎧⎪⎨⎪⎩ˇp(x,y)=2nx+^p(x,y)21−^p(x,y)^p(x,y)=2nx+y1−yˇp(x,y).

Solving this system, we get

 ^p(x,y)=12(2nx−y−1−√(2nx−y−1)2−8nx).

Recall that (cf. (2))

 A(z)=12(1−2nz−√1−12nz+4n2z2),
 A(αn)=√2−1 and αn=3−2√22n.

To prove that is the dominant singularity of , it is enough to prove that it is the dominant singularity of and . Actually, and are analytic in . For big enough , , and due to non-negative coefficients the inequality holds for all . Thus the dominant singularity of is and is subcritical for associative trees. ∎

Remark: The -pattern has an interesting property: if we set all the -pattern leaves of a tree to , then, the whole tree itself computes . This can be checked by induction on the size of the tree. If the pattern is only a leaf, it returns . If the root is an -node, then all subtrees of the root are patterns returning by the induction hypothesis. If the root is an -node, the leftmost subtree is a pattern returning by the induction hypothesis. Thus the whole tree computes in all cases. This property is the key point of the following proof.

Remark: The pattern is a generalisation of the pattern , defined in [8] to handle the proof in the binary plane case. Note that , and we can find the unique element from which corresponds to a tree by starting at the root of and finding the pattern leaves by traversing the tree top-to-bottom.

###### Proof of Proposition 3.15.

Let us consider a tautology with exactly one -restriction (cf. Definition 3.7). This restriction has to be a repetition, since a tautology does not contain essential variables.

If the repetition is of the kind , then we can assign all the -pattern leaves to , and with this assignment the whole tree computes , which is impossible.

Thus the repetition has to be an repetition. Let us first assume that the repetition does not appear among the -pattern leaves. Thus we can assign all those leaves to , and then the whole term computes , which is impossible. Hence, the repetition must occur in the -pattern leaves. Let us assume that there is a node labelled by on one of the paths from the leaves labelled by and to the root of the tree. Then, the subtree rooted at has shape with . Let us assume that (or ) appears in . Then, we can assign all the -pattern leaves of the other subtrees , and all the -pattern leaves of the whole tree except those in the subtree rooted at to . This makes the whole tree compute , which is impossible.

Thus, and are linked to the root by an -only-path. As the trees are stratified, the only possibility for is to be a simple tautology. Thus every tree with exactly one -restriction computing is a simple tautology.

Moreover, there are no trees computing without -restrictions, and the number of trees computing with at least two -restrictions is negligible in comparison to the number of simple tautologies by Theorem 3.12 which can be applied thanks to Lemma 3.16. ∎

We are now able to prove Theorem 3.11 by counting associative simple tautologies.

###### Proof of Theorem 3.11.

Let be the generating function counting the number of simple tautologies realised by and such that and appear only once in the first generation (i.e. at depth 1). Then,

 ˜STx(z