This paper introduces a general method for enumerating syntax trees that avoid certain patterns, using inclusion-exclusion formulas and operad theory, applicable without restrictions on the patterns.
Contribution
It develops a novel approach combining pattern avoidance, formal power series, and operad structures for counting syntax trees in a unified framework.
Findings
01
Method applies to any pattern set without restrictions.
02
Connects syntax trees and operads for enumeration.
03
Provides multiple concrete examples.
Abstract
A syntax tree is a planar rooted tree where internal nodes are labeled on a graded set of generators. There is a natural notion of occurrence of contiguous pattern in such trees. We describe a way, given a set of generators G and a set of patterns P, to enumerate the trees constructed on G and avoiding P. The method is built around inclusion-exclusion formulas forming a system of equations on formal power series of trees, and composition operations of trees. This does not require particular conditions on the set of patterns to avoid. We connect this result to the theory of nonsymmetric operads. Syntax trees are the elements of such free structures, so that any operad can be seen as a quotient of a free operad. Moreover, in some cases, the elements of an operad can be seen as trees avoiding some patterns. Relying on this, we use operads…
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Full text
Tree series and pattern avoidance in syntax trees
Samuele Giraudo
LIGM, Univ. Gustave Eiffel, CNRS, ESIEE Paris, F-77454
Marne-la-Vallée, France
A syntax tree is a planar rooted tree where internal nodes are labeled on a graded set
of generators. There is a natural notion of occurrence of contiguous pattern in such
trees. We describe a way, given a set of generators G and a set of
patterns P, to enumerate the trees constructed on G and avoiding
P. The method is built around inclusion-exclusion formulas forming a system of
equations on formal power series of trees, and composition operations of trees. This
does not require particular conditions on the set of patterns to avoid. We connect this
result to the theory of nonsymmetric operads. Syntax trees are the elements of such free
structures, so that any operad can be seen as a quotient of a free operad. Moreover, in
some cases, the elements of an operad can be seen as trees avoiding some patterns.
Relying on this, we use operads as devices for enumeration: given a set of combinatorial
objects we want enumerate, we endow it with the structure of an operad, understand it in
term of trees and pattern avoidance, and use our method to count them. Several examples
are provided.
Key words and phrases:
Tree; Pattern avoidance; Enumeration; Formal power series;
Operad.
The general problem of counting objects is of primary importance in
combinatorics. Several approaches exist for this purpose. Here, we focus
on a strategy having an algebraic flavor consisting in endowing a set
X of combinatorial objects with operations in order to form algebraic
structures. The point is that the algebraic study of X (minimal
generating sets, relations between generators, morphisms, etc.)
leads to enumerative results. Operads [LV12, Mé15, Gir18] are
very interesting algebraic structures in this context. They encode the
notion of substitution of combinatorial objects into another one.
Moreover, formal power series on operads [Cha02, Cha08] or colored
operads [Gir19] (that are generalizations of usual formal power
series) offer new methods for enumerative questions. This work is
intended to be an application of the theory of operads to combinatorics
and enumeration. As our main contribution, we provide a tool to express the
Hilbert series (that is, the generating series of the sequence of the
dimensions) of an operad O given one of its presentations by
generators and relations (satisfying some properties). When O is
an operad on combinatorial objects, this provides a description of the
generating series of these objects. This is a consequence of the fact
that some operads can be seen as operads of trees avoiding some
patterns, and is related with the deeper notions of Koszul
operads [GK94], Poincaré-Birkhoff-Witt bases for
operads [Hof10], and Gröbner bases for operads [DK10].
Our main combinatorial result consists, given a set P of syntax trees (that are some
labeled planar rooted trees, where labels are taken from a fixed alphabet), to obtain a
system of equations expressing the formal sum of all the trees avoiding P (as
connected components in the trees). The presented solution is built around an
inclusion-exclusion formula and uses simple grafting operations on trees. By considering
the projection of this system to usual formal power series, this leads to a system of
equations for the generating series of the trees avoiding P. It is also possible to
add formal parameters into these systems to enumerate the trees according to some
statistics. Methods to enumerate trees that avoid some patterns have been already provided
in [Row10] for the case of unlabeled binary trees, [GPPT12] for the case of
unlabeled ternary trees, in [Par93] and [Lod05] for the case of patterns with two
internal nodes, and in [KP15] for the general case. Our method differs from the latter
one both in the approach and in the obtained systems of equations. Indeed, in the previous
reference, the authors use combinatorics and enumerative properties to show algebraic
properties on operads (while in the present work, we use operads to obtain combinatorial
results and to count objects). Moreover, we obtain different systems of equations and we
have fewer requirements about the sets P to avoid (they can be infinite, and some of
their trees can be factors of other ones). Note that there exist several notions of pattern
avoidance in trees [DKS20]. We focus here on contiguous patterns.
This document is organized as follows.
Section 1 contains elementary definitions
about syntax trees and formal power series of trees. In
Section 2, we state the main question of the
paper about pattern avoidance in syntax trees and provide its main
result (Theorem 2.2.4). Next,
Section 3 is devoted to explaining how to
use nonsymmetric set-operads as devices for the enumeration of families
of combinatorial objects. For this, the elementary definitions about
operads are exposed, and a notion of refined Hilbert series of an operad
depending on an orientation of one its presentations by generators and
relations is provided. The document ends with Section 4
where examples of enumerations of some families of combinatorial objects
are reviewed. We provide, by using several operad structures, the
enumeration of bicolored Schröder trees, Schröder trees, binary trees,
m-trees, noncrossing trees, Motzkin paths, and directed animals. The
tools provided by this work highlight some (already known or not)
statistics on these objects.
General notations and conventions
For any integers a and c, [a,c] denotes the set
{b∈N:a⩽b⩽c} and [n], the set [1,n]. The
cardinality of a finite set S is denoted by #S. If u is a word,
its length is denoted by ∣u∣ and for any position i∈[∣u∣], ui
is the i-th letter of u.
1. Syntax trees and series
This section begins by setting elementary definitions about syntax
trees, the main combinatorial objects of this work. Next, we present
series on trees and some operations on them.
1.1. Syntax trees
We set here elementary definitions and notations about graded sets,
syntax trees, and composition operations on syntax trees.
1.1.1. Graded sets and alphabets
A graded set is a set G admitting a decomposition
as a disjoint union of the form
[TABLE]
In the sequel, we shall call such a set an alphabet and each of
its elements a letter. The arity∣x∣ of a letter x of
G is the unique integer n such that
x∈G(n). We say that G is
combinatorial if all the G(n) are finite for all
n⩾1. In this case, the generating series of
G is the series GG(t)
defined by
[TABLE]
The coefficient of tn in GG(t) is
#G(n) for any n⩾1.
1.1.2. Syntax trees
Let G be an alphabet. A G-tree (also
called G-syntax tree) is a planar rooted tree such
that its internal nodes of arity k are labeled by letters of arity k
of G. Unless otherwise specified, we use in the sequel
the standard terminology (such as node, internal node,
leaf, edge, root, child, etc.) about
planar rooted trees [Knu97] (see also [Gir18]). Let us set
here some definitions about G-trees. The degreedeg(t) (resp. arity∣t∣) of a
G-tree t is its number of internal nodes (resp.
leaves). The only G-tree of degree [math] and arity 1 is
the leaf and is denoted by . For any
a∈G(k), the corolla labeled by a is
the tree c(a) consisting in one internal node labeled by
a having as children k leaves. Given an internal node u of
t, due to the planarity of t, the children of u are
totally ordered from left to right and are thus indexed from 1 to the
arity k of u. By assuming that the arity of the root of t is
k, for any i∈[k], the i-th subtree of t is the
tree t(i) rooted at the i-th child of t. Similarly, the
leaves of t are totally ordered from left to right and thus are
indexed from 1 to ∣t∣. The height of t is the
number of internal nodes belonging to a longest path connecting the root
of t to one of its leaves.
For instance, if
G:=G(2)⊔G(3)
with
G(2):={a,b} and
G(3):={c},
[TABLE]
is a G-tree of degree 5, arity 8, and height 3. Its
root is labeled by c and has arity 3. Moreover, we have
[TABLE]
Given an alphabet G, we denote by
S(G) the graded set of all the
G-trees where S(G)(n) is the
subset of S(G) restrained on the
G-trees of arity n. Observe that when G
is combinatorial and
G(1)=∅, S(G)
is combinatorial. In this case, the generating series
GS(G)(t) of
S(G), counting its elements with respect to
their arities, satisfies
[TABLE]
1.1.3. Compositions of syntax trees
Given t,s∈S(G) and
i∈[∣t∣], the partial compositiont∘is is the G-tree obtained by
grafting the root of s onto the i-th leaf of t. For
instance, by considering the previous graded set G of
Section 1.1.2, one has
[TABLE]
Furthermore, given t∈S(G) and
s1,…,s∣t∣∈S(G),
the full compositiont∘[s1,…,s∣t∣] is the
G-tree obtained by grafting si onto the i-th
leaf of t, simultaneously for all the i∈[∣t∣]. For
instance, by considering the previous graded set G, one
has
[TABLE]
By a slight but convenient abuse of notation, we shall in some cases
simply write a∘ib instead of
c(a)∘ic(b), and write
a∘[s1,…,s∣a∣] instead of
c(a)∘[s1,…,s∣a∣] where
a and b are letters of G and s1,
…, s∣a∣ are G-trees. Moreover, when the
context is clear, we shall even write a for c(a).
1.2. Series on combinatorial sets
We set here elementary definitions and notations about formal power
series on arbitrary sets and about series on trees.
1.2.1. Series on a set
Let K be any field of characteristic zero. It is convenient, for
enumerative purposes, to consider that K is simply the field Q.
If X is a set, the linear span of X is denoted by K⟨X⟩.
The dual space of K⟨X⟩, denoted by K⟨⟨X⟩⟩ is by
definition the space of the maps f:X→K, called
X-series. Let f∈K⟨⟨X⟩⟩. The coefficient
f(x) of any x∈X in f is denoted by
⟨x,f⟩. The support of f is the set
Supp(f):={x∈X:⟨x,f⟩=0}.
We say that x∈Xappears in f if
x∈Supp(f). By exploiting the vector space structure of
K⟨⟨X⟩⟩, any X-series f expresses as
[TABLE]
This notation using potentially infinite sums of elements of X
accompanied with coefficients of K is common in the context of formal
power series. In the sequel, we shall define and handle some X-series
using the notation (1.2.1).
If P is a predicate on X, that is, for any x∈X,
either P(x) holds or P(x) does not hold, the
predicate series of P is the series
[TABLE]
Moreover, for any subset Y of X, the characteristic seriesch(Y) of Y is the predicate series of
P where P(y) holds if and only if y∈Y. If
P1 and P2 are two predicates on X, we denote
by P1∧P2 (resp.
P1∨P2) the predicate wherein, for any
x∈X, (P1∧P2)(x) (resp.
(P1∨P2)(x)) holds if and only if
P1(x) and P2(x) (resp. P1(x) or
P2(x)) hold.
Lemma 1.2.1**.**
Let X be a set and P1, …, Pn,
n⩾1, be predicates on X. In K⟨⟨X⟩⟩, we have
[TABLE]
Proof.
Let
f:=pr(P1)+pr(P2)−pr(P1∧P2)
obtained from the right member of (1.2.3) in
the particular case where n=2. In f, each x∈X has
a coefficient [math] or 1 according to the following rules:
if not P1(x) and not P2(x), then
the coefficient of x is 0+0−0=0;
2. 2.
if P1(x) and not P2(x), then the
coefficient of x is 1+0−0=1;
3. 3.
if not P1(x) and P2(x), then the
coefficient of x is 0+1−0=1;
4. 4.
if P1(x) and P2(x), then the
coefficient of x is 1+1−1=1.
Therefore, f is the series
pr(P1∨P2), so
that (1.2.3) holds for n=2. Moreover,
since (1.2.3) obviously holds when n=1, by
induction on n, the inclusion-exclusion formula of the
statement of the lemma follows.
∎
1.2.2. Series on syntax trees
Let G be an alphabet. We call
G-tree series each series of
K⟨⟨S(G)⟩⟩. For any n⩾1, the
composition product of G-tree series is the product
[TABLE]
defined for any G-tree series f and
g1, …, gn by
[TABLE]
Observe that this product is linear in all its inputs, and that it can
be seen as an extension by linearity of the full composition product of
G-trees.
1.2.3. Generating series
Let us define from G the set
[TABLE]
of formal parameters. The usual set of the commutative generating series
on the set {t,q}∪QG of parameters is
denoted by K⟨⟨t,q,QG⟩⟩.
The tracetr(t) of a G-tree t is
the monomial of K⟨⟨t,q,QG⟩⟩ defined by
[TABLE]
where for any a∈G, dega(t) is the
number of internal nodes of t labeled by a. Moreover, the
enumeration map on K⟨⟨S(G)⟩⟩ is
the map
[TABLE]
defined linearly by
[TABLE]
For any G-tree series f, the
enumerative image of f is the generating series
en(f). By definition, the coefficient of
tnqdqa1α1…qaℓαℓ,n⩾1, d⩾0, αi⩾0, i∈[ℓ], in the
enumerative image of the characteristic series of a set S of
G-trees is the number of trees t of S having
n as arity, d as degree, and
qa1α1…qaℓαℓ
as trace.
Observe that for any alphabet G, since there are finitely
many G-trees having a fixed trace, the enumerative image
of any G-tree series is always well-defined. Moreover,
when G is combinatorial and
G(1)=∅, there are finitely many
G-trees having a given arity n⩾1. For this reason,
for any set S of G-trees, the specialization
ch(S)∣q:=1,qa:=1,a∈G
is well-defined and is the series wherein the coefficient of tn is
the number of G-trees of S of arity n. Observe
finally that when G is finite, there are finitely many
G-trees having a given degree d⩾0. For this
reason, the specialization
ch(S)∣t:=1,qa:=1,a∈G
is well-defined and is the series wherein the coefficient of qd is
the number of G-trees of S of degree d.
Proposition 1.2.2**.**
For any alphabet G, any G-tree
t of arity n⩾1, and any G-tree series
f1, …, fn,
[TABLE]
Proof.
The statement of the proposition follows by computing the
enumerative image of the right member
of (1.2.5).
∎
Proposition 1.2.2 admits the following
practical consequence. Assume that we have a set S of
G-trees we want enumerate (with respect to the arities
and the traces of its elements). A way to accomplish this consists in
providing an expression for en(ch(S)). In
the case where we have a description of ch(S) as an
expression using the sum, the multiplication by a scalar, and the
composition product of G-tree series, we obtain thanks to
Proposition 1.2.2 an expression for
en(ch(S)) using only the sum, the
multiplication by a scalar, and the multiplication product of generating
series. We shall use this observation in the sequel to obtain systems of
equations of generating series from systems of equations of tree series.
2. Tree series and pattern avoidance
This section deals with two notions of pattern avoidance in syntax trees:
factor-avoidance and prefix-avoidance. The aim is to describe a way to
enumerate the syntax trees factor-avoiding a set of patterns. For this,
we begin by introducing some technical tools. Then, we state our main
result, provide some of its consequences, and finish by reviewing some
examples.
2.1. Patterns in syntax trees
The notions of prefix, factor, and suffix in syntax trees are set here.
Their immediate properties are stated.
2.1.1. Factors, prefixes, and suffixes in trees
Let G be an alphabet and let t be a
G-tree. When t expresses as
[TABLE]
for some G-trees s, r, and r1,
…, r∣s∣, and i∈[∣r∣], s is a
factor of t and this property is denoted by
s≼ft. Intuitively, this says that one can put down
s at a certain place into t, by possibly superimposing
leaves of s and internal nodes of t. When
r=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture in (2.1.1), s is a
prefix of t and this property is denoted
by s≼pt. Intuitively, this says that s is a
factor of t wherein the root of s can be put down onto the
root of t. Finally, when rj=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture for all
j∈[∣s∣] in (2.1.1), s is a
suffix of t and this property is denoted by
s≼st. Let us consider some examples. By setting
[TABLE]
we have
[TABLE]
Proposition 2.1.1**.**
For any alphabet G, ≼f, ≼p, and
≼s endow S(G) with poset
structures. Moreover, the poset
(S(G),≼f) is an extension of
(S(G),≼p).
Proof.
The fact that ≼f, ≼p, and ≼s are order
relations is straightforward from their definitions. Moreover, since
for any G-trees s and t,
s≼pt implies s≼ft, the second
part of the statement of the proposition holds.
∎
When s is not a factor (resp. a prefix) of t, tfactor-avoids (resp. prefix-avoids) s. This property
is denoted by s≼ft (resp.
s≼pt). By extension, when P is any subset of
S(G), tfactor-avoids (resp.
prefix-avoids) P if for all s∈P,
s≼ft (resp. s≼pt). By a
slight abuse of notation, this property is denoted by
P≼ft (resp. P≼pt).
Lemma 2.1.2**.**
Let G be an alphabet, and s and t be
two G-trees. Then, s is a prefix of t
if and only if s=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture or there exists a letter
a∈G(k) such that
s=a∘[s(1),…,s(k)],
t=a∘[t(1),…,t(k)], and for
all i∈[k], s(i)≼pt(i).
Proof.
This follows directly from the definition of the relation ≼p.
∎
2.1.2. Tree series avoiding factors
For any subset P of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},
let PP be the predicate on
S(G) wherein PP(t) holds
if and only P≼ft. Let also F(P)
be the G-tree series defined by
[TABLE]
In other terms, F(P) is the characteristic series of
all G-trees factor-avoiding all trees of P. In this
context, we say that the elements of P are patterns. Notice
that we consider only sets of patterns P such that
\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture∈/P since there exists no G-tree
factor-avoiding . Notice also that, for the while, there is no
restriction on G or P. This set P
of patterns can be infinite, and some trees can be themselves factors of
another one. The aim of the next section is to provide a system of
equations to describe F(P) within the more general
possible context.
2.2. Pattern avoidance and enumeration
We provide here a way to obtain a system of equations to describe the
G-tree series F(P). For this, we start
by introducing tools, namely consistent words and admissible trees.
From now, to not overload the notation, sets of patterns are denoted by
omitting the braces and the commas. Hence, sets of patterns can be seen
as unordered forests of G-trees without repeated trees.
Moreover, all examples of this section are based upon the finite set of
patterns
[TABLE]
2.2.1. Consistent words
Let G be an alphabet and P be a subset of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}.
For any a∈G(k), k⩾1, let
[TABLE]
In other words, Pa is the subset of P of the patterns
having roots labeled by a. A word
S:=(S1,…,Sk) where each Si is a
subset of S(G), i∈[k], is
Pa-consistent if for any s∈Pa,
there is an i∈[k] such that s(i)=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture and
s(i)∈Si. Observe that when c(a)∈P,
there is no Pa-consistent words. Moreover, a
G-tree t is S-admissible if the root
of t is labeled by a and for all i∈[k], t(i)
prefix-avoid Si.
For instance, by considering the
set (2.2.1) of patterns, the word
[TABLE]
is Pc-consistent. Moreover, the tree
[TABLE]
is Sc-admissible. Observe however that t does not
factor-avoids P or Pc.
Lemma 2.2.1**.**
Let G be an alphabet, P be a subset of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},a∈G, and S be a
Pa-consistent word. If t is an S-admissible
G-tree, then t prefix-avoids Pa.
Proof.
Let us denote by k the arity of a. Since t is
S-admissible, for all i∈[k] and s∈Si, we
have s≼pt(i). Since for any
r∈Pa, there is a j∈[k] such that
r(j)=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture and r(j)∈Sj, we have in
particular that r(j)≼pt(j). Since moreover the
root of t is labeled by a, by
Lemma 2.1.2, one deduces
that s≼pt.
∎
If (S1,…,Sk) and
(S1′,…,Sk′) are two words of a same length k
where each Si and Si′ is a subset of
S(G), their sum is the word
[TABLE]
A Pa-consistent word (S1,…,Sk) is
minimal if any decomposition
[TABLE]
where (S1′,…,Sk′) is a Pa-consistent
word and (S1′′,…,Sk′′) is a word where each
Si′′, i∈[k], is a subset of
S(G), implies
(S1,…,Sk)=(S1′,…,Sk′).
Intuitively, this says that a Pa-consistent word is minimal
if the suppression of any tree in one of its letters leads to a word
which is not Pa-consistent. We denote by
M(Pa) the set of all minimal
Pa-consistent words.
For instance, by considering the set (2.2.1) of
patterns,
[TABLE]
For any G-tree, we denote by Pref(t) the set
of all prefixes of t.
Lemma 2.2.2**.**
Let G be an alphabet and P be a subset of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}.
If t is a G-tree having its root labeled by
a∈G and prefix-avoiding Pa, then
there is a minimal Pa-consistent word S such that
t is S-admissible.
Proof.
Let us denote by k the arity of a and let
S:=(S1,…,Sk) be the word of subsets of
S(G) defined by
Si:=S(G)∖Pref(t(i)).
Since t prefix-avoids Pa, by
Lemma 2.1.2, for any r∈Pa,
there is an i∈[k] such that r(i)=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture and
r(i)≼pt(i). This leads to the fact that
r(i)∈/Pref(t(i)), so that
r(i)∈Si. For this reason, S is
Pa-consistent. Moreover, it follows directly from the
definition of S that t is S-admissible. Finally,
by definition of minimal Pa-consistent words, there
exists a minimal Pa-consistent word
S′:=(S1′,…,Sk′) such that
Si′⊆Si for all i∈[k]. The statement of
the lemma follows.
∎
By combining Lemmas 2.2.1
and 2.2.2 together, it follows that
for any subset P of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}
and any letter a∈G, a G-tree
t having its root labeled by a prefix-avoids P if and
only if there exists a minimal Pa-consistent word S
such that t is S-admissible.
Lemma 2.2.3**.**
Let G be an alphabet, P and Q be two
subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},
and t be a G-tree having its root labeled by
a∈G(k). Then, t factor-avoids P
and prefix-avoids Q if and only if for all i∈[k],
t(i) factor-avoid P and there exists a minimal
(P∪Q)a-consistent word S such that
t is S-admissible.
Proof.
Assume that t factor-avoids P and prefix-avoids
Q. The fact that t factor-avoids P implies in
particular that t prefix-avoids P (see
Proposition 2.1.1). Hence, t
prefix-avoids P∪Q. Now, by
Lemma 2.2.2, and since the root
of t is labeled by a, there exists a minimal
(P∪Q)a-consistent word S such that
t is S-admissible. Conversely, assume that for all
i∈[k], t(i) factor-avoid P and that there exists
a minimal (P∪Q)a-consistent word S such
that t is S-admissible. By
Lemma 2.2.1, t prefix-avoids
(P∪Q)a. Therefore, since t prefix-avoids
P and since for each i∈[k], t(i) factor-avoids
P, we have that t factor-avoids P. Since
moreover t prefix-avoids Q, we finally have that
t factor-avoids P and prefix-avoids Q.
∎
2.2.2. Equations for tree series
For any subsets P and Q of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},
let PP,Q be the predicate on
S(G) wherein
PP,Q(t) holds if and only if
P≼ft and Q≼pt. Let also
F(P,Q) be the G-tree series
defined by
[TABLE]
In other terms, F(P,Q) is the
characteristic series of all G-trees factor-avoiding all
trees of P and prefix-avoiding all trees of Q. Since
F(P,∅)=F(P),
we can regard F(P,Q) as a refinement
of F(P). Observe also that
F(P,P′)=F(P)
for all subsets P′ of P. As a side remark, observe that
F(∅,Q) is the characteristic series of
the G-trees prefix-avoiding Q.
Theorem 2.2.4**.**
Let G be an alphabet, and P and Q be two
subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}
such that for any a∈G, there are finitely
many minimal (P∪Q)a-consistent words. The
G-tree series F(P,Q)
satisfies
[TABLE]
Proof.
For any a∈G(k) and any
S∈M((P∪Q)a), let
Pa,S be the predicate on
S(G) wherein
Pa,S(t) holds if and only if
P≼ft, Q≼pt, and t
is S-admissible. As a consequence of
Lemma 2.2.3, we have
[TABLE]
Now, observe that for any
S,S′∈M((P∪Q)a),
the predicates Pa,S∔S′ and
Pa,S∧Pa,S′ are
equal. Observe also that the characteristic series
fa of the G-trees factor-avoiding
P, prefix-avoiding Q, and with a root labeled by
a, satisfies
[TABLE]
Since, by hypothesis,
M((P∪Q)a) is finite, these
three previous properties lead, by using
Lemma 1.2.1, to the relation
[TABLE]
Finally, since any tree factor-avoiding P and prefix-avoiding
Q can be either empty of have a root labeled by a for
any a∈G, we have
Let us consider an example brought by
Theorem 2.2.4 by considering the
set (2.2.1) of patterns. We have
[TABLE]
Observe that the last term of (2.2.14) is the
opposite of the antepenultimate term so that they annihilate.
2.3. Properties and applications
Consequences of Theorem 2.2.4 are now
presented. In particular, we explain how to obtain a system of
equations of generating series to enumerate the syntax trees
factor-avoiding a set P of patterns and prefix-avoiding a set
Q of patterns. We also apply the aforementioned result for
particular sets of patterns consisting in stringy trees.
2.3.1. Systems of equations
Given two subsets P and Q of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}
satisfying the conditions of Theorem 2.2.4,
one can express the series F(P,Q)
through (2.2.9). Some other series
F(P,Si) could appear in the
expression, and these series can themselves be expressed
through (2.2.9) when the conditions of the
theorem are satisfied. When it is the case,
Theorem 2.2.4 leads to a (possibly infinite)
system of equations describing the
series F(P,Q), called the system
of F(P,Q).
Lemma 2.3.1**.**
Let G be an alphabet, P be a subset of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},
and a∈G(k). If Pa is finite,
then the set of all minimal Pa-consistent words is
finite and its cardinality is no greater than k#Pa.
Proof.
We proceed by induction on the cardinality ℓ of Pa.
If ℓ=0, the only Pa-consistent word is the word
(S1,…,Sk) such that Si:=∅ for
all i∈[k]. Hence, the statement of the lemma holds in this
case. Assume now that the statement of the lemma holds when
Pa has cardinality ℓ. Let s be a
G-tree having its root labeled by a. If
S:=(S1,…,Sk) is a
Pa-consistent word, when j∈[k] is an index such
that s(j)=\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture, let us denote by
S(j):=(S1′,…,Sk′) the word defined by
Sj′:=Sj∪{s(j)} and Si′:=Si
for any i∈[k]∖{j}. By construction, S(j)
is a minimal (P∪{s})a-consistent word and
there are at most k such words. By induction hypothesis, there are
at most kℓ minimal Pa-consistent words and
therefore, at most kℓ+1 minimal
(P∪{s})a-consistent words.
∎
For any G-tree, we denote by Suff(t) the set
of all suffixes of t.
Proposition 2.3.2**.**
Let G be an alphabet, and P and Q be two
subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}.
If P and Q are finite, then the system of
F(P,Q) is well-defined and contains
finitely many equations.
Proof.
Let a∈G(k). Since P and Q are
finite, (P∪Q)a is finite. Therefore, by
Lemma 2.3.1,
M((P∪Q)a) is finite.
Moreover, any minimal (P∪Q)a-consistent word
(S1,…,Sk) is such that each Si,
i∈[k], contains only suffixes of trees of
(P∪Q)a. For this reason, all terms
F(P,Si) appearing in the
equation (2.2.9) of
F(P,Q) satisfy
[TABLE]
Since any G-tree has a finite number of suffixes,
there are finitely many sets Si
satisfying (2.3.1). The
statement of the proposition follows.
∎
2.3.2. Limits
Let P be a subset of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}.
For any integer d⩾0, let
[TABLE]
In other words, P∣d is the subset of P of the patterns
having degrees no greater than d.
Proposition 2.3.3**.**
Let G be an alphabet, and P and Q be two
subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}.
Then,
[TABLE]
Proof.
Since any G-tree t factor-avoids (resp.
prefix-avoids) all patterns of degrees greater than deg(t),
for any d⩾deg(t),
[TABLE]
This implies that the coefficients of the series
F(P,Q) and
F(P∣d,Q∣d) coincide for all
the G-trees of degrees no greater than d. The
statement of the proposition follows.
∎
Theorem 2.2.4 and
Proposition 2.3.3 allow us together to
obtain systems of equations for F(P,Q)
even when P and Q are infinite subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}
that do not satisfy the hypothesis of
Theorem 2.2.4.
2.3.3. Generating series and systems of equations
For any subset P of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},
let F(P) be the series of
K⟨⟨t,q,QG⟩⟩ defined by
F(P):=en(F(P)).
In the same way, for any subsets P and Q of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture},
let F(P,Q) be the series of
K⟨⟨t,q,QG⟩⟩ defined by
F(P,Q):=en(F(P,Q)).
The series F(P) is the generating series of the
set of the G-trees factor-avoiding P, and
F(P,Q) is the generating series of the
set of the G-trees factor-avoiding P and
prefix-avoiding Q.
Proposition 2.3.4**.**
Let G be an alphabet, and P and Q be two
subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}
such that for any a∈G,
(P∪Q)a is finite. The generating series
F(P,Q) satisfies
[TABLE]
Proof.
Relation (2.3.5) is obtained
by considering the enumerative images of the left and right members
of (2.2.9) provided by
Theorem 2.2.4, together with
Proposition 1.2.2.
∎
2.3.4. Avoiding stringy trees
A G-tree t is stringy if the height of
t is equal to the degree of t. This is equivalent to the
fact that any internal node of t has at most one child being an
internal node.
For any set P of G-trees,
a∈G(k), and i∈[k], let
[TABLE]
In other words, ∂a,i(P) is the set of the
G-trees obtained by keeping the i-th subtrees of the
trees whose roots are labeled by a in P.
Proposition 2.3.5**.**
Let G be an alphabet and P and Q be two
subsets of
S(G)∖{\leavevmodeto0.8pt\vboxto7.06pt\pgfpicture\makeatletter\lower-6.65962ptto0.0pt\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke\pgfsys@color@rgb@fill000\pgfsys@invoke\pgfsys@setlinewidth0.4pt\pgfsys@invoke\nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke\pgfsys@beginscope\pgfsys@invoke\definecolorpgfstrokecolorrgb0.803125,0.58125,0.39375\pgfsys@color@rgb@stroke0.8031250.581250.39375\pgfsys@invoke\pgfsys@roundcap\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@setlinewidth0.8pt\pgfsys@invoke\pgfsys@moveto0.0pt0.0pt\pgfsys@lineto0.0pt-6.25963pt\pgfsys@stroke\pgfsys@invoke\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture}
consisting only in stringy trees. The G-tree series
F(P,Q) satisfies
[TABLE]
Proof.
Let a∈G(k). When c(a) is in
P∪Q, by definition of consistent words, there is no
(P∪Q)a-consistent word. When c(a)
is not in P∪Q, by definition of minimal consistent
words, the only minimal (P∪Q)a-consistent word
is the word S:=(S1,…,Sk) where
Si:=∂a,i(P∪Q) for any
i∈[k]. Now, (2.3.7) is a
consequence of Theorem 2.2.4.
∎
Let us call G-word any G-tree where
G is an alphabet concentrated in arity 1. This
designation is justified by the fact that one can encode any word
a1…ad on G through the tree
a1∘1⋯∘1ad. When P contains only
G-words different from the leaf, P specifies
forbidden configurations of word factors. Since a G-word
is obviously stringy, Proposition 2.3.5
provides in this context a system of equations to describe the series of
words avoiding factors. This problem consisting in enumerating words
avoiding as factors a given set was originally stated and solved
in [GJ79] (see also [NZ99]).
Besides, when G is any alphabet, let us call
G-edge any G-tree of degree 2.
This appellation is justified by the fact that any tree of degree 2
contains exactly one edge connecting two internal nodes. When P
contains only G-edges, P specifies forbidden
configurations of edges. Since a G-edge is obviously
stringy, Proposition 2.3.5 provides in this
context a system of equations to describe the series of trees avoiding
edges. This particular case of pattern avoidance in trees was
studied in [Lod05] (see also [Par93]).
2.3.5. Sets of patterns for some algebraic series
Let us assume here that K is the field Q. A series f of
K⟨⟨t⟩⟩ is N-algebraic if f satisfies the
equation
[TABLE]
where d is a certain nonnegative integer, for all 0⩽n⩽d,
the Pn are polynomials of Q⟨t⟩ having all coefficients in
N, and ⟨t0,P1⟩=0. For instance, the series f
satisfying
[TABLE]
is N-algebraic.
Proposition 2.3.6**.**
Let f be an N-algebraic series of the
form (2.3.8) such that ⟨t0,P0⟩=0
and ⟨t1,P0⟩=1. Let the alphabet
G:=⨆n⩾2G(n)
where, for any n⩾2,
[TABLE]
and the set of patterns
[TABLE]
The specialization
F(P,∅)∣q:=1,qa:=1,a∈G
satisfies the same algebraic equation as the one satisfied
by f.
Proof.
Observe that P contains only stringy trees. Therefore, the
characteristic series F(P,∅) of
the trees factor-avoiding P is described by
Proposition 2.3.5 and satisfies
[TABLE]
where Q:={c(b):b∈G}.
Now, due to
Proposition 2.3.4,
the enumerative image F(P,∅) of
F(P,∅) satisfies
[TABLE]
where F(P,Q)=t. The statement
of the proposition follows.
∎
Observe that the alphabet G provided by
Proposition 2.3.6 has
[TABLE]
letters, and the set P is made of
[TABLE]
patterns.
Let us consider for example the series f
of (2.3.9). The alphabet and set of
patterns specified by
Proposition 2.3.6, are
[TABLE]
and
[TABLE]
The cardinality of P is
6×(1×3+1×1+1×2+2×3)=72.
2.3.6. Examples
Let us consider some complete examples of systems.
∙* Example 1.*
Let the alphabet
G:=G(2):={ai:i∈N}
and the set of patterns
for the G-trees factor-avoiding P. Observe that
we work here with an infinite alphabet and an infinite set of stringy
patterns. This system contains an infinite number of equations.
2. ∙* Example 2.*
Let the alphabet
G:=G(1):={a,b}
and the set of patterns
Observe that even if P is an infinite set of stringy patterns,
this system contains a finite number of equations. By
Proposition 2.3.4, we obtain the
system
[TABLE]
for the enumerative image of the characteristic series of the
G-trees factor-avoiding P.
3. ∙* Example 3.*
Let the alphabet
G:=G(2):={ai:i∈Z}
and the set of patterns
[TABLE]
By a direct inspection of P, there is a one-to-one
correspondence between the set of the trees factor-avoiding P and
the set of increasing binary trees, which are binary trees where
internal nodes are labeled on Z in such a way that the label of any
node is smaller than the ones of its children. By
Proposition 2.3.5, we obtain the system
[TABLE]
for the G-trees factor-avoiding P, where for any
j∈Z,
[TABLE]
Observe that we work here with an infinite alphabet and an infinite set
of stringy patterns. This system contains an infinite number of
equations.
4. ∙* Example 4.*
Let the alphabet
G:=G(2):={a}
and the set of patterns
for the G-trees factor-avoiding P. Observe that we
work here with a finite alphabet and a finite set of stringy patterns.
The set of patterns considered here comes from an example appearing
in [KP15]. Our system shown here is different from the ones
presented in this cited work.
5. ∙* Example 5.*
Let the alphabet
G:=G(2):={a1,a2}
and the set of patterns
[TABLE]
A direct inspection of P shows that a G-tree
factor-avoids P if and only if any internal node labeled by
a2 have at least one leaf as a child. By
Theorem 2.2.4, we obtain the system
[TABLE]
for the G-trees factor-avoiding P. We work here
with a finite alphabet and a finite set of non-stringy patterns.
3. Operads, enumeration, and statistics
This section is devoted to using operads as tools to enumerate families of
combinatorial objects, jointly with the results presented in the previous
sections enumerating trees factor-avoiding some patterns.
3.1. Nonsymmetric set-operads
We recall here the elementary notions about operads employed thereafter.
They mainly come from [Gir18].
3.1.1. Operad axioms
A nonsymmetric operad in the category of sets, or a
nonsymmetric operad for short, is a graded set O together
with maps
[TABLE]
called partial compositions, and a distinguished element
\mathds1∈O(1), the unit of O. This data has to
satisfy, for any x,y,z∈O, the three relations
[TABLE]
Since we consider in this work only nonsymmetric operads, we shall call
these simply operads.
3.1.2. Elementary definitions
Given an operad O, one defines the full composition maps
of O as the maps
[TABLE]
defined, for any x∈O(n) and y1,…,yn∈O,
by
[TABLE]
When O is combinatorial as a graded set, O is
combinatorial. In this case, the Hilbert seriesHO(t) of O is the generating series
GO(t). If O1 and O2 are two
operads, a map ϕ:O1→O2 is an
operad morphism if it respects arities, sends the unit of
O1 to the unit of O2, and commutes with partial
composition maps. We say that O2 is a suboperad of
O1 if O2 is a graded subset of O1,
O1 and O2 have the same unit, and the partial
compositions of O2 are the ones of O1 restricted on
O2. For any subset G of O, the
operad generated by G is the smallest suboperad
OG of O containing G.
When OG=O and G is
minimal with respect to the inclusion among the subsets of
G satisfying this property, G is a
minimal generating set of O and its elements are
generators of O. An operad congruence of O
is an equivalence relation ≡ respecting the arities and such
that, for any x,y,x′,y′∈O, x≡x′ and
y≡y′ implies x∘iy≡x′∘iy′ for any
i∈[∣x∣]. The ≡-equivalence class of any x∈O is
denoted by [x]≡. Given an operad congruence ≡, the
quotient operadO/≡ is the operad on the set of
all ≡-equivalence classes and defined in the usual way.
3.2. Presentations, rewrite relations, and bases
We recall the notion of presentation by generators and relations of an
operad. By using rewrite systems on syntax trees, this leads to the
notion of bases of an operad. This notion is crucial to see the elements
of an operad satisfying some conditions as syntax trees factor-avoiding
some patterns.
3.2.1. Free operads and presentations
For any graded set G, the free operad on
G is the operad FO(G) wherein for
any n⩾1, FO(G)(n) is the set
S(G)(n) of all G-trees of arity
n. The partial compositions ∘i of FO(G)
are the partial compositions of G-trees (see
Section 1.1.3). A presentation
of an operad O is a pair (G,≡) such that
G is a graded set, ≡ is an operad congruence of
FO(G), and O is isomorphic to
FO(G)/≡. Let us also define the
evaluation mapev:FO(G)→O
as the unique surjective operad morphism satisfying, for any
a∈G, ev(c(a))=a. A
treelike expression on G of an element x of
O is a G-tree of the fiber ev−1(x).
3.2.2. Rewrite rules on trees and pattern avoidance
We explain here and in the next section a useful link for our purposes
between presentations of operads and pattern avoidance in syntax trees.
This link passes by rewrite rules on syntax trees. Notations and notions
about general rewrite rules used here can be found in [BN98].
A rewrite rule on G-trees is an ordered pair
(s,s′) of G-trees such that
∣s∣=∣s′∣. A set of rewrite rules defines a binary relation
→ on FO(G) for which we denote by
s→s′ the fact that (s,s′)∈→.
For any set → of rewrite rules, we denote by ⇒ the
rewrite relation induced by → as the binary relation
satisfying
[TABLE]
if s→s′ where and r, r1, …,
r∣s∣ are G-trees, and i∈[∣r∣].
In other words, one has t⇒t′ if it is possible
to obtain t′ from t by replacing a factor s of
t by s′ whenever s→s′. Let also
⇒∗ be the reflexive and transitive closure of
⇒. If t and t′ are two G-trees
such that t⇒∗t′, then t is
rewritable into t′. If t is a G-tree
such that, for any G-tree t′,
t⇒∗t′ implies t=t′, then
t′ is a normal form for ⇒. The set of all
normal forms for ⇒ is denoted by
N⇒. If there is not infinite chain
t0⇒t1⇒t2⇒⋯,
then ⇒ is terminating. Finally, if for all
G-trees t, s1, and s2 such that
t⇒∗s1 and t⇒∗s2,
there exists a G-tree t′ such that
s1⇒∗t′ and s2⇒∗t′,
then ⇒ is confluent.
Let us denote by P→ the set of the G-trees
appearing as left members of →.
Lemma 3.2.1**.**
If → is a set of rewrite rules on G-trees,
then N⇒ is the set of all the
G-trees factor-avoiding P→.
Proof.
Assume first that t is a G-tree
factor-avoiding P→. Then, due to the
definition (3.2.1) of ⇒,
t is not rewritable by ⇒. Hence, t is a
normal form for ⇒. Conversely, assume that
t∈N⇒. In this case, by definition
of a normal form, t is not rewritable by ⇒, so
that t does not admit any occurrence of a tree appearing as
a left member of →.
∎
3.2.3. Orientations and bases
Let O be an operad admitting a presentation
(G,≡). A set → of rewrite rules is an
orientation of ≡ if the reflexive, symmetric, and
transitive closure of ⇒ is ≡. When ⇒ is
terminating and confluent, the orientation → of ≡ is
faithful.
Lemma 3.2.2**.**
Let O be an operad admitting a presentation
(G,≡) and → be a faithful orientation of
≡. For any n⩾1, the restriction of the evaluation map
ev on N⇒(n) is a bijection between
this last set and O(n).
Proof.
Let x∈O(n). Since G is a generating set
of O, x admits a treelike expression t on
G. Since ⇒ is terminating, there is a
G-tree t′∈[t]≡ such that
t′ is a normal form for ⇒. This implies
ev(t′)=x and shows that ev is surjective.
Since → is an orientation of ≡, if t and
t′ are two normal forms for ⇒ of arity n such
that ev(t)=ev(t′), then
t≡t′. Since ≡ is the reflexive, symmetric,
and transitive closure of ⇒, and since ⇒ is
confluent, any ≡-equivalence class admits at most one normal
form. Hence, t=t′, showing that ⇒ is
injective.
∎
Let O be an operad admitting a presentation
(G,≡). When there exists a faithful orientation
→ of ≡, the set N⇒ is the
→-basis of O. By
Lemma 3.2.2, the is a one-to-one
correspondence between the graded sets N⇒ and
O. Moreover, N⇒ can be described as
the set of the trees factor-avoiding certain trees, as stated by
Lemma 3.2.1. These bases were called
Poincaré-Birkhoff-Witt basis in [Hof10] and maintain strong
connections with Koszulity of operads [GK94, DK10].
3.3. Refinements of Hilbert series and enumeration
We introduce a refinement of the Hilbert series of an operad with
respect to an orientation of one of its presentations. A general
strategy to count combinatorial objects with respect to their sizes and
some statistics relying on operads and factor-avoidance in trees is
provided.
3.3.1. Statistics
A statistics on a set X is a map s:X→N. Let
O be an operad admitting a presentation
(G,≡) faithfully oriented by →. Let us define,
for any a∈G, the statistics sa
on O in the following way. For any x∈O, we set
sa(x):=dega(t) where t is a
treelike expression on G of x which is also a normal
form for ⇒. By Lemma 3.2.2, this
definition is consistent since t is unique among the trees
satisfying these properties.
3.3.2. Refined Hilbert series
The →-Hilbert series of O is the series
H→ of
K⟨⟨t,q,QG⟩⟩ defined by
[TABLE]
In other words, H→ is the enumerative image
of the characteristic series of the G-trees
factor-avoiding the trees appearing as left members of →.
Proposition 3.3.1**.**
Let O be a combinatorial operad admitting a presentation
(G,≡) faithfully oriented by →. Then,
H→ is the series wherein the coefficient of
tnqdqa1α1…qaℓαℓ,n⩾1, d⩾0, αi⩾0, i∈[ℓ], is the
number of elements x of O of arity n, degree d, and
such that sai(x)=αi for
all i∈[ℓ].
Proof.
By Lemmas 3.2.1
and 3.2.2,
F(P→) is the characteristic series of
the →-basis N⇒ of O. The
statement of the proposition follows from the definitions of the
statistics sa, a∈G, and of
the enumerative images of G-tree series.
∎
When O is combinatorial, observe that the →-Hilbert series
of O is a refinement of the Hilbert series of O. Indeed,
by Proposition 3.3.1, the
specialization
H→∣q:=1,qa:=1,a∈G
is the Hilbert series HO(t) of O.
3.3.3. Operads as tools for enumeration
The results presented in the previous sections can be applied, together
with operad theory, for enumerative prospects. Indeed, if X is a
combinatorial graded set for which we want to describe its generating
series GX(t), a strategy consists in
(1)
endowing X with partial composition maps
[TABLE]
so that X admits the structure of an operad;
2. (2)
exhibiting a presentation (G,≡) of the
operad on X just introduced;
3. (3)
providing a faithful orientation → of ≡;
4. (4)
computing the →-Hilbert series H→
of the considered operad on X.
By Proposition 3.3.1,
H→ is a refinement of GX(t)
and hence, the knowledge of H→ leads to the
knowledge of GX(t). Moreover, by
Lemma 3.2.1,
Proposition 2.3.4 provides a way
to express H→ by a system of equations. Also,
this strategy to enumerate X passes by the definition of the
statistics sa, a∈G, on X which
could be of independent interest.
4. Examples about series from operads
This last section contains examples of application of the theory of
operads for enumeration. We recall here the definitions of some operads
involving combinatorial graded sets and apply the results of
Sections 2
and 3 to obtain expressions for their
generating series taking into account of some statistics.
To not overload the notation, the results of the previous sections are
used here implicitly. Moreover, we shall not explicitly prove the
faithfulness of the considered orientations. This can easily be done
by using general results about rewrite rules on trees, as presented
for instance in [Gir18].
4.1. On some classical operads
We begin by considering some well-known and classical operads involving
families of trees: bicolored Schröder trees, binary trees, and based
noncrossing trees.
4.1.1. 2-associative operad
The 2-associative operad [LR06] is the operad 2As
having the presentation (G2As,≡) where
[TABLE]
and ≡ is the finest operad congruence satisfying
[TABLE]
The first dimensions of this operad are
[TABLE]
and form Sequence A006318 of [Slo]. This operad can be
realized as an operad of bicolored Schröder trees (see for
instance [Gir18]), where a bicolored Schröder tree is a
Schröder tree such that each internal node is assigned with an element
of the set {0,1} and all nodes that have a father labeled by [math]
(resp. 1) are labeled by 1 (resp. [math]). A definition of Schröder trees is given in
Section 4.2.2.
By setting that the arity of
a bicolored Schröder tree is the number of its leaves, the set of all
bicolored Schröder trees forms a combinatorial graded set.
The orientation → of ≡ obtained by
orienting (4.1.2a) and (4.1.2b) from
left to right is faithful. The →-Hilbert series of 2As
satisfies
[TABLE]
where
[TABLE]
This series satisfies the algebraic equation
[TABLE]
and writes as
[TABLE]
The statistics sa and sb are
related to Triangle A175124 of [Slo]. These statistics count
the number of internal nodes labeled by [math] (or by 1) in a bicolored
Schröder tree.
4.1.2. Dipterous operad
The dipterous operad [LR03] is the operad Dipt having the
presentation (GDipt,≡) where
[TABLE]
and ≡ is the finest operad congruence satisfying
[TABLE]
The dimensions of this operad are the same as the ones of 2As so
that Dipt can be realized as an operad of bicolored Schröder trees.
The orientation → of ≡ obtained by
orienting (4.1.9a) from left to right,
and (4.1.9b) from right to left is faithful.
The →-Hilbert series of Dipt satisfies
[TABLE]
where
[TABLE]
This series satisfies the algebraic equation
[TABLE]
and writes as
[TABLE]
The statistics sa is related to
Triangle A060693 of [Slo], and the statistics
sb is related to Triangle A088617 of [Slo]
(one is the mirror image of the other). These statistics count the
number of peaks in Schröder paths (which are some paths in one-to-one
correspondence with bicolored Schröder trees).
4.1.3. Duplicial operad
The duplicial operad [Lod08] is the operad Dup having the
presentation (GDup,≡) where
[TABLE]
and ≡ is the finest operad congruence satisfying
[TABLE]
The first dimensions of this operad are
[TABLE]
and form Sequence A000108 of [Slo]. This operad can be
realized as an operad of binary trees.
The orientation → of ≡ obtained by
orienting (4.1.15a), (4.1.15b),
and (4.1.15c) from left to right is faithful. The
→-Hilbert series of Dup satisfies
[TABLE]
where
[TABLE]
This series satisfies the algebraic equation
[TABLE]
and writes as
[TABLE]
The statistics sa and sb are
related to Triangle A001263 of [Slo] known as triangle of
Narayana numbers [Nar55]. These statistics count the number of
edges oriented to the right connecting two internal nodes in a binary
tree (which are in one-to-one correspondence with the elements
of Dup).
4.1.4. Based noncrossing trees
The based noncrossing trees operad [Cha07] (a study of
algebras over this operad was provided in [Ler11]) is the operad
NCT having the presentation (GNCT,≡) where
[TABLE]
and ≡ is the finest operad congruence satisfying
[TABLE]
The first dimensions of this operad are
[TABLE]
and form Sequence A006013 of [Slo]. This operad can be realized as an operad of
based noncrossing trees (see for instance [Gir18]). A based noncrossing tree is
a polygon endowed with some selected edges or diagonals, called chords, with the
restriction that the bottom side of the polygon is a chord, that no chord crosses another
one, and that there is exactly one path formed by chords between any two points of the
polygon. By setting that the arity of a based noncrossing tree is its number of points
minus 1, the set of all based noncrossing trees forms a combinatorial graded set.
The orientation → of ≡ obtained by
orienting (4.1.22) from left to right is faithful. The
→-Hilbert series of NCT satisfies
[TABLE]
where
[TABLE]
This series satisfies the algebraic equation
[TABLE]
and writes as
[TABLE]
The triangles related to the statistics sa and
sb do not appear for the time being in [Slo].
4.2. On some operads from monoids
We shall consider examples of
combinatorial objects endowed with operad structures coming from a
general construction introduced in [Gir15]. Let us recall the
construction. Let M be a monoid, that is a set endowed with an
associative product ⋆ admitting a unit \mathds1M. We
denote by TM the graded set wherein for any n⩾1,
TM(n) is the set of all words of length n on M, seen
as an alphabet. This graded set TM is endowed with the partial
composition maps ∘i defined for any u∈TM(n),
v∈TM(m), and i∈[n], by
[TABLE]
It was shown in [Gir15] that TM is an operad admitting
\mathds1M∈TM(1) as unit. Let N (resp. Nℓ) be
the additive monoid of nonnegative integers (resp. the cyclic monoid of
order ℓ, ℓ⩾1). In particular, the operads TN and
TNℓ admit suboperads whose elements can be interpreted as
combinatorial objects.
4.2.1. m-trees
For any integer m⩾0, an m-tree is a planar rooted tree
wherein all internal nodes have arity m+1. By setting that the arity
of an m-tree is its number of internal nodes, the set of all m-trees
forms a combinatorial graded set.
Let FCat(m) be the suboperad of TN generated by the set
[TABLE]
It was shown in [Gir15] that there is a one-to-one correspondence
between the set FCat(m)(n) and the set of all m-trees of arity
n⩾1. Therefore, FCat(m) is an operad on m-trees. The
dimensions of this operad are provided by the Fuss-Catalan numbers so
that
[TABLE]
This operad admits the presentation
(GFCat(m),≡) where ≡ is the finest
operad congruence satisfying
[TABLE]
The orientation → of ≡ obtained by
orienting all relations (4.2.4) from left to right
is faithful. By denoting, for any k⩾0, by Qk the set
{c(00),c(01),…,c(0k)}, the
→-Hilbert series of FCat(k) satisfies
[TABLE]
where
[TABLE]
By a straightforward computation, we obtain
[TABLE]
Let us now focus on the case m=1, for which FCat(1) is an
operad on binary trees. First, as a particular case
of (4.2.7), the →-Hilbert series of
FCat(1) expresses as
[TABLE]
This is the series (4.1.19) obtained from
the operad Dup. Moreover, as a particular case
of (4.2.4), the operad FCat(1) admits the
presentation (GFCat(1),≡) where ≡ is
the finest operad congruence satisfying
[TABLE]
The orientation → of ≡ obtained by
orienting (4.2.9a)
and (4.2.9b) from left to right,
and (4.2.9c) from right to left is faithful.
The →-Hilbert series of FCat(1) satisfies
[TABLE]
where
[TABLE]
This series satisfies also
[TABLE]
and writes as
[TABLE]
The statistics s00 and s01 are related to
Triangles A033184 and A009766 of [Slo], known as
(the mirror image of) Catalan triangle. These statistics count the
jump-length in a binary tree (see for instance [Kra04]).
4.2.2. Schröder trees
A Schröder tree is a planar rooted tree wherein all internal nodes
have arity 2 or more. By setting that the arity of a Schröder tree is
its number of leaves minus 1, the set of all Schröder trees forms a
combinatorial graded set.
Let Schr be the suboperad of TN generated by the set
[TABLE]
It was shown in [Gir15] that there is a one-to-one correspondence
between the set Schr(n) and the set of all Schröder trees of arity
n⩾1. Therefore, Schr is an operad on Schröder trees.
The first dimensions of this operad are
[TABLE]
and form Sequence A001003 of [Slo]. This operad admits the
presentation (GSchr,≡) where ≡ is the
finest operad congruence satisfying
[TABLE]
The orientation → of ≡ obtained by
orienting (4.2.16a), (4.2.16b),
(4.2.16c), (4.2.16d),
(4.2.16e), and (4.2.16f) from left
to right, and (4.2.16g) from right to left is
faithful. The →-Hilbert series of Schr satisfies
[TABLE]
where
[TABLE]
This series satisfies the algebraic equation
[TABLE]
and writes as
[TABLE]
The statistics s00 and s10 are related to
Triangle A126216 of [Slo], and the statistics
s01 is related to Triangle A114656 of [Slo].
4.2.3. Motzkin paths
A Motzkin path is a path in N2 connecting the points (0,0)
and (n−1,0) by steps in the set {(1,−1),(1,0),(1,1)}. By
setting that the arity of a Motzkin path is n, the set of all Motzkin
paths forms a combinatorial graded set.
Let Motz be the suboperad of TN generated by the set
[TABLE]
It was shown in [Gir15] that there is a one-to-one correspondence
between the set Motz(n) and the set of all Motzkin paths of arity
n⩾1. Therefore, Motz is an operad on Motzkin paths. The first
dimensions of this operad are
[TABLE]
and form Sequence A001006 of [Slo]. This operad admits the
presentation (GMotz,≡) where ≡ is the
finest operad congruence satisfying
[TABLE]
The orientation → of ≡ obtained by
orienting (4.2.23a),
(4.2.23b), (4.2.23c),
and (4.2.23d) from left to right is faithful. The
→-Hilbert series of Motz satisfies
[TABLE]
where
[TABLE]
This series satisfies the algebraic equation
[TABLE]
and writes as
[TABLE]
The statistics s00 and s010 are related to
Triangle A055151 of [Slo]. These statistics count the number
of steps (1,1) in a Motzkin path.
4.2.4. Directed animals
A directed animal is a finite subset A of N2 containing
(0,0) and if (x,y)∈A∖{(0,0)}, then
(x−1,y)∈A or (x,y−1)∈A. By setting that the arity of
a directed animal is its cardinality, the set of all directed animals
forms a combinatorial graded set.
Let DA be the suboperad of TN3 generated by the set
[TABLE]
It was shown in [Gir15] that there is a one-to-one correspondence
between the set DA(n) and the set of all directed animals of arity
n⩾1. Therefore, DA is an operad on directed animals. The first
dimensions of this operad are
[TABLE]
and form Sequence A005773 of [Slo]. This operad admit the
presentation (GDA,≡) where ≡ is the
finest operad congruence satisfying
[TABLE]
The orientation → of ≡ obtained by
orienting (4.2.30a), (4.2.30b) from
left to right, and (4.2.30c)
and (4.2.30d) from right to left, is faithful. The
→-Hilbert series of DA satisfies
[TABLE]
where
[TABLE]
This series satisfies
[TABLE]
and writes as
[TABLE]
The statistics s00 is related to
Triangle A064189 of [Slo], and the statistics
s01 is related to Triangle A026300 of [Slo]
(one is the mirror image of the other).
Bibliography28
The reference list from the paper itself. Each links out to its DOI / PubMed record.
1[BN 98] F. Baader and T. Nipkow. Term rewriting and all that . Cambridge University Press, Cambridge, 1998.
2[Cha 02] F. Chapoton. Rooted trees and an exponential-like series. ar Xiv:math/0209104 , 2002.
3[Cha 07] F. Chapoton. The anticyclic operad of moulds. Int. Math. Res. Notices , 20:Art. ID rnm 078, 36, 2007.
4[Cha 08] F. Chapoton. Operads and algebraic combinatorics of trees. Sém. Lothar. Combin. , 58, 2008.
5[DK 10] V. Dotsenko and A. Khoroshkin. Gröbner bases for operads. Duke Math. J. , 153(2):363–396, 2010.
6[DKS 20] C. Defant, N. Kravitz, and A. Sah. Supertrees. Electron. J. Comb. , 27, 2020.
7[Gir 15] S. Giraudo. Combinatorial operads from monoids. J. Algebr. Comb. , 41(2):493–538, 2015.
8[Gir 18] S. Giraudo. Nonsymmetric Operads in Combinatorics . Springer Nature Switzerland AG, 2018.