Combinatorial operads, rewrite systems, and formal grammars Samuele - - PowerPoint PPT Presentation

combinatorial operads rewrite systems and formal grammars
SMART_READER_LITE
LIVE PREVIEW

Combinatorial operads, rewrite systems, and formal grammars Samuele - - PowerPoint PPT Presentation

Combinatorial operads, rewrite systems, and formal grammars Samuele Giraudo LIGM, Universit Paris-Est Marne-la-Valle Computational Logic and Applications July 12, 2019 1 / 40 Outline Operads Enumeration Generation 2 / 40 Outline


slide-1
SLIDE 1

Combinatorial operads, rewrite systems, and formal grammars

Samuele Giraudo

LIGM, Université Paris-Est Marne-la-Vallée Computational Logic and Applications

July 1–2, 2019

1 / 40

slide-2
SLIDE 2

Outline

Operads Enumeration Generation

2 / 40

slide-3
SLIDE 3

Outline

Operads

3 / 40

slide-4
SLIDE 4

Types of algebraic structures

Combinatorics deals with sets (or spaces) of structured objects: ◮ monoids; ◮ groups; ◮ latices; ◮ associative alg.; ◮ Hopf bialg.; ◮ Lie alg.; ◮ pre-Lie alg.; ◮ dendriform alg.; ◮ duplicial alg.

4 / 40

slide-5
SLIDE 5

Types of algebraic structures

Combinatorics deals with sets (or spaces) of structured objects: ◮ monoids; ◮ groups; ◮ latices; ◮ associative alg.; ◮ Hopf bialg.; ◮ Lie alg.; ◮ pre-Lie alg.; ◮ dendriform alg.; ◮ duplicial alg. Such types of algebras are specified by

  • 1. a collection of operations;
  • 2. a collection of relations between operations.

4 / 40

slide-6
SLIDE 6

Types of algebraic structures

Combinatorics deals with sets (or spaces) of structured objects: ◮ monoids; ◮ groups; ◮ latices; ◮ associative alg.; ◮ Hopf bialg.; ◮ Lie alg.; ◮ pre-Lie alg.; ◮ dendriform alg.; ◮ duplicial alg. Such types of algebras are specified by

  • 1. a collection of operations;
  • 2. a collection of relations between operations.

— Example —

The type of monoids can be specified by

  • 1. the operations ⋆ (binary) and 1 (nullary);
  • 2. the relations (x1 ⋆ x2) ⋆ x3 = x1 ⋆ (x2 ⋆ x3) and x ⋆ 1 = x = 1 ⋆ x.

4 / 40

slide-7
SLIDE 7

Working with operations

Strategy to study types of algebras add a level of indirection by working with algebraic structures where

5 / 40

slide-8
SLIDE 8

Working with operations

Strategy to study types of algebras add a level of indirection by working with algebraic structures where ◮ elements are operations

x

1 n . . .

having n = |x| inputs and 1 output;

5 / 40

slide-9
SLIDE 9

Working with operations

Strategy to study types of algebras add a level of indirection by working with algebraic structures where ◮ elements are operations

x

1 n . . .

having n = |x| inputs and 1 output; ◮ the operation is the composition operation of operations.

5 / 40

slide-10
SLIDE 10

Working with operations

Strategy to study types of algebras add a level of indirection by working with algebraic structures where ◮ elements are operations

x

1 n . . .

having n = |x| inputs and 1 output; ◮ the operation is the composition operation of operations. If x and y are two operations,

  • 1. by selecting an input of x specified by its position i;
  • 2. and by grafing the output of y onto this input,

5 / 40

slide-11
SLIDE 11

Working with operations

Strategy to study types of algebras add a level of indirection by working with algebraic structures where ◮ elements are operations

x

1 n . . .

having n = |x| inputs and 1 output; ◮ the operation is the composition operation of operations. If x and y are two operations,

  • 1. by selecting an input of x specified by its position i;
  • 2. and by grafing the output of y onto this input,

we obtain the new operation

x

1 |x| i . . . . . .

  • i

y

1 |y| . . .

=

x

1 |x|+|y|−1 . . . . . .

y

i i+|y|−1 . . .

.

5 / 40

slide-12
SLIDE 12

Operads

Operads are algebraic structures formalizing the notion of operations and their composition.

6 / 40

slide-13
SLIDE 13

Operads

Operads are algebraic structures formalizing the notion of operations and their composition. A (nonsymmetric set-theoretic) operad is a triple (O, ◦i, 1) where

  • 1. O is a graded set

O :=

  • n1

O(n);

6 / 40

slide-14
SLIDE 14

Operads

Operads are algebraic structures formalizing the notion of operations and their composition. A (nonsymmetric set-theoretic) operad is a triple (O, ◦i, 1) where

  • 1. O is a graded set

O :=

  • n1

O(n);

  • 2. ◦i is a map, called partial composition map,
  • i : O(n) × O(m) → O(n + m − 1),

1 i n, 1 m;

6 / 40

slide-15
SLIDE 15

Operads

Operads are algebraic structures formalizing the notion of operations and their composition. A (nonsymmetric set-theoretic) operad is a triple (O, ◦i, 1) where

  • 1. O is a graded set

O :=

  • n1

O(n);

  • 2. ◦i is a map, called partial composition map,
  • i : O(n) × O(m) → O(n + m − 1),

1 i n, 1 m;

  • 3. 1 is an element of O(1) called unit.

6 / 40

slide-16
SLIDE 16

Operads

Operads are algebraic structures formalizing the notion of operations and their composition. A (nonsymmetric set-theoretic) operad is a triple (O, ◦i, 1) where

  • 1. O is a graded set

O :=

  • n1

O(n);

  • 2. ◦i is a map, called partial composition map,
  • i : O(n) × O(m) → O(n + m − 1),

1 i n, 1 m;

  • 3. 1 is an element of O(1) called unit.

This data has to satisfy some axioms.

6 / 40

slide-17
SLIDE 17

Operad axioms

The associativity relation (x ◦i y) ◦i+j−1 z = x ◦i (y ◦j z) 1 i |x|, 1 j |y| says that the pictured operation can be constructed from top to botom or from botom to top. x

1 |x|+|y|+|z|−2 . . . . . .

y

i i+|y|+|z|−2 . . . . . .

z

i+j−1 i+j+|z|−2 . . . 7 / 40

slide-18
SLIDE 18

Operad axioms

The associativity relation (x ◦i y) ◦i+j−1 z = x ◦i (y ◦j z) 1 i |x|, 1 j |y| says that the pictured operation can be constructed from top to botom or from botom to top. x

1 |x|+|y|+|z|−2 . . . . . .

y

i i+|y|+|z|−2 . . . . . .

z

i+j−1 i+j+|z|−2 . . .

The commutativity relation (x ◦i y) ◦j+|y|−1 z = (x ◦j z) ◦i y 1 i < j |x| says that the pictured operation can be constructed from lef to right or from right to lef. x

1 |x|+|y|+|z|−2 . . . . . . . . .

y

i i+|y|−1 . . .

z

j+|y|+|z|−2 j+|y|−1. . . 7 / 40

slide-19
SLIDE 19

Operad axioms

The associativity relation (x ◦i y) ◦i+j−1 z = x ◦i (y ◦j z) 1 i |x|, 1 j |y| says that the pictured operation can be constructed from top to botom or from botom to top. x

1 |x|+|y|+|z|−2 . . . . . .

y

i i+|y|+|z|−2 . . . . . .

z

i+j−1 i+j+|z|−2 . . .

The commutativity relation (x ◦i y) ◦j+|y|−1 z = (x ◦j z) ◦i y 1 i < j |x| says that the pictured operation can be constructed from lef to right or from right to lef. x

1 |x|+|y|+|z|−2 . . . . . . . . .

y

i i+|y|−1 . . .

z

j+|y|+|z|−2 j+|y|−1. . .

The unitality relation 1 ◦1 x = x = x ◦i 1 1 i |x| says that 1 is the identity map. 1 =

7 / 40

slide-20
SLIDE 20

Operad on permutations

Let Per be the operad wherein: ◮ Per(n) is the set of all permutations of size n, seen through their permutation matrices.

— Example —

  • has arity 9 and denotes the permutation

378651294.

8 / 40

slide-21
SLIDE 21

Operad on permutations

Let Per be the operad wherein: ◮ Per(n) is the set of all permutations of size n, seen through their permutation matrices.

— Example —

  • has arity 9 and denotes the permutation

378651294.

◮ The partial composition σ ◦i ν is the permutation matrix obtained by replacing the ith point of σ by a copy of ν.

— Example —

  • • ◦3
  • • =

8 / 40

slide-22
SLIDE 22

Operad on permutations

Let Per be the operad wherein: ◮ Per(n) is the set of all permutations of size n, seen through their permutation matrices.

— Example —

  • has arity 9 and denotes the permutation

378651294.

◮ The partial composition σ ◦i ν is the permutation matrix obtained by replacing the ith point of σ by a copy of ν.

— Example —

  • • ◦3
  • • =

◮ The unit is the unique permutation • of size 1.

8 / 40

slide-23
SLIDE 23

Operad on paths

Let Path be the operad wherein: ◮ Path(n) is the set of all paths with n points, that are words u1 . . . un

  • f elements of N.

— Example —

has arity 13 and denotes the path 1212232100112.

9 / 40

slide-24
SLIDE 24

Operad on paths

Let Path be the operad wherein: ◮ Path(n) is the set of all paths with n points, that are words u1 . . . un

  • f elements of N.

— Example —

has arity 13 and denotes the path 1212232100112.

◮ The partial composition u ◦i v is the path obtained by replacing the ith point of u by a copy of v.

— Example —

  • 4

= 011232101 ◦4 11224 = 0113344632101

9 / 40

slide-25
SLIDE 25

Operad on paths

Let Path be the operad wherein: ◮ Path(n) is the set of all paths with n points, that are words u1 . . . un

  • f elements of N.

— Example —

has arity 13 and denotes the path 1212232100112.

◮ The partial composition u ◦i v is the path obtained by replacing the ith point of u by a copy of v.

— Example —

  • 4

= 011232101 ◦4 11224 = 0113344632101

◮ The unit is the unique path 0 of size 1, depicted as .

9 / 40

slide-26
SLIDE 26

Some suboperads of Path

For any m 0, an m-Dyck path is a path starting and ending with 0 and made of steps

m

and .

— Example —

is a 2-Dyck path of size 10.

10 / 40

slide-27
SLIDE 27

Some suboperads of Path

For any m 0, an m-Dyck path is a path starting and ending with 0 and made of steps

m

and .

— Example —

is a 2-Dyck path of size 10.

— Proposition —

For any m 0, the set Dyck(m) of all m-Dyck paths is a suboperad of Path.

10 / 40

slide-28
SLIDE 28

Some suboperads of Path

For any m 0, an m-Dyck path is a path starting and ending with 0 and made of steps

m

and .

— Example —

is a 2-Dyck path of size 10.

— Proposition —

For any m 0, the set Dyck(m) of all m-Dyck paths is a suboperad of Path.

A Motzkin path is a path starting and ending with 0 and made of steps , , and .

— Example —

is a Motzkin path of size 16.

10 / 40

slide-29
SLIDE 29

Some suboperads of Path

For any m 0, an m-Dyck path is a path starting and ending with 0 and made of steps

m

and .

— Example —

is a 2-Dyck path of size 10.

— Proposition —

For any m 0, the set Dyck(m) of all m-Dyck paths is a suboperad of Path.

A Motzkin path is a path starting and ending with 0 and made of steps , , and .

— Example —

is a Motzkin path of size 16.

— Proposition —

The set Motz of all Motzkin paths is a suboperad of Path.

10 / 40

slide-30
SLIDE 30

Algebras over operads

Let O be an operad. An algebra over O is a space V equipped, for all x ∈ O(n), with linear maps x : V ⊗ · · · ⊗ V

  • n

→ V

11 / 40

slide-31
SLIDE 31

Algebras over operads

Let O be an operad. An algebra over O is a space V equipped, for all x ∈ O(n), with linear maps x : V ⊗ · · · ⊗ V

  • n

→ V such that 1 is the identity map on V

11 / 40

slide-32
SLIDE 32

Algebras over operads

Let O be an operad. An algebra over O is a space V equipped, for all x ∈ O(n), with linear maps x : V ⊗ · · · ⊗ V

  • n

→ V such that 1 is the identity map on V and the compatibility relation

x

v1 v|x|+|y|−1 . . . . . .

y

vi vi+|y|−1 . . .

=

x ◦i y

v1 v|x|+|y|−1 . . .

holds for any x, y ∈ O, i ∈ [|x|], and v1, . . . , v|x|+|y|−1 ∈ V.

11 / 40

slide-33
SLIDE 33

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1.

12 / 40

slide-34
SLIDE 34

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2.

12 / 40

slide-35
SLIDE 35

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1

12 / 40

slide-36
SLIDE 36

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1 where ⋆2 satisfies, for all v1, v2, v3 ∈ V, (⋆2 ◦1 ⋆2) (v1, v2, v3)

  • (⋆2 ◦2 ⋆2) (v1, v2, v3)

12 / 40

slide-37
SLIDE 37

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1 where ⋆2 satisfies, for all v1, v2, v3 ∈ V, (⋆2 ◦1 ⋆2) (v1, v2, v3) = ⋆2 (⋆2 (v1, v2) , v3)

  • (⋆2 ◦2 ⋆2) (v1, v2, v3)

12 / 40

slide-38
SLIDE 38

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1 where ⋆2 satisfies, for all v1, v2, v3 ∈ V, (⋆2 ◦1 ⋆2) (v1, v2, v3) = ⋆2 (⋆2 (v1, v2) , v3)

  • (⋆2 ◦2 ⋆2) (v1, v2, v3) = ⋆2 (v1, ⋆2 (v2, v3)) .

12 / 40

slide-39
SLIDE 39

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1 where ⋆2 satisfies, for all v1, v2, v3 ∈ V, (⋆2 ◦1 ⋆2) (v1, v2, v3) = ⋆2 (⋆2 (v1, v2) , v3)

  • (⋆2 ◦2 ⋆2) (v1, v2, v3) = ⋆2 (v1, ⋆2 (v2, v3)) .

12 / 40

slide-40
SLIDE 40

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1 where ⋆2 satisfies, for all v1, v2, v3 ∈ V, (⋆2 ◦1 ⋆2) (v1, v2, v3) = ⋆2 (⋆2 (v1, v2) , v3)

  • (⋆2 ◦2 ⋆2) (v1, v2, v3) = ⋆2 (v1, ⋆2 (v2, v3)) .

Using infix notation for the binary operation ⋆2, we obtain the relation (v1 ⋆2 v2) ⋆2 v3 = v1 ⋆2 (v2 ⋆2 v3) , so that algebras over As are associative algebras.

12 / 40

slide-41
SLIDE 41

Algebras over operads

— Example —

Let As be the associative operad defined by As(n) := {⋆n} for all n 1 and ⋆n ◦i ⋆m := ⋆n+m−1. This operad is minimally generated by ⋆2. Any algebra over As is a space V endowed with linear operations ⋆n of arity n 1 where ⋆2 satisfies, for all v1, v2, v3 ∈ V, (⋆2 ◦1 ⋆2) (v1, v2, v3) = ⋆2 (⋆2 (v1, v2) , v3)

  • (⋆2 ◦2 ⋆2) (v1, v2, v3) = ⋆2 (v1, ⋆2 (v2, v3)) .

Using infix notation for the binary operation ⋆2, we obtain the relation (v1 ⋆2 v2) ⋆2 v3 = v1 ⋆2 (v2 ⋆2 v3) , so that algebras over As are associative algebras.

In the same way, there are operads for

◮ Lie alg.; ◮ pre-Lie alg. [Chapoton, Livernet, 2001]; ◮ dendriform alg. [Loday, 2001]; ◮ duplicial alg. [Loday, 2008]; ◮ diassociative alg. [Loday, 2001]; ◮ brace alg.

12 / 40

slide-42
SLIDE 42

Scope of operads

As main benefits, operads ◮ offer a formalism to compute over operations; ◮ allow us to work virtually with all the structures of a type; ◮ lead to discover the underlying combinatorics of types of algebras.

13 / 40

slide-43
SLIDE 43

Scope of operads

As main benefits, operads ◮ offer a formalism to compute over operations; ◮ allow us to work virtually with all the structures of a type; ◮ lead to discover the underlying combinatorics of types of algebras. Endowing a set of combinatorial objects with an operad structure helps to ◮ highlight elementary building block for the objects; ◮ build combinatorial structures (graded graphs, posets, latices, etc.); ◮ enumerative prospects and discovery of statistics.

13 / 40

slide-44
SLIDE 44

Outline

Enumeration

14 / 40

slide-45
SLIDE 45

Syntax trees

An alphabet is a graded set G :=

n1 G(n).

15 / 40

slide-46
SLIDE 46

Syntax trees

An alphabet is a graded set G :=

n1 G(n).

Let S(G) be the set of G-syntax trees, defined recursively by ◮ ∈ S(G); ◮ if a ∈ G and t1, . . . , t|a| ∈ S(G), then a(t1, . . . , t|a| ) ∈ S(G).

— Example —

Let G := G(2) ⊔ G(3) such that G(2) = {a, b} and G(3) = {c}.

c b c b b a c a

denotes the G-tree c(, c( a(, ), , b( a(, ), c(, , ) ) ), b(, b(, ) ) ) having degree 8 and arity 12.

15 / 40

slide-47
SLIDE 47

Syntax trees

An alphabet is a graded set G :=

n1 G(n).

Let S(G) be the set of G-syntax trees, defined recursively by ◮ ∈ S(G); ◮ if a ∈ G and t1, . . . , t|a| ∈ S(G), then a(t1, . . . , t|a| ) ∈ S(G). Let t ∈ S(G). Some definitions: ◮ is the leaf; ◮ the degree deg(t) of t is its number of internal nodes; ◮ the arity |t| of t is its number of leaves.

— Example —

Let G := G(2) ⊔ G(3) such that G(2) = {a, b} and G(3) = {c}.

c b c b b a c a

denotes the G-tree c(, c( a(, ), , b( a(, ), c(, , ) ) ), b(, b(, ) ) ) having degree 8 and arity 12.

15 / 40

slide-48
SLIDE 48

Compositions of syntax trees

Let t, s ∈ S(G). For each i ∈ [|t|], the partial composition t ◦i s is the tree

  • btained by grafing the root of s onto the ith leaf of t.

— Example —

c b a c b

  • 5

a b c

=

c b c b b a c a

16 / 40

slide-49
SLIDE 49

Compositions of syntax trees

Let t, s ∈ S(G). For each i ∈ [|t|], the partial composition t ◦i s is the tree

  • btained by grafing the root of s onto the ith leaf of t.

— Example —

c b a c b

  • 5

a b c

=

c b c b b a c a

Let t, s1, ..., s|t| be G-trees. The full composition t ◦

  • s1, . . . , s|t|
  • is
  • btained by grafing simultaneously the roots of each si onto the ith leaf
  • f t.

— Example —

b a

 

a a b , , c

   =

a c a b b a

16 / 40

slide-50
SLIDE 50

Free operads

Let G be an alphabet.

17 / 40

slide-51
SLIDE 51

Free operads

Let G be an alphabet. The free operad on G is the operad on the set S(G) wherein ◮ elements of arity n are the G-trees of arity n;

17 / 40

slide-52
SLIDE 52

Free operads

Let G be an alphabet. The free operad on G is the operad on the set S(G) wherein ◮ elements of arity n are the G-trees of arity n; ◮ the partial composition map ◦i is the one of the G-trees;

17 / 40

slide-53
SLIDE 53

Free operads

Let G be an alphabet. The free operad on G is the operad on the set S(G) wherein ◮ elements of arity n are the G-trees of arity n; ◮ the partial composition map ◦i is the one of the G-trees; ◮ the unit is .

17 / 40

slide-54
SLIDE 54

Free operads

Let G be an alphabet. The free operad on G is the operad on the set S(G) wherein ◮ elements of arity n are the G-trees of arity n; ◮ the partial composition map ◦i is the one of the G-trees; ◮ the unit is . Let c : G → S(G) be the natural injection (made implicit in the sequel).

17 / 40

slide-55
SLIDE 55

Free operads

Let G be an alphabet. The free operad on G is the operad on the set S(G) wherein ◮ elements of arity n are the G-trees of arity n; ◮ the partial composition map ◦i is the one of the G-trees; ◮ the unit is . Let c : G → S(G) be the natural injection (made implicit in the sequel). Free operads satisfy the following universality property. For any alphabet G, any operad O, and any map f : G → O preserving the arities, there exists a unique op- erad morphism φ : S(G) → O such that f = φ ◦ c. G O S(G) f c φ

17 / 40

slide-56
SLIDE 56

Factors and prefixes

Let t, s ∈ S(G).

18 / 40

slide-57
SLIDE 57

Factors and prefixes

Let t, s ∈ S(G). If t decomposes as t = r ◦i

  • s ◦
  • r1, . . . , r[s|
  • for some trees r, r1, ..., r|s|, and i ∈ [|r|], then s is a factor of t.

This property is denoted by s f t.

— Example —

c b

f

a b a b c c b b

18 / 40

slide-58
SLIDE 58

Factors and prefixes

Let t, s ∈ S(G). If t decomposes as t = r ◦i

  • s ◦
  • r1, . . . , r[s|
  • for some trees r, r1, ..., r|s|, and i ∈ [|r|], then s is a factor of t.

This property is denoted by s f t. If in the previous decomposition r = , then s is a prefix of t. This property is denoted by s p t.

— Example —

c b

f

a b a b c c b b c b b

p

a b a b c c b b

18 / 40

slide-59
SLIDE 59

Patern avoidance and enumeration

A G-tree t avoids a G-tree s if s✚ ✚ ft.

19 / 40

slide-60
SLIDE 60

Patern avoidance and enumeration

A G-tree t avoids a G-tree s if s✚ ✚ ft. For any P ⊆ S(G), let A(P) = {t ∈ S(G) : for all s ∈ P, s✚ ✚ ft} .

19 / 40

slide-61
SLIDE 61

Patern avoidance and enumeration

A G-tree t avoids a G-tree s if s✚ ✚ ft. For any P ⊆ S(G), let A(P) = {t ∈ S(G) : for all s ∈ P, s✚ ✚ ft} .

— Qestion —

Enumerate A(P) w.r.t. the arities of the trees.

19 / 40

slide-62
SLIDE 62

Patern avoidance and enumeration

A G-tree t avoids a G-tree s if s✚ ✚ ft. For any P ⊆ S(G), let A(P) = {t ∈ S(G) : for all s ∈ P, s✚ ✚ ft} .

— Example —

◮ A

  • a

a b a a b b b

  • is enumerated by 1, 2, 4, 8, 16, 32, 64, 128, . . . .

— Qestion —

Enumerate A(P) w.r.t. the arities of the trees.

19 / 40

slide-63
SLIDE 63

Patern avoidance and enumeration

A G-tree t avoids a G-tree s if s✚ ✚ ft. For any P ⊆ S(G), let A(P) = {t ∈ S(G) : for all s ∈ P, s✚ ✚ ft} .

— Example —

◮ A

  • a

a b a a b b b

  • is enumerated by 1, 2, 4, 8, 16, 32, 64, 128, . . . .

◮ A

  • a

a c a a c c c

  • is enumerated by 1, 1, 2, 4, 9, 21, 51, 127, . . . (A001006).

— Qestion —

Enumerate A(P) w.r.t. the arities of the trees.

19 / 40

slide-64
SLIDE 64

Patern avoidance and enumeration

A G-tree t avoids a G-tree s if s✚ ✚ ft. For any P ⊆ S(G), let A(P) = {t ∈ S(G) : for all s ∈ P, s✚ ✚ ft} .

— Example —

◮ A

  • a

a b a a b b b

  • is enumerated by 1, 2, 4, 8, 16, 32, 64, 128, . . . .

◮ A

  • a

a c a a c c c

  • is enumerated by 1, 1, 2, 4, 9, 21, 51, 127, . . . (A001006).

◮ A  

a a a b b a b b b

  is enumerated by 1,2,5,13,35,96,267,750,. . . (A005773).

— Qestion —

Enumerate A(P) w.r.t. the arities of the trees.

19 / 40

slide-65
SLIDE 65

Formal power series of trees

For any P, Q ⊆ S(G), let F(P, Q) :=

  • t∈S(G)

t∈A(P) ∀s∈Q,s✚

pt

t. This is the formal sum of all the G-trees avoiding as factors all paterns of P and avoiding as prefixes all paterns of Q.

20 / 40

slide-66
SLIDE 66

Formal power series of trees

For any P, Q ⊆ S(G), let F(P, Q) :=

  • t∈S(G)

t∈A(P) ∀s∈Q,s✚

pt

t. This is the formal sum of all the G-trees avoiding as factors all paterns of P and avoiding as prefixes all paterns of Q. Since ◮ F(P, ∅) is the formal sum of all the trees of A(P);

20 / 40

slide-67
SLIDE 67

Formal power series of trees

For any P, Q ⊆ S(G), let F(P, Q) :=

  • t∈S(G)

t∈A(P) ∀s∈Q,s✚

pt

t. This is the formal sum of all the G-trees avoiding as factors all paterns of P and avoiding as prefixes all paterns of Q. Since ◮ F(P, ∅) is the formal sum of all the trees of A(P); ◮ the linear map t → z|t| sends F(P, ∅) to the generating series

  • f A(P);

20 / 40

slide-68
SLIDE 68

Formal power series of trees

For any P, Q ⊆ S(G), let F(P, Q) :=

  • t∈S(G)

t∈A(P) ∀s∈Q,s✚

pt

t. This is the formal sum of all the G-trees avoiding as factors all paterns of P and avoiding as prefixes all paterns of Q. Since ◮ F(P, ∅) is the formal sum of all the trees of A(P); ◮ the linear map t → z|t| sends F(P, ∅) to the generating series

  • f A(P);

the series F(P, Q) contains all the enumerative data about the trees avoiding P.

20 / 40

slide-69
SLIDE 69

System of equations

When G, P, and Q satisfy some conditions, F(P, Q) expresses as an inclusion-exclusion formula involving simpler terms F (P, Si).

— Theorem —

The series F(P, Q) satisfies

F(P, Q) = +

  • k1

a∈G(k)

  • ℓ1
  • R(1),...,R(ℓ)

⊆M((P∪Q)a) (S1,...,Sk)=R(1)∔···∔R(ℓ)

(−1)1+ℓa¯

  • [F (P, S1) , . . . , F (P, Sk)] .

21 / 40

slide-70
SLIDE 70

System of equations

When G, P, and Q satisfy some conditions, F(P, Q) expresses as an inclusion-exclusion formula involving simpler terms F (P, Si).

— Theorem —

The series F(P, Q) satisfies

F(P, Q) = +

  • k1

a∈G(k)

  • ℓ1
  • R(1),...,R(ℓ)

⊆M((P∪Q)a) (S1,...,Sk)=R(1)∔···∔R(ℓ)

(−1)1+ℓa¯

  • [F (P, S1) , . . . , F (P, Sk)] .

This leads to a system of equations for the generating series of A(P). Indeed, the generating series of A(P) is the series F(P, ∅) where

F(P, Q) = z +

  • k1

a∈G(k)

  • ℓ1
  • R(1),...,R(ℓ)

⊆M((P∪Q)a) (S1,...,Sk)=R(1)∔···∔R(ℓ)

(−1)1+ℓ

i∈[k]

F (P, Si) .

21 / 40

slide-71
SLIDE 71

System of equations

— Example —

For P :=

  • a

a b

  • , we obtain the system of formal power series of trees

F(P, ∅) = + a¯

  • [F(P, {a}), F(P, ∅)] + a¯
  • [F(P, ∅), F(P, {b})]

− a¯

  • [F(P, {a}), F(P, {b})] + b¯
  • [F(P, ∅), F(P, ∅)] ,

F(P, {a}) = + b¯

  • [F(P, ∅), F(P, ∅)] ,

F(P, {b}) = + a¯

  • [F(P, {a}), F(P, ∅)] + a¯
  • [F(P, ∅), F(P, {b})]

− a¯

  • [F(P, {a}), F(P, {b})] .

22 / 40

slide-72
SLIDE 72

System of equations

— Example —

For P :=

  • a

a b

  • , we obtain the system of formal power series of trees

F(P, ∅) = + a¯

  • [F(P, {a}), F(P, ∅)] + a¯
  • [F(P, ∅), F(P, {b})]

− a¯

  • [F(P, {a}), F(P, {b})] + b¯
  • [F(P, ∅), F(P, ∅)] ,

F(P, {a}) = + b¯

  • [F(P, ∅), F(P, ∅)] ,

F(P, {b}) = + a¯

  • [F(P, {a}), F(P, ∅)] + a¯
  • [F(P, ∅), F(P, {b})]

− a¯

  • [F(P, {a}), F(P, {b})] .

This leads to the system of generating series F(P, ∅) = z + F(P, {a})F(P, ∅) + F(P, ∅)F(P, {b}) − F(P, {a})F(P, {b}) + F(P, ∅)F(P, ∅), F(P, {a}) = z + F(P, ∅)F(P, ∅), F(P, {b}) = z + F(P, {a})F(P, ∅) + F(P, ∅)F(P, {b}) − F(P, {a})F(P, {b}).

22 / 40

slide-73
SLIDE 73

System of equations

— Example —

For P :=

  • a

a b

  • , we obtain the system of formal power series of trees

F(P, ∅) = + a¯

  • [F(P, {a}), F(P, ∅)] + a¯
  • [F(P, ∅), F(P, {b})]

− a¯

  • [F(P, {a}), F(P, {b})] + b¯
  • [F(P, ∅), F(P, ∅)] ,

F(P, {a}) = + b¯

  • [F(P, ∅), F(P, ∅)] ,

F(P, {b}) = + a¯

  • [F(P, {a}), F(P, ∅)] + a¯
  • [F(P, ∅), F(P, {b})]

− a¯

  • [F(P, {a}), F(P, {b})] .

This leads to the system of generating series F(P, ∅) = z + F(P, {a})F(P, ∅) + F(P, ∅)F(P, {b}) − F(P, {a})F(P, {b}) + F(P, ∅)F(P, ∅), F(P, {a}) = z + F(P, ∅)F(P, ∅), F(P, {b}) = z + F(P, {a})F(P, ∅) + F(P, ∅)F(P, {b}) − F(P, {a})F(P, {b}). As a consequence, F(P, ∅) satisfies z − F(P, ∅) + (2 + z)F(P, ∅)2 − F(P, ∅)3 + F(P, ∅)4 = 0.

22 / 40

slide-74
SLIDE 74

Operads and presentations

Let O be an operad. A congruence of O is an equivalence relation ≡ on O preserving the arities and such that x ≡ x′ and y ≡ y′ imply x ◦i y ≡ x′ ◦i y′ for all i ∈ [|x|].

23 / 40

slide-75
SLIDE 75

Operads and presentations

Let O be an operad. A congruence of O is an equivalence relation ≡ on O preserving the arities and such that x ≡ x′ and y ≡ y′ imply x ◦i y ≡ x′ ◦i y′ for all i ∈ [|x|]. A presentation of O is a pair (G, ≡) such that G is an alphabet and ≡ is a congruence of O satisfying O ≃ S(G)/≡.

23 / 40

slide-76
SLIDE 76

Operads and presentations

Let O be an operad. A congruence of O is an equivalence relation ≡ on O preserving the arities and such that x ≡ x′ and y ≡ y′ imply x ◦i y ≡ x′ ◦i y′ for all i ∈ [|x|]. A presentation of O is a pair (G, ≡) such that G is an alphabet and ≡ is a congruence of O satisfying O ≃ S(G)/≡.

— Example —

The operad Motz admits the presentation (G, ≡) where G :=

  • ,
  • 23 / 40
slide-77
SLIDE 77

Operads and presentations

Let O be an operad. A congruence of O is an equivalence relation ≡ on O preserving the arities and such that x ≡ x′ and y ≡ y′ imply x ◦i y ≡ x′ ◦i y′ for all i ∈ [|x|]. A presentation of O is a pair (G, ≡) such that G is an alphabet and ≡ is a congruence of O satisfying O ≃ S(G)/≡.

— Example —

The operad Motz admits the presentation (G, ≡) where G :=

  • ,
  • and ≡ is the smallest operad congruence satisfying
  • 1

  • 2

,

  • 1

  • 2

,

  • 1

  • 3

,

  • 1

  • 3

.

23 / 40

slide-78
SLIDE 78

Operads and paterns

Let O be an operad admiting a presentation (G, ≡).

24 / 40

slide-79
SLIDE 79

Operads and paterns

Let O be an operad admiting a presentation (G, ≡). A basis of O is a subset B of S(G) such that for any [t]≡ ∈ S(G)/≡, there exists a unique s ∈ [t]≡ ∩ B.

24 / 40

slide-80
SLIDE 80

Operads and paterns

Let O be an operad admiting a presentation (G, ≡). A basis of O is a subset B of S(G) such that for any [t]≡ ∈ S(G)/≡, there exists a unique s ∈ [t]≡ ∩ B. In most cases, B can be described as set of G-trees avoiding a subset PB

  • f S(G).

24 / 40

slide-81
SLIDE 81

Operads and paterns

Let O be an operad admiting a presentation (G, ≡). A basis of O is a subset B of S(G) such that for any [t]≡ ∈ S(G)/≡, there exists a unique s ∈ [t]≡ ∩ B. In most cases, B can be described as set of G-trees avoiding a subset PB

  • f S(G).

— Example —

The set B, described as the set of G-trees avoiding PB :=

  • 1

,

  • 1

,

  • 1

,

  • 1
  • ,

is a basis of Motz.

24 / 40

slide-82
SLIDE 82

Operads and paterns

Let O be an operad admiting a presentation (G, ≡). A basis of O is a subset B of S(G) such that for any [t]≡ ∈ S(G)/≡, there exists a unique s ∈ [t]≡ ∩ B. In most cases, B can be described as set of G-trees avoiding a subset PB

  • f S(G).

— Example —

The set B, described as the set of G-trees avoiding PB :=

  • 1

,

  • 1

,

  • 1

,

  • 1
  • ,

is a basis of Motz.

Rewrite systems on G-trees are good tools to compute bases (we find terminating and confluent orientations ⇒ of ≡).

24 / 40

slide-83
SLIDE 83

Operads and enumeration

Let X be a family of combinatorial objects we want enumerate. The approach using operads consists in

  • 1. endowing X with the structure of an operad OX;

25 / 40

slide-84
SLIDE 84

Operads and enumeration

Let X be a family of combinatorial objects we want enumerate. The approach using operads consists in

  • 1. endowing X with the structure of an operad OX;
  • 2. exhibiting a presentation (G, ≡) of OX and a basis B;

25 / 40

slide-85
SLIDE 85

Operads and enumeration

Let X be a family of combinatorial objects we want enumerate. The approach using operads consists in

  • 1. endowing X with the structure of an operad OX;
  • 2. exhibiting a presentation (G, ≡) of OX and a basis B;
  • 3. computing the series F (PB, ∅) where PB is a set of G-trees

satisfying A (PB) = B.

25 / 40

slide-86
SLIDE 86

Operads and enumeration

Let X be a family of combinatorial objects we want enumerate. The approach using operads consists in

  • 1. endowing X with the structure of an operad OX;
  • 2. exhibiting a presentation (G, ≡) of OX and a basis B;
  • 3. computing the series F (PB, ∅) where PB is a set of G-trees

satisfying A (PB) = B.

— Example —

To enumerate Motzkin paths (w.r.t. their sizes), we consider their operad structure Motz.

25 / 40

slide-87
SLIDE 87

Operads and enumeration

Let X be a family of combinatorial objects we want enumerate. The approach using operads consists in

  • 1. endowing X with the structure of an operad OX;
  • 2. exhibiting a presentation (G, ≡) of OX and a basis B;
  • 3. computing the series F (PB, ∅) where PB is a set of G-trees

satisfying A (PB) = B.

— Example —

To enumerate Motzkin paths (w.r.t. their sizes), we consider their operad structure Motz. Let a := , c := , and P :=

  • a

a c a a c c c

  • .

25 / 40

slide-88
SLIDE 88

Operads and enumeration

Let X be a family of combinatorial objects we want enumerate. The approach using operads consists in

  • 1. endowing X with the structure of an operad OX;
  • 2. exhibiting a presentation (G, ≡) of OX and a basis B;
  • 3. computing the series F (PB, ∅) where PB is a set of G-trees

satisfying A (PB) = B.

— Example —

To enumerate Motzkin paths (w.r.t. their sizes), we consider their operad structure Motz. Let a := , c := , and P :=

  • a

a c a a c c c

  • .

We have F(P, ∅) = + a¯

  • [F(P, {a, c}), F(P, ∅)] + c¯
  • [F(P, {a, c}), F(P, ∅), F(P, ∅)] ,

F(P, {a, c}) = , so that, the generating series of Motzkin paths satisfies F(P, ∅) = z + zF(P, ∅) + zF(P, ∅)2.

25 / 40

slide-89
SLIDE 89

Outline

Generation

26 / 40

slide-90
SLIDE 90

Context-free grammars

Let A = V ⊔ T be a set where V is a set of variables and T is a set of terminal symbols.

27 / 40

slide-91
SLIDE 91

Context-free grammars

Let A = V ⊔ T be a set where V is a set of variables and T is a set of terminal symbols. A rule is a pair (x, v) ∈ V × A∗. A set R of rules specifies a rewrite rule →

  • n A∗ by seting

u x w → u v w for any u, w ∈ A∗ provided that (x, v) ∈ R.

27 / 40

slide-92
SLIDE 92

Context-free grammars

Let A = V ⊔ T be a set where V is a set of variables and T is a set of terminal symbols. A rule is a pair (x, v) ∈ V × A∗. A set R of rules specifies a rewrite rule →

  • n A∗ by seting

u x w → u v w for any u, w ∈ A∗ provided that (x, v) ∈ R.

— Example —

Let V := {x, y}, T := {a, b, c}, and R := {(x, b) , (x, xay) , (y, ac)}. We have bxx → bxayx → bbayx → bbaacx.

27 / 40

slide-93
SLIDE 93

Regular tree grammars

Let V be a set of variables and T be an alphabet of terminal symbols.

28 / 40

slide-94
SLIDE 94

Regular tree grammars

Let V be a set of variables and T be an alphabet of terminal symbols. A (V , T)-tree is a planar rooted tree where internal nodes are labeled on T and leaves are labeled on V .

28 / 40

slide-95
SLIDE 95

Regular tree grammars

Let V be a set of variables and T be an alphabet of terminal symbols. A (V , T)-tree is a planar rooted tree where internal nodes are labeled on T and leaves are labeled on V . A rule is a pair (x, t) where x ∈ V and t is a (V , T)-tree. A set R of rules specifies a rewrite rule → on the set of all (V , T)-trees by seting

s x

s t

for any (V , T)-tree s having a leaf labeled by x, provided that (x, t) ∈ R.

28 / 40

slide-96
SLIDE 96

Regular tree grammars

Let V be a set of variables and T be an alphabet of terminal symbols. A (V , T)-tree is a planar rooted tree where internal nodes are labeled on T and leaves are labeled on V . A rule is a pair (x, t) where x ∈ V and t is a (V , T)-tree. A set R of rules specifies a rewrite rule → on the set of all (V , T)-trees by seting

s x

s t

for any (V , T)-tree s having a leaf labeled by x, provided that (x, t) ∈ R.

— Example —

Let V := {x, y}, T := {a, b} where |a| := 1, |b| := 2, and R :=

  • x,

y

a

  • ,
  • y,

x y x

b b

  • .

We have

x x

b a

y x

a b a

x y x x

a b b b a

.

28 / 40

slide-97
SLIDE 97

General generation

Objectives: ◮ Introduce generating systems for any kind of combinatorial objects; ◮ Retrieve the generation of words and of trees as special cases; ◮ Develop a toolbox for the enumeration of combinatorial objects.

29 / 40

slide-98
SLIDE 98

General generation

Objectives: ◮ Introduce generating systems for any kind of combinatorial objects; ◮ Retrieve the generation of words and of trees as special cases; ◮ Develop a toolbox for the enumeration of combinatorial objects.

— Key idea —

Use colored operads, where ◮ colors play the role of variables and terminal symbols; ◮ Formal series on colored operad and their operations support enumeration.

29 / 40

slide-99
SLIDE 99

Colored operads

Colored operads are algebraic structures formalizing the notion of partial

  • perations and their composition.

30 / 40

slide-100
SLIDE 100

Colored operads

Colored operads are algebraic structures formalizing the notion of partial

  • perations and their composition.

A colored operad is a quadruplet (C, C, ◦i, 1c) where

  • 1. C is a finite set of colors;

30 / 40

slide-101
SLIDE 101

Colored operads

Colored operads are algebraic structures formalizing the notion of partial

  • perations and their composition.

A colored operad is a quadruplet (C, C, ◦i, 1c) where

  • 1. C is a finite set of colors;
  • 2. C is a set of the form

C :=

  • (a,u)∈C×C+

C(a, u);

30 / 40

slide-102
SLIDE 102

Colored operads

Colored operads are algebraic structures formalizing the notion of partial

  • perations and their composition.

A colored operad is a quadruplet (C, C, ◦i, 1c) where

  • 1. C is a finite set of colors;
  • 2. C is a set of the form

C :=

  • (a,u)∈C×C+

C(a, u);

  • 3. ◦i is a map, called partial composition map,
  • i : C(a, u) × C (ui, v) → C (a, u ◦i v) ,

1 i |u|, where u ◦i v is the word obtained by replacing the ith leter of u by v;

30 / 40

slide-103
SLIDE 103

Colored operads

Colored operads are algebraic structures formalizing the notion of partial

  • perations and their composition.

A colored operad is a quadruplet (C, C, ◦i, 1c) where

  • 1. C is a finite set of colors;
  • 2. C is a set of the form

C :=

  • (a,u)∈C×C+

C(a, u);

  • 3. ◦i is a map, called partial composition map,
  • i : C(a, u) × C (ui, v) → C (a, u ◦i v) ,

1 i |u|, where u ◦i v is the word obtained by replacing the ith leter of u by v;

  • 4. for any c ∈ C, 1c is an element of C(c, c) called c-colored unit.

30 / 40

slide-104
SLIDE 104

Colored operads

Colored operads are algebraic structures formalizing the notion of partial

  • perations and their composition.

A colored operad is a quadruplet (C, C, ◦i, 1c) where

  • 1. C is a finite set of colors;
  • 2. C is a set of the form

C :=

  • (a,u)∈C×C+

C(a, u);

  • 3. ◦i is a map, called partial composition map,
  • i : C(a, u) × C (ui, v) → C (a, u ◦i v) ,

1 i |u|, where u ◦i v is the word obtained by replacing the ith leter of u by v;

  • 4. for any c ∈ C, 1c is an element of C(c, c) called c-colored unit.

This data has to satisfy some axioms, similar to the ones of operads.

30 / 40

slide-105
SLIDE 105

Colored operations

Any element x of C(a, u) can be seen as a colored operation

x

1 |x|

a u1 u|x|

. . .

where a color is assigned to the output and to each input of x.

31 / 40

slide-106
SLIDE 106

Colored operations

Any element x of C(a, u) can be seen as a colored operation

x

1 |x|

a u1 u|x|

. . .

where a color is assigned to the output and to each input of x. Moreover, the partial composition map requires a condition on the colors:

x

1 |x| i

a u1 u|x| ui

. . . . . .

  • i

y

1 |y|

ui v1 v|y|

. . .

=

x

1 |x| + |y| − 1 . . . . . .

a u1 u|x|

y

i i + |y| − 1

v1 v|y|

. . .

ui

.

31 / 40

slide-107
SLIDE 107

Bud operads

Let O be an operad and C be a set of colors.

32 / 40

slide-108
SLIDE 108

Bud operads

Let O be an operad and C be a set of colors. The C-bud operad of O is the colored operad BC(O) wherein: ◮ BC(O)(a, u) is the set of all triples (a, x, u) where x ∈ O and (a, u) ∈ C × C|x|.

32 / 40

slide-109
SLIDE 109

Bud operads

Let O be an operad and C be a set of colors. The C-bud operad of O is the colored operad BC(O) wherein: ◮ BC(O)(a, u) is the set of all triples (a, x, u) where x ∈ O and (a, u) ∈ C × C|x|. ◮ The partial composition map is defined by (a, x, u) ◦i (ui, y, v) := (a, x ◦i y, u ◦i v) where x ◦i y is the partial composition of O.

32 / 40

slide-110
SLIDE 110

Bud operads

Let O be an operad and C be a set of colors. The C-bud operad of O is the colored operad BC(O) wherein: ◮ BC(O)(a, u) is the set of all triples (a, x, u) where x ∈ O and (a, u) ∈ C × C|x|. ◮ The partial composition map is defined by (a, x, u) ◦i (ui, y, v) := (a, x ◦i y, u ◦i v) where x ◦i y is the partial composition of O. ◮ The colored units are the triples (c, 1, c) where 1 is the unit of O.

32 / 40

slide-111
SLIDE 111

Bud operads

Let O be an operad and C be a set of colors. The C-bud operad of O is the colored operad BC(O) wherein: ◮ BC(O)(a, u) is the set of all triples (a, x, u) where x ∈ O and (a, u) ∈ C × C|x|. ◮ The partial composition map is defined by (a, x, u) ◦i (ui, y, v) := (a, x ◦i y, u ◦i v) where x ◦i y is the partial composition of O. ◮ The colored units are the triples (c, 1, c) where 1 is the unit of O.

— Proposition —

For any set of colors C, the construction O → BC(O) is a functor from the category of operads to the category of colored operads.

32 / 40

slide-112
SLIDE 112

Examples of bud operads

The elements of BC(As) are triples

  • a, ⋆|u|, u
  • where (a, u) ∈ C × C+.

— Example —

In B{1,2,3}(As), (2, ⋆4, 3112) ◦2 (1, ⋆3, 233) = (2, ⋆6, 323312) .

33 / 40

slide-113
SLIDE 113

Examples of bud operads

The elements of BC(As) are triples

  • a, ⋆|u|, u
  • where (a, u) ∈ C × C+.

— Example —

In B{1,2,3}(As), (2, ⋆4, 3112) ◦2 (1, ⋆3, 233) = (2, ⋆6, 323312) .

The elements

  • f

BC(S(G)) are C- typed G-syntax trees, that are G-trees with colors assigned with the root and with each leaf.

— Example —

 2,

c a a , 31122

  ∈ B{1,2,3,4}(S({a, c})). This element is drawn as

3 1 1 2 2

c a a 2

.

33 / 40

slide-114
SLIDE 114

Examples of bud operads

The elements of BC(As) are triples

  • a, ⋆|u|, u
  • where (a, u) ∈ C × C+.

— Example —

In B{1,2,3}(As), (2, ⋆4, 3112) ◦2 (1, ⋆3, 233) = (2, ⋆6, 323312) .

The elements

  • f

BC(S(G)) are C- typed G-syntax trees, that are G-trees with colors assigned with the root and with each leaf.

— Example —

 2,

c a a , 31122

  ∈ B{1,2,3,4}(S({a, c})). This element is drawn as

3 1 1 2 2

c a a 2

.

The elements

  • f

BC(Motz) are Motzkin paths having a global color and a color as- signed with each point.

— Example —

  • 1,

, 221222211

  • ∈ BC(Motz).

This element is drawn as

2 2 1 2 2 2 2 1 1

.

33 / 40

slide-115
SLIDE 115

Bud generating systems

A bud generating system is a quintuplet B := (O, C, R, a, T) where

  • 1. O is an operad, the ground operad;

34 / 40

slide-116
SLIDE 116

Bud generating systems

A bud generating system is a quintuplet B := (O, C, R, a, T) where

  • 1. O is an operad, the ground operad;
  • 2. C is a set of colors;

34 / 40

slide-117
SLIDE 117

Bud generating systems

A bud generating system is a quintuplet B := (O, C, R, a, T) where

  • 1. O is an operad, the ground operad;
  • 2. C is a set of colors;
  • 3. R ⊆ BC(O) is a set of rules;

34 / 40

slide-118
SLIDE 118

Bud generating systems

A bud generating system is a quintuplet B := (O, C, R, a, T) where

  • 1. O is an operad, the ground operad;
  • 2. C is a set of colors;
  • 3. R ⊆ BC(O) is a set of rules;
  • 4. a ∈ C is the initial color;

34 / 40

slide-119
SLIDE 119

Bud generating systems

A bud generating system is a quintuplet B := (O, C, R, a, T) where

  • 1. O is an operad, the ground operad;
  • 2. C is a set of colors;
  • 3. R ⊆ BC(O) is a set of rules;
  • 4. a ∈ C is the initial color;
  • 5. T ⊆ C is the set of terminal colors.

34 / 40

slide-120
SLIDE 120

Bud generating systems

A bud generating system is a quintuplet B := (O, C, R, a, T) where

  • 1. O is an operad, the ground operad;
  • 2. C is a set of colors;
  • 3. R ⊆ BC(O) is a set of rules;
  • 4. a ∈ C is the initial color;
  • 5. T ⊆ C is the set of terminal colors.

Each element (c, x, u) of R can be thought as rule having c as lef member and u as right member.

34 / 40

slide-121
SLIDE 121

Generation

The set R specifies the rewrite rule → on BC(O) by seting x → x ◦i r for any x ∈ BC(O), i ∈ [|x|], and r ∈ R. This is the derivation relation.

35 / 40

slide-122
SLIDE 122

Generation

The set R specifies the rewrite rule → on BC(O) by seting x → x ◦i r for any x ∈ BC(O), i ∈ [|x|], and r ∈ R. This is the derivation relation. An element x of BC(O) is generated by B if 1a → · · · → x and all input colors of x are in T. These elements form the language of B.

35 / 40

slide-123
SLIDE 123

Generation

The set R specifies the rewrite rule → on BC(O) by seting x → x ◦i r for any x ∈ BC(O), i ∈ [|x|], and r ∈ R. This is the derivation relation. An element x of BC(O) is generated by B if 1a → · · · → x and all input colors of x are in T. These elements form the language of B. The set R specifies also the rewrite rule on BC(O) by seting x x ◦

  • r1, . . . , r|x|
  • for any x ∈ BC(O) and r1, . . . , r|x| ∈ R. This is the synchronous

derivation relation.

35 / 40

slide-124
SLIDE 124

Generation

The set R specifies the rewrite rule → on BC(O) by seting x → x ◦i r for any x ∈ BC(O), i ∈ [|x|], and r ∈ R. This is the derivation relation. An element x of BC(O) is generated by B if 1a → · · · → x and all input colors of x are in T. These elements form the language of B. The set R specifies also the rewrite rule on BC(O) by seting x x ◦

  • r1, . . . , r|x|
  • for any x ∈ BC(O) and r1, . . . , r|x| ∈ R. This is the synchronous

derivation relation. An element x of BC(O) is synchronously generated by B if 1a · · · x and all input colors of x are in T. These elements form the synchronous language of B.

35 / 40

slide-125
SLIDE 125

Generation of particular Motzkin paths

Let the bud generating system B := (Motz, {1, 2}, R, 1, {1, 2}) where R :=

  • (1,

, 22) ,

  • 1,

, 111

  • .

36 / 40

slide-126
SLIDE 126

Generation of particular Motzkin paths

Let the bud generating system B := (Motz, {1, 2}, R, 1, {1, 2}) where R :=

  • (1,

, 22) ,

  • 1,

, 111

  • .

— Example —

There are in B the derivations 11 →

1 1 1 1

2 2 1 1 1

2 2 1 1 1 1 1

2 2 1 2 2 1 1 1

2 2 1 2 2 2 2 1 1

.

36 / 40

slide-127
SLIDE 127

Generation of particular Motzkin paths

Let the bud generating system B := (Motz, {1, 2}, R, 1, {1, 2}) where R :=

  • (1,

, 22) ,

  • 1,

, 111

  • .

— Example —

There are in B the derivations 11 →

1 1 1 1

2 2 1 1 1

2 2 1 1 1 1 1

2 2 1 2 2 1 1 1

2 2 1 2 2 2 2 1 1

.

— Proposition —

There is a one-to-one correspondence between the set of Motkzin paths without consecutive steps and the language of B.

These paths are enumerated by 1, 1, 1, 3, 5, 11, 25, 55, 129, 303, 721, 1743, . . . (A104545).

36 / 40

slide-128
SLIDE 128

Balanced binary trees

A balanced binary tree is a binary tree t such that, for any internal node u

  • f t, the height of the lef subtree and of the right subtree of u differ by at

most 1. The first balanced binary trees are ,

a , a a , a a , a a a , a a a a , a a a a , a a a a , a a a a . 37 / 40

slide-129
SLIDE 129

Balanced binary trees

A balanced binary tree is a binary tree t such that, for any internal node u

  • f t, the height of the lef subtree and of the right subtree of u differ by at

most 1. The first balanced binary trees are ,

a , a a , a a , a a a , a a a a , a a a a , a a a a , a a a a .

These trees are enumerated by 1, 1, 2, 1, 4, 6, 4, 17, 32, 44, 60, 70, . . . (A006265).

37 / 40

slide-130
SLIDE 130

Balanced binary trees

A balanced binary tree is a binary tree t such that, for any internal node u

  • f t, the height of the lef subtree and of the right subtree of u differ by at

most 1. The first balanced binary trees are ,

a , a a , a a , a a a , a a a a , a a a a , a a a a , a a a a .

These trees are enumerated by 1, 1, 2, 1, 4, 6, 4, 17, 32, 44, 60, 70, . . . (A006265). Their generating series is the specialization F(x, 0) where F(x, y) = x + F

  • x2 + 2xy, x
  • .

37 / 40

slide-131
SLIDE 131

Generation of balanced binary trees

Let the bud generating system B := (S(G), {1, 2}, R, 1, {1}) where G := G(2) := {a} and R :=

  • 1,

a , 11

  • ,
  • 1,

a , 12

  • ,
  • 1,

a , 21

  • , (2, , 1)
  • .

38 / 40

slide-132
SLIDE 132

Generation of balanced binary trees

Let the bud generating system B := (S(G), {1, 2}, R, 1, {1}) where G := G(2) := {a} and R :=

  • 1,

a , 11

  • ,
  • 1,

a , 12

  • ,
  • 1,

a , 21

  • , (2, , 1)
  • .

— Example —

There are in B the derivations 11

1 2

a 1

  • 2

1 1

a a 1

  • 1

1 1 2 1

a a a a 1

  • 1

2 1 2 1 1 1 2 1

a a a a a a a a 1

  • 1

1 1 1 1 1 1 1 1 1 1 1 1 1 1

a a a a a a a a a a a a a a 1

.

38 / 40

slide-133
SLIDE 133

Generation of balanced binary trees

Let the bud generating system B := (S(G), {1, 2}, R, 1, {1}) where G := G(2) := {a} and R :=

  • 1,

a , 11

  • ,
  • 1,

a , 12

  • ,
  • 1,

a , 21

  • , (2, , 1)
  • .

— Example —

There are in B the derivations 11

1 2

a 1

  • 2

1 1

a a 1

  • 1

1 1 2 1

a a a a 1

  • 1

2 1 2 1 1 1 2 1

a a a a a a a a 1

  • 1

1 1 1 1 1 1 1 1 1 1 1 1 1 1

a a a a a a a a a a a a a a 1

.

— Proposition —

There is a one-to-one correspondence between the set of balanced binary trees and the synchronous language of B.

38 / 40

slide-134
SLIDE 134

Some properties

— Proposition —

For any proper context-free grammar G, there exists a bud generating system B := (As, C, R, a, T) such that the language generated by G is in one-to-one correspondance with the language of B.

39 / 40

slide-135
SLIDE 135

Some properties

— Proposition —

For any proper context-free grammar G, there exists a bud generating system B := (As, C, R, a, T) such that the language generated by G is in one-to-one correspondance with the language of B.

— Proposition —

For any regular tree grammar G, there exists a bud generating system B := (S(G), C, R, a, T) such that the language generated by G is in one-to-one correspondance with the language of B.

39 / 40

slide-136
SLIDE 136

Some properties

— Proposition —

For any proper context-free grammar G, there exists a bud generating system B := (As, C, R, a, T) such that the language generated by G is in one-to-one correspondance with the language of B.

— Proposition —

For any regular tree grammar G, there exists a bud generating system B := (S(G), C, R, a, T) such that the language generated by G is in one-to-one correspondance with the language of B.

— Proposition —

For any bud generating system B, the synchronous language of B is a subset of the language of B.

39 / 40

slide-137
SLIDE 137

Random generation

For any c ∈ C, let Rc be the subset of R of the elements having c as

  • utput color.

40 / 40

slide-138
SLIDE 138

Random generation

For any c ∈ C, let Rc be the subset of R of the elements having c as

  • utput color.

Algorithm RBS:

◮ Input:

  • 1. a bud generating system B := (O, C, R, a, T );
  • 2. An integer k 0.

◮ Output: an element of the synchronous language of B.

  • 1. Let x := 1a;
  • 2. Repeat k times:

2.1 For any i ∈ [|x|], pick yi uniformly at random in Rc where c is the ith input color of x; 2.2 Set x := x ◦

  • y1, . . . , y|x|
  • ;
  • 3. If all input colors of x belong to T :

3.1 Return x;

  • 4. Otherwise:

4.1 Return failure.

40 / 40

slide-139
SLIDE 139

Random generation

For any c ∈ C, let Rc be the subset of R of the elements having c as

  • utput color.

Algorithm RBS:

◮ Input:

  • 1. a bud generating system B := (O, C, R, a, T );
  • 2. An integer k 0.

◮ Output: an element of the synchronous language of B.

  • 1. Let x := 1a;
  • 2. Repeat k times:

2.1 For any i ∈ [|x|], pick yi uniformly at random in Rc where c is the ith input color of x; 2.2 Set x := x ◦

  • y1, . . . , y|x|
  • ;
  • 3. If all input colors of x belong to T :

3.1 Return x;

  • 4. Otherwise:

4.1 Return failure.

— Proposition —

If B = (O, C, R, a, T) is synchronously unambiguous, the RBS is a uniform random generator of the elements of the synchronous language of B.

40 / 40